views:

125

answers:

3

Since Rails is already an effective Rich Internet Application framework because of the way it makes Ajax so easy, what is the argument for combining Rails with Flex and using Flex as the front end instead of HTML? A programmer friend of mine said he uses this combination because Flex is great for RIAs. My argument is that Rails is already great at that - why add additional complexity? Another big disadvantage of doing this, it seems, is that you cannot use HTML in your front end any longer because Flex makes this extremely problematic. That seems like a very high price to pay for whatever benefits this combination of technologies offers.

A: 

I wasn't aware people used Flex and rails all that much. But using Flash/Flex does give you a bit more processing and visualization power. Also, you can have native AMF support from Flex for efficient data transfer.

CookieOfFortune
Some people do use AMF but because of the configuration required by AMF I believe it's more common to see XML as the data transfer medium. By "processing and visualization power" I assume you mean that Flex/Flash are effectively an animation technology, unlike the Ajaxed HTML that Rails provides. What's strange, though, is that even people who are not harnessing this animation feature are opting for Flex simply because "it's great for RIA". Seems like massive overkill to me.
Bijou
XML is a LOT bulkier than AMF. I think AJAX requires more expertise than Flex. There are browser compatibility issues and it can become very complicated.
CookieOfFortune
Bulkier but easier to set up. AMF requires additional nuts and bolts in the middle. Also, don't most of the JS libraries abstract out those browser incompatibilities? I don't hear about people struggling with that stuff as much as early on in the Ajax Era.
Bijou
Yeah, so a lot of the new AJAX frameworks are great, but compatibilities still exist.
CookieOfFortune
A: 

It all depends on your definition of what a RIA (Rich Internet Application) really is. To some, an AJAX enable web application might fit the bill. To others, a RIA includes highly stylized elements, a high level of interactivity, and a good bit of animation.

If you're one of the people that think along the lines of the first requirements, then great. An AJAX enabled RoR app is going to be enough for your RIA. For those who belong to the second group, RoR is yet another way to provide the data backend for a RIA that uses Flex/Flash for it's presentation.

Personally, I believe that RoR combined with Flex is going to give you a much richer, dynamic, and engaging RIA than a standard AJAX enabled web application.

Justin Niessner
I see what you mean. Flex adds an additional layer of "richness" to Rich Internet Applications which Ajaxed HTML cannot provide.
Bijou
+1  A: 

I think you want to consider this in terms of what your client app needs to do. If you can accomplish everything you need within rails, then there's no real need to go to flex. If you need more client-side control, then you can build a flex app and make the rails app just a web service.

Nick Brosnahan
I think I'm starting to understand when it's appropriate. It's really for when you need that additional front-end oomph that Flash animation provides.
Bijou