Drawbacks of Robotlegs 2 compared with PureMVC

naghekyan's Avatar

naghekyan

02 Dec, 2013 03:10 PM

I want to understand what kind of drawbacks has Robotlegs 2 compared with PureMVC. Seems it is more elegant, more convenient and as much powerful as PureMVC. What is the reason PureMVC should live except the legacy codebase? Would it be time in nearest future that PureMVC will die as far as Robotlegs is living. I think this question may be answered by a person who knows both frameworks very well in practice.

  1. Support Staff 1 Posted by Ondina D.F. on 07 Dec, 2013 11:39 AM

    Ondina D.F.'s Avatar

    I know from my own experience how difficult it is to decide which framework/tools/libraries to use for a certain project, on a certain platform from a multitude of available framework/libraries. It's a time (and nerves) consuming process. You "google" something like "as3 framework comparison" or "the best framework ever", and then you read this article, then the other, you go through discussions on forums, compare the size of their communities and level of activity, read their best practices, you look at examples and read yet another article, or look at a poll, and by the end of the day(s)/week(s)/month(s) you find yourself totally confused and frustrated.
    But, before throwing your computer out the window, I suggest you do the following:

    • forget about what you've read and the myriads of opinions for a while
    • narrow down the long list to only 2 frameworks - which you seem to have done already
    • be ready to invest some time in investigating the 2 frameworks ( a few weeks?)
    • take an example from framework A and try to port it to framework B
    • take another example from framework B and port it to framework A
    • modify the examples wildly - do the craziest things that come to mind and see how they behave
    • read the best practices or documentations of both frameworks while looking at the examples
    • now try to plan your own app with the real requirements of your ongoing project in mind and write down the "difficult" to implement features of your project that would benefit from using a framework.
    • work with the 2 examples you built above and see which framework "feels" more easy to use. Yes, you've heard it right, "feels"!
    • now, if you chose framework A, work with it on a real project, preferably not one of the largest you have ongoing. How does it feel?

    I know both frameworks, PureMVC and Robotlegs, but I'm not going to engage in a discussion about which one is better. That means, I won't answer any questions about speed performance or advantages of using Robotlegs over any other framework.

    My own journey through many as3 frameworks taught me a lot. Even if I decided not to use a certain framework, after investing time in researching about it, it turned out that it wasn't a waste of time as I thought while doing so. The people behind those frameworks are brilliant, and they all have contributed tons to my programming "education".

    Cliff Hall, the author of PureMVC, is one of the people I respect most. He is an awesome teacher! But, so are Shaun Smith - the author of Robotlegs, Till Schneidereit - the author of Swiftsuspenders, Robert Penner - the author of AS3-Signals, Stray and Joel Hooks - the authors of the Robotlegs book and major contributors to the framework, and of course, now, creynders. I'm mentioning only puremvc and robotlegs people, because your focus is on these 2 frameworks.

    At least out of respect for all those people, if not for other reasons, I hope that this discussion will be kept at a decent level:)

    No matter which framework you'll decide to use, I recommend reading both books, because lots of the principles described there are general in nature:
    ActionScript Developer’s Guide to Robotlegs: - http://shop.oreilly.com/product/0636920021216.do
    ActionScript Developer's Guide to PureMVC: - http://shop.oreilly.com/product/0636920022459.do

    Richard Lord has done an awesome job with his frameworks comparison. Look at the links at the end of the article for examples created for the most as3 frameworks known at that time:

    http://www.richardlord.net/blog/flexcaster-robotlegs

    The robotlegs example is using an older rl1 version, but it would be a good exercise for you to port it to rl 2, and if you shared it with us, it would help us improve our demo base;)

    Here is an interesting article in 2 parts about JavaScript frameworks and how to decide which one will best meet the needs of your project. The criteria are actually the same on every platform.

    http://www.infoworld.com/d/application-development/the-10-hottest-j...

    http://www.infoworld.com/d/application-development/the-10-hottest-j...

    If you still don’t know what to choose, roll a dice :P

    Ondina

  2. Support Staff 2 Posted by creynders on 07 Dec, 2013 01:09 PM

    creynders's Avatar

    My 2 cents:

    Obviously I'm biased since I'm a RL contributor, that said however, I did have my reasons to switch to RL from PMVC.

    Advantages of PMVC:
    1/ it's definitely faster
    2/ it's not restricted to one language/platform.

    Though most people think 1/ is the most important one, I don't agree. Speed is irrelevant when it comes to application frameworks (well, not entirely irrelevant of course) PMVC nor RL are meant to be used in high-speed contexts (like a game-engine for instance) Both are meant to allow you to use the MVC pattern to separate concerns in your application in distinct tiers. But you should never rely on either framework to broadcast gameloop events for instance.

    So this leaves us with 2/ which definitely has its benefits. Whether you're working in php, javascript, as3, ... you can rely on the same paradigm. This means that once you're familiar with the paradigm it's really easy to pick up what is happening in an application even when you're not entirely knowledgable in the language it's created in.

    Personally, what put me off PMVC was the (IMO) massive amount of boilerplate and casting. And then I learned to love the simplicity and elegance of RL, which got me hooked. Also, architecturally speaking there's a number of things I have a hard time with in PMVC.
    But let's not forget that RL was based on PMVC. And. It's always easy to pick out the flaws after the fact.

    @Ondina thanks for the kind words!

  3. Ondina D.F. closed this discussion on 28 Apr, 2014 08:13 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac