Flex on rails is coming….Object.save()

Filed under: Flash — Wrote by Campbell on Thursday, February 8th, 2007 @ 1:13 am

Hands up who has look at Ruby on rails?

If you havent here is a 10 sec summary to get you started. Ruby on Rails inspects the database model and offers all the functionality to get, change, and save those model objects. Take a cat object in the database.

In ROR you would create a new cat:

@cat = Cat.new

Im going to give my cat a collar so it doesnt get fleas and give them to me.

@cat.collar = true;

Now Im going to make sure my cat (in the database ) is saved:

@cat.save

And if I ever want to find my cat with id of 1:

@cat = Cat.find(1)

Soooooo simple. Why cant flex access the objects in the database like this straight out of the box. Well now it kinda can. The part of Ruby on Rails that makes this all possible is called ActiveRecord. And the guys at WebOrb are in the process of adding the best bits of ActiveRecord to thier Flex data service. You will be able to inspect a database table >> generate some classes to include in your flex project >> and start making your own flex cats :) .

"if you were to put side-by-side a Rails developer and a Flex server developer tasked to come up with a similar solution for their respective environments, the Rails developer would be much further along in the same amount of time. The main reason is Rails does a lot more to get you started and then let's you stay super productive. There is no reason why Flex developers cannot enjoy the same."

Check out thier blog post for a better description: HERE 

3 Comments   -
  • Comment by barry.b | February 8, 2007 @ 11:49 am

    Dean Harmons’ (Adobe) Superwizard for Flexbuilder/Eclipse has been around since WebDU last year.

    Point it to the database tables and it builds the AS and ColdFusion classes for you – all the VO’s and DAO required and handles 1-m relationships and drill downs… you get the idea…

    … but admitterdly that doesn’t include FDS data (collision/concurrency) management. I just wish I had a project simple enough to use FDS…

  • Comment by Campbell | February 8, 2007 @ 12:09 pm

    Hey Barry, that is very cool. Didnt know about that one so thanks. Im not a CF guy but I really think some sort of shared standard should become the norm here. (dreams of standards)

Leave your comment

© Flex developer, Campbell Anderson, from New Zealand – xsive blog -