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.
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()<http://svn.adogo.us/200805/FlexNoFrameworksRequired/presentation/Flex...>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
On Tue, Aug 12, 2008 at 1:47 PM, Robert Dempsey <robertonra...@gmail.com>wrote:
> 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.
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.
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
On Aug 12, 4:40 pm, Robert Dempsey <robertonra...@gmail.com> wrote:
> 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.
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<http://www.robsondesign.com/blog/index.php/2008/01/28/flex-on-rails-i...>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 <http://trac.puremvc.org/Demo_AS3_Flex_CafeTownsend> that he links to. It's a great resource for learning what you can do with PureMVC.
-Brian Shoeman
On Wed, Aug 13, 2008 at 9:58 AM, maxim.porges <maxim.por...@gmail.com>wrote:
> 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
> On Aug 12, 4:40 pm, Robert Dempsey <robertonra...@gmail.com> wrote: > > 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.
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
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.
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.por...@gmail.com>wrote:
> 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
> On Aug 12, 4:40 pm, Robert Dempsey <robertonra...@gmail.com> wrote: > > 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.
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.