« ActionStep source is on SourceForge | Main | Flash and Web 2.0 »

Saturday, August 06, 2005

ActionStep and Rails

Some may have heard the crazy story about my integrating ActionStep and Rails at OSCON. ActionStep is an OSS component framework for Flash written in the ActionScript programming language. Rails is...well that goes without saying. I was slotted to speak on ActionStep on Thursday in the Emerging Tech track. I have to admit that although I have been doing Ruby programming for 4 years, I had never touched Rails. My job really has nothing to do with Web frameworks and such, and time slips by... Anyway, OSCON presented an opportunity to see Rails in action and I sat through David's great tutorial session. Rails is a really nice Ruby framework, and it struck me that it would be cool to come up with a templating language to build ActionStep-based UIs with Rails. Monday and Tuesday I iterated on a design with David, Dave Thomas, Glenn Vanderburg...all the fun Ruby folks, and came up with something linguistically nice. David asked me to add to my ActionStep/Rails syntax slides into my presentation as a 'teaser'. Here is an example of the templating format:

NSView :test do
  attributes :rect => {:x => 0, :y => 0, :width => 200, :height => 400}, 
             :backgroundColor => 0xdddd00
  publishes :selected_person_id => execute { names.selectedItem.label }
  NSButton :hello do
    attributes :title => "Test", 
               :rect => {:x => 10, :y => 10, :width => 20, :height => 20}
  end
  ASList :names do 
    attributes :items => @names, 
               :rect => {:x => 10, :y => 50, :width => 100, :height => 200}
  end
end

Having slides that showed this format was cool with me...but on Wednesday night all that changed. I went to hang with the FOSCON folks, and presented the teaser slides to them. People really liked the syntax and the implications of what having a Flash framework attached to Rails could mean. Then all hell broke loose. Well, actually not hell proper, but chaos harnessed in a very Ruby way by _why the lucky stiff. After his side splitting performance I went back to my hotel around 11pm and decided to just implement the syntax in Rails and ActionStep. I mean, how hard could it be to build a Rich Internet Application framework? I started at 11:30 with two Dr. Pepper and by 6:00am had stuff rendering from Rails to ActionStep. I crashed for an hour and a half, and then went to the David's keynote on Rails. His keynote gave me just the boost I needed to push it a little further and I spent the next hour getting data sent back from ActionStep to Rails. At my 11:30am session I was able to fully demonstrate Rails dynamically creating and serving an ActionStep-based UI. You could update the text templates, press refresh in your browser, and the UI would re-render with your changes. Round-tripping data...the works.

I would like to say that it was just a few lines of code, but that is not quite the case...its a few more than a few. I will be creating a Gem by the end of the month to allow people to play with things, and until that time I wrote up what the syntax looks like...you can see it here in more detail:

http://www.osflash.org/doku.php?id=actionstep_rails

To Open Source and all that it implies..um...ok, I need to sleep now.

PS. United Airlines sucks, I just needed to get that out.

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/t/trackback/8262/2958075

Listed below are links to weblogs that reference ActionStep and Rails:

» The Portland birthday celebration of Ruby on Rails from Loud Thinking
We didn't get to make a big fuzz about the 1-year birthday of Rails on the actual day, July 24th.... [Read More]

» The Portland birthday celebration for Rails from Loud Thinking
We didn't get to make a big fuzz about the 1-year birthday of Rails on the actual day, July 24th.... [Read More]

» WIRELESS TOYZ from Toyz Shop
Customers want to shop the leader - a store that has a proven record with thousands of customers across the nation. Wireless Toyz represents almost every ... [Read More]

Comments

You're a madman, Rich! I'm looking forward to playing around with this stuff.

Hey Rich-
I must say that I saw your little presentation at foscon and I am very impressed. I love this stuff. I have written a ruby port of amfphp that I use to tie rails with flash front ends but the ActionStep is how it should really work. I am very much looking forward to playing with it as it develops. Great Idea! Thanks.

It would be interesting to integrate this library with Nitro as well. Is it something similar to OpenLaszlo?


Some of us missed the original demo. Anybody's got a video?

This stuff is just to die for. Thanks, Rich. Looking forward to tinker with this as soon as I can.

Post a comment

If you have a TypeKey or TypePad account, please Sign In

My Photo

May 2008

Sun Mon Tue Wed Thu Fri Sat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Recent Posts

Photo Albums