Hi tino,
I use Flex (don’t like the Flash IDE - especially that stinking
Timeline ) with Rails all the time - no problems. Being on Windows, I
use InstantRails, and Aptana Studio as an editor, although I do as
much as I can now via the command line. I looked into Aptana due to it
being built on Eclipse the same as Flex, no other reason. I have not
had any problems so until I do, being Pragmatic
I’ll stay as I am
for now. Though I am looking to get hold of a Mac box as soon as I
can…
Flash Builder 4 is the new Flex 3, while Flash Pro 5 is in CS5 so it
looks like Adobe will continue to improve and push Flash/Flex, I bet
there will be more to come…
My set up is to use Flex for the front end entirely, and then Rails
for the back. All my swf’s are on one server that would host the
domain, while Rails is on a cloud so I can ramp up the resources when
necessary for Rails - which is the most intensive part of the App.
I would recommend looking at Flexible Rails, and download a trial of
Flash Builder 4 to go with it - if it is the same as Flex 3, you
should get a 60 day trial rather than the usual 30. It was Flexible
Rails that got me looking at Rails in the first place, and I’ve loved
it ever since.
If you look into RemoteObject on the Flash side, it makes it VERY
simple to send objects to Rails via RubyAMF - get the FlexibleRails
branch from :
http://rubyamf.googlecode.com/svn/branches/flexiblerails/rubyamf
One thing I did find, was that I was creating model value objects
(VO’s) in actionscript that my UI would use, but they were the same as
the models in Rails. This was duplication - first I created the Rails
model, then I wrote the AS VO - which was wasting good development
time - so I wrote my first gem - but isn’t really ready to post yet on
Github - it needs refactoring a little along with more useful comments
and docs). It hooks into the Rails Scaffolder and creates all my VO’s
for Flex as I create my models in Rails. It also keeps a few AS
Singletons updated as necessary as I add new Models, and keeps an AS
Map file uptodate which maps singulars and plurals as well as the
belongsTo, habtm etc relationships between the AS VO’s.
The VO’s are sent via RemoteObject to the Rails Controller, and passed
to the relevant Rails Model for processing. It’s all pretty simple
when you get the hang of it.
Personally, I wouldn’t try doing anything major in the Flash IDE -
especially if you may not be the only one working on the project going
forward - Flex is far more suitable to larger projects, and multi-
developer teams.
As far as not using Flash because of iPhones etc, I guess it depends
on your target market and the application itself. Are your users going
to want to access your services from a mobile handest? I have a mobile
running Android (not the latest version) and it struggles to display e-
mails from this group, and not all web pages are viewable
(particularly from this group) - regardless of Flash content or not -
so I wouldn’t make a decision on the technology used on your full
blown web site app based on the mobile market. Mobile Apps, not web
sites, are the way forward in my, very humble, view.
Instead of trying to develop one web site/application front end for
all devices, why not make your main site - the one which will do all
the attracting of customers - exactly as is required for that
particular purpose. If you then need to provide access to services for
the mobile market, create the relevant App for the relevant handset
OS. With Rails, you can create the one Application on the server, then
specific front end apps for each market you are targeting - each of
which could connect with Rails.
One final thought with regard to Flex, is that if you develop
correctly with Flex, ie re-usable code, you then build up your own
libraries of code to just drop-in future applications. I haven’t
looked into Rails views at all because I have everything I need in
Flex, but from what I did read, it appears you have to create all your
views from scratch for each Rails application - that doesn’t interest
me - and am happy to be corrected if wrong - I prefer to use my own
custom built AS components, controllers, managers to display and
control the view.
And just remembered you mentioned CSS - well Flex is completely CSS
compatible.
That’s my 2p worth, hope you found some of it useful.
Regards
Paul