My Experience so far with Robotlegs

Robotlegs Logo

I’ve been using with Robotlegs these last couple of weeks and jumping on the latest craze that seems to be sweeping through the AS3 development community.  Coming from someone who has never fully implemented a AS3 framework before (but I do understand design patterns and concepts) the learning curve was actually quiet hard.   I’m sure that anyone who is familiar with PureMVC would feel right at home as it seems to continue where PureMVC had left off with a few less of its downfalls.

I took it upon myself to spend a full weekend trying to start a fresh project using it, now that I’ve gotten a firmer grasp of the Robotlegs framework , I can honestly say I don’t know how I could lived without it, makes making any type applications that revolves around dynamic data so much easier to create.

Brief introduction to Robotlegs
Robotlegs is a Framework based upon the MVC (Model View Controller) design pattern.  It is a universal software architecture pattern that is used within many object oriented programming languages.  The Model is your program state, keeping your program varibles and overall keeping the data for your program state. The View is everything that the user users, anything from a movieclip, to a button to a sound.  And the controller is the medium that connects the view to the model.  There’s a ton of information about the MVC model if you want to know more about it.  What Robotlegs tries to do is help you program your application together, there’s no strict hard rules but more so a blueprint to get you started.

Why use a framework at all?
The main reason for me to use a framework is that it saves time,  I don’t think they’ll ever be a situation where you could say ‘you need to use a framework for this project will be impossible to complete’, frameworks are there to assist you, and it makes larger projects much more structured and controlled therefore saving  you (or your employer) time, or gives you more time in making your application better rather than doing your boiler plate stuff (the things you should do but half the time you don’t).

Everything has its place
Even though Robotlegs lets you use the frameworks how you like, there’re best practices you should try to follow while using the it, the beauty the framework is that if it’s not working, most likely your doing something wrong and against the framework flow. (As a wise guy once told me).

Complete decoupling and Strong cohesion
Frameworks makes it much easier to decouple the classes from each other, the view and the model are completely separated and have no idea about each.   The view is very ‘ignorant’ , it has no idea what’s going on, while the model has no idea how the data arrives to it, it has its own responsibility of keeping data it has received valid and has no idea what else is happening in the framework.

Helps collaborated development easier
I am currently working on a project where another developer is working with me on the User Interface elements while I’m working on the data parts, about 98% of the time anything he changes will not break what I’m working on and likewise, this is another benefit of having things decoupled.

Reusable Code
I know us Objected Oriented Programmers try to make classes we can reuse, but for me the hit rate of this has been pretty sparse, I have reused snippets of functions and classes, but no whole classes reused.   But with making Robotlegs classes I believe that the next major project I work on I’ll be able to re-use some of the models, commands and services I create.

Quicker debugging and launch
Another time saving ability is how quickly the debugging process is, soon as a bug comes up you know exactly where the bug comes is and where it’s isolated to, and you less likely run into the problem of breaking something unrelated while debugging.

Conclusion
I know this blog entry has been me banging the Robotlegs war drum a bit hard, but I really do think it’s a great tool for any as3 developer who wishes to ‘take it to the next level’, below are some resources to get you started. – Enjoy

Resources
http://www.robotlegs.org/
– Robot Legs Home page, great resources there
http://johnlindquist.com/2009/11/18/robotlegs-hello-world-video-tutorial/
– Tutorial on Robotlegs by legendary John Lindquist
http://insideria.com/2010/06/robotlegs-for-framework-beginn.html
– Pretty good Starting tutorial on Robotlegs

I’ve been using with Robotlegs these last couple of weeks and jumping on the latest craze that seems to be sweeping through the AS3 development community. Coming from someone who has never fully implemented a AS3 framework before (but I do understand design patterns and concepts) the learning curve was actually quiet hard. I’m sure that anyone who is familiar with PureMVC would feel right at home as it seems to continue where PureMVC had left off with a few less of its downfalls.

Here are my initial reactions of using Robotlegs

I took it upon myself to spend a full weekend trying to start a fresh project using it, now that I’ve gotten a firmer grasp of the Robotlegs framework , I can honestly say I don’t know how I could lived without it, makes making any type applications that revolves around dynamic data so much easier to create.

Brief introduction to Robotlegs

Robotlegs is a Framework started by

Why use a framework at all?

The main reason for me to use a framework is that it saves time, I don’t think they’ll ever be a situation where you could say ‘you need to use a framework for this project will be impossible to complete’, frameworks are there to assist you, and it makes larger projects much more structured and controlled therefore saving you (or your employer) time, or gives you more time in making your application better rather than doing your boiler plate stuff (the things you should do but half the time you don’t).

Everything has its place

Even though Robotlegs lets you use the frameworks how you like, there’re best practices you should try to follow while using the it, the beauty the framework is that if it’s not working, most likely your doing something wrong and against the framework flow. (As a wise guy once told me).

Complete decoupling and Strong cohesion

Frameworks makes it much easier to decouple the classes from each other, the view and the model are completely separated and have no idea about each. The view is very ‘ignorant’ , it has no idea what’s going on, while the model has no idea how the data arrives to it, it has its own responsibility of keeping data it has received valid and has no idea what else is happening in the framework.

Helps collaborated development easier

I am currently working on a project where another developer is working on the User Interface elements while I’m working on the data stuff, about 98% of the time anything he changes we break what I’m working on and likewise, this is another benefit of having things decoupled.

Reusable Code

I know us Objected Oriented Programmers try to make classes we can reuse, but for me to achieve that has pretty sparse, I have reused snippets of functions and classes, but no whole classes I reused. But with making Robotlegs classes I believe that the next major project I work on I’ll be able to re-use some of the models, commands and services I create.

Quicker debugging and launch

Another time saving ability is how quickly the debugging process is, soon as a bug comes up you know exactly where the bug comes is and where it’s isolated to, and you less likely run into the problem of breaking something unrelated while debugging.

Conclusion

I know this blog entry has been me banging the Robotlegs war drum a bit hard, but I really do think it’s a great tool for any as3 developer who wishes to ‘take it to the next level’, below are some resources to get you started. – Enjoy

Resources

http://www.robotlegs.org/
– Robot Legs Home page, great resources there

http://johnlindquist.com/2009/11/18/robotlegs-hello-world-video-tutorial/
– Tutorial on Robotlegs by legendary John Lindquist

http://insideria.com/2010/06/robotlegs-for-framework-beginn.html
– Pretty good Starting tutorial on Robotlegs

7 Responses to “My Experience so far with Robotlegs”

  1. Matan Uberstein

    Well said, I had the same experience with Robotlegs, after this first week of using it my life changed. I was left wondering how could I have lived without this?!? :-)

  2. admin

    Hey Joel,

    Yeah i did read the article…. after I had already learnt it, would have been very handy if it was the first article i read!

    Keep up the good work

  3. Will

    I’ve been using Robotlegs for over a year now after being a hardcore PureMVC fan. I’m glad to see lots more people using it. I recently had a large project at work where we brought in 4 freelance developers to help out. None of them had used it before and I was quite pleased at how quickly they took to it.

    For me though, it really helps having a solid structure to work around, especially in an environment where more than one developer may need to pickup the code.

  4. Simon

    G’day Will, I saw that Project you worked on for Fosters, it was really impressive so props to ya

    I also really appreciate the structure it gives projects and allows multiple developers to work together, I recently finished a project where I as the only full time developer but there was about 3-4 other developers jumping in and out of the project, they were able to follow my rookie robotlegs skills and still navigate around (was all quiet new to me at the beginning of the project)

    now that says something!

  5. Will

    Thanks Simon. Be sure to check out integrating Signals into RobotLegs, it’s a great alternative to using standard events when communicating between your main tiers (MVCS) :)

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>