MVC Frameworks for Flex 3 advice

20 views
Skip to first unread message

Robert Dempsey

unread,
Aug 12, 2008, 1:47:53 PM8/12/08
to Adobe Developers of Greater Orlando
Hi all,

I am building a Rails application with a Flex front-end and am trying
to decide the best way to go. So far, working purely with Flex 3 and
using Rails via HTTPService is working well, however things are
getting a bit clugey on the Flex side (with HTTPService classes in
many controls, etc.). I have been looking at Cairngorm, and also have
seen some posts about PureMVC.

Does anyone have any recommendations on what, if any, Flex MVC
framework to use with a RESTful backend, Rails or otherwise? I
appreciate your help.

Sincerely,

Robert Dempsey

David Schwarz

unread,
Aug 12, 2008, 4:00:59 PM8/12/08
to ad...@googlegroups.com
Hey Robert,

I'm also building a Flex 3 app that uses HTTPService to get data from a RESTful web service. I decided to forgo using a proper Flex 3 framework and instead use Flex's event system with a couple of design patterns to achieve a simple MVC pattern without a framework. Basically, I read the PDF of Max's cf.Objective() presentation and used his ideas as the basis for what I did.

I'm finding it much easier to use a few patterns rather than a full-on framework. I've used Cairngorm and PureMVC in a work setting and found both to be a bit clunky and hard to follow. Now my app is pretty small, and it's only being developed by me, and that was a definite factor in my not using a framework, but I'm confident this will scale fairly well.

Cheers,
-Bucky

Robert Dempsey

unread,
Aug 12, 2008, 4:40:46 PM8/12/08
to Adobe Developers of Greater Orlando
Thanks for the input Bucky. I ghave seen "clunky" used to define the
MVC frameworks a lot. It's looking like HTTPService with design
patterns is the way to go. I'll check out Max's presentation as well.

- Rob

maxim.porges

unread,
Aug 13, 2008, 9:58:57 AM8/13/08
to Adobe Developers of Greater Orlando
Bucky has already pointed out my "no frameworks" presentation, but if
I felt compelled to use a framework I'd probably go with Swiz or
PureMVC. Swiz is an IoC approach much like Spring for Java, and
PureMVC has gotten a lot less clunky in recent times with most of the
boilerplate code being removed. I also hear good things about the
Universal Mind extensions for Caingorm, although I have never used
them. Basically, the rule is not to use Cairngorm unless you use the
UM extensions.

My recommendation would be to start light and add a framework later if
you feel it provides benefit. If you built the app cleanly without a
framework to begin with, it's pretty easy to port it over after the
fact.

- max

Brian Shoeman

unread,
Aug 13, 2008, 10:18:41 AM8/13/08
to ad...@googlegroups.com
I'd have to agree with Max.  I've used PureMVC for a couple of projects now and it's my opinion that as the size and complexity of your application increases, the value that you get from it increases.  A lot of the benefits that you get from it aren't really felt until you start getting really deep component hierarchies.  For the problems that you're describing with the HTTPService classes being spread around, it seems like you might benefit from using PureMVC and defining those services in your proxies.  Jim Robson has some blog posts up about an application that sounds really similar to what you're doing with some great resources to look into if you're considering using PureMVC.  I'd especially recommend checking out the Cafe Townsend demo that he links to.  It's a great resource for learning what you can do with PureMVC. 

 -Brian Shoeman

Daniel Roop

unread,
Aug 13, 2008, 10:27:33 AM8/13/08
to ad...@googlegroups.com
Robert,

I completely agree, a framework isn't necessary, but I would recommend getting a good grasp on the different features of Flex, before you jump too deep into going without one.

As a jumping board you might want to check out the LunchChooser app they have been building at the last few meetings

http://svn.adogo.us/200806/
http://svn.adogo.us/200808/

And I also did a FlexUnit presentation, that shows the basics of the NVC approach a couple of us came up with at the group.  Essential NVC (Non-Visual Components) are like DAOs in Java.  OfCourse since you come from a Rails background you might be more comfortable putting the NVC functions directly in your Model, which would work as well.

http://svn.adogo.us/200803/FlexUnitBasics/

I also know that Simeon Bateman (simb.net) has done a lot of work with Rails and flex so it might be worth checking his blog.  I did find this article
http://blog.simb.net/2007/09/19/flex-with-rails-at-railsconf-europe/

And there is of course the speaker from your conference, Peter Armstrong,  who is working on Ruboss http://ruboss.com/

As a general rule, I would recommend flex works best, if you do the least amount of work necessary.  Don't bring any existing Request/Reponse mindsets into the RIA world of Flex, and your life will be a lot easier.

Hope my ramblings are somewhat helpful.

Daniel

On Wed, Aug 13, 2008 at 9:58 AM, maxim.porges <maxim....@gmail.com> wrote:

Robert Dempsey

unread,
Aug 18, 2008, 8:46:07 AM8/18/08
to Adobe Developers of Greater Orlando
Thank you all for your responses. I am going to look into PureMVC,
however for a version 1 I will keep it simple and stay out of the
frameworks. Thanks again for all the great advice.

Sincerely,

Robert Dempsey
Reply all
Reply to author
Forward
0 new messages