3 Replies Latest reply on Mar 2, 2009 6:51 PM by John Hall

    Should I use a MVC framework for an large RIA application

    Johnking08 Level 1
      The book of "Adobe Flex 3 Training from the Source" does not talk about any MVC frameworks in its
      eCommerce example. I think Flex's events, functions, and mx components are MVC already. Do they have to be in separate file to call them MVC? I do not find that core Flex is harder to read and understand than using a MVC framework. I think using the MVC framework would hurt the performance because too many additional events are dispatched. Any comments?
        • 1. Re: Should I use a MVC framework for an large RIA application
          John Hall Level 4
          MVC is one design pattern that is pretty darn useful for a lot of applications, IMHO. There are frameworks that more or less force you to think in MVC pattern terms, like Cairngorm and PureMVC. But you certainly don't need to use a framework to create an overall design pattern of model, view, controller. However, it sure can make it easier if you're doing a large project. The book you're talking about is a good example. They don't use a framework but they have tried to use a form of MVC in the way that they implement all the components to ensure things are loosely coupled.

          As far as hurting performance, I'm no expert but there are so many thousands of events occurring all the time in Flex that you might actually enhance performance if you take more control by using custom events of your own creation within a well designed framework.

          I'm a fan of the Mate because I get it and it doesn't impose a strict structure like Cairngorm. I don't have a whole lot of experience with OOP (though I'm sure getting it thanks to this forum). Many others have their own opinions and will surely recommend other frameworks. However, the bottom line is that if you're doing a big project, I would think it would be a huge help to at least have a conceptual framework approach in your mind, if not part of the code.

          Here's a video intro to Mate http://tinyurl.com/mateintro
          • 2. Re: Should I use a MVC framework for an large RIA application
            Johnking08 Level 1
            quote:

            Originally posted by: John Hall
            ...
            As far as hurting performance, I'm no expert but there are so many thousands of events occurring all the time in Flex that you might actually enhance performance if you take more control by using custom events of your own creation within a well designed framework.

            I'm a fan of the Mate because I get it and it doesn't impose a strict structure like Cairngorm. I don't have a whole lot of experience with OOP (though I'm sure getting it thanks to this forum). Many others have their own opinions and will surely recommend other frameworks. However, the bottom line is that if you're doing a big project, I would think it would be a huge help to at least have a conceptual framework approach in your mind, if not part of the code.

            Here's a video intro to Mate http://tinyurl.com/mateintro



            Here are some Flex web service demos that use core Flex, Cairngorm, and PureMVC. You will find
            that the performance of core Flex is better that of PureMVC, which is better than Cairngorm's:

            http://baoandassociates.com/#selectedTab=6

            • 3. Re: Should I use a MVC framework for an large RIA application
              John Hall Level 4
              Assuming their all well-designed, I guess decoupling components comes with some overhead. Always good to know. Thanks.