Power Flash and Flex from Rails
Posted by David August 28, 2006 @ 07:17 PM
Jon Shumate introduces WebORB:
WebORB for Rails is server-side technology enabling connectivity between Flex and Flash Remoting clients and Ruby on Rails applications. WebORB for Rails can be installed as a plugin into any Rails application to expose Ruby classes as remote services. The product provides a complete implementation of the Adobe’s AMF0 and AMF3 messaging protocols and thus supports any Flash Remoting or Flex client.
Working with Flash and Flex? Check it out.

Its great to see more support from commercial vendors for RoR. Although WebOrb always been far too expensive imho ($800+ per CPU), its still nice to see the broadening acceptance of RoR as a development platform.
Actually it’s free and open source:
http://www.themidnightcoders.com/weborb/rubyonrails/faq.htm#howmuch
“WebORB for Rails is an open source project. It is available free of charge under the GNU General Public License.”
On the site it’s saying that it is free for Rails (GNU public license). You just install it like any other plugin.
WebORB for Rails is free and open source. I’m currently developing a cms in it.
I believe the rails version is free
from tffaq
“WebORB for Rails is an open source project. It is available free of charge under the GNU General Public License.”
Mea culpa on the pricing. I was just looking at their licensing page (http://www.themidnightcoders.com/licensing/index.htm) which didn’t mentioned the free version for Rails.
All the better!
i believe brian is way confused with flash remoting or flex. last i checked macromedia (yeah while ago) did charge $800 per cpu for one of these technologies. im guessing if you can create the flex or flash with remoting, you would not need to get anything from adobe at all (except maybe flash mx)
this is def. a break through for ror. i was kind of wondering if someone would make flash remoting/flex possible for ror (as from what ive seen only play nice with java from adobe.) hopefully its a spiffy clean api to deal with as far as codebase goes. maybe this can be extended into reply_to construct in the controllers. (i think its reply_to, meh :/)
more like cm-yes!
Hey David, It’s great to see WebOrb getting a plug on here. It’s an awesome alternative for Flash Developers doing XML situps to pass data between Flash and Rails.
I have been following the WebOrb Forum for the plugin and the Developers have been very responsive answering questions and squashing user submitted bugs. WebOrb is going to take this a long ways…
Here is a nice little tutorial to get everyone started using it: http://blog.vixiom.com/2006/08/23/flash-remoting-for-rails-tutorial/
So, the rails version is free then, are we sure? :)
Ok guys, I’ve set up an akismet login for Riding Rails. Comments will be auto-approved now. Let’s see if it keeps the spam out.
Meekish, about those XML Situps….
Flex applications require a declaration of the exposed classes as “destinations”. Destinations must be configured in remoting-config.xml located in the \config\WEB-INF\flex folder. The application in this example uses the “InfoService” destination defined as: <destination id="InfoService"> <properties> <source>InfoService</source> </properties> </destination>Flex Builder loads the configuration file during the compile time.
From the WebORB for Rails FAQ:
“Traditionally Ruby on Rails applications use HTML/DHTML/JavaScript enabled clients.”
There is a reason for this. Those technologies are not controlled mainly by one company. Flash is NOT FOSS and not an open standard.
The proprietary, closed source plugin for Flash for GNU/Linux is only at version 7 and many sites are starting to program for 8 and soon 9.
There is a time and place for Flash, and I keep seeing some web developers not understand when that time and place is.
Maybe this is interesting for an intranet, but for the world wide web, Flash is best left to pretty effects that won’t degrade the functionality of the site if Flash is not available.
Yes, the Free Software Foundation is working on a GPLed Flash plugin, http://www.gnu.org/software/gnash/ but it has a way to go.
Flash applications which end up being gate keepers to data and the navigation of a site threaten the openness of the web, and I’ve always looked at Rails and AJAX as helping keep Flex at bay.
I just hope anything that promotes Flex / Flash is used as a last resort, and with the utmost care and consideration. There are enought Flash landmines on the web already.
I don’t see why Flash Remoting is any more powerful/easier than using JSON. Please school me if I’m mistaken…
OK, so maybe we have to do some XML crunches… :)
Flash remoting packets are a fraction of the size compared to JSON or xml representations. AMF is a binary format, and Async, very nice to program against.
DW, I couldn’t agree more. I’ve tried all those flex demos on their site and they all feel klunky, slow and unresponsive with their funny interface. Flash player has a long way to go until it reaches the responsiveness and usability (how do we right click? How do we middle click etc..) of good old html. Even though it’s nice to see Rails getting pupular as a backend for these commercial systems. Way to go!
(not trying to flame; just providing another view)
DW…you are, at times, horribly off base, IMHO. You obviously aren’t very open-minded regarding web technologies or else you’d see people developing Flash 8+ applications (or pretty effects; lol) can be hosted on Windows vs Linux so no issue with providing the content. For the user base using Linux as an OS vs a server, that is a minimum. If they are on a Mac, they are covered (Flayer Player (FP) 9 is out for Mac, including Intel’s). I would venture to say Linux users most likely have a PC or Mac sitting around their office/house anyway. That’s 100% pure speculation though…I don’t use Linux and wouldn’t recognize it if I saw it. :-)
Flash is bad because it isn’t an open standard? Forget open standards. Who cares other than open source lovers? Just because it isn’t open doesn’t mean it isn’t good and Flash Player content is/can be GREAT, when done right. This is where, IMO, you are horribly off base. Maybe you’ve been burned by badly done Flex/Flash apps. Give Ajax a couple years (remember, this is new to a lot of folks) and let’s revisit this convo. Ajax apps can be just as bad as Flash.
Show me an Ajax app that rivals YouTube and/or Google Video. I ask for this because Ajax (JS really) can’t touch Flash in terms of functionality. Now, most of the effects (sliding stuff around, fading it, etc, etc, etc) is possible with DHTML/JS. That’s fine. But Flash is much more advanced than JS and provides a developer much more at his/her fingertips. Don’t you agree? If not, I’d be more than happy to show you apps/code offline so you can compare what you’d have to do with Ajax/JS to handle the same task in Flash/Flex.
Now, you are correct at one point. Flash has its place, just as does Ajax and Ruby for that matter. Everything is useful in certain scenarios. It is def’ about figuring out what tool to use for the gig. We do regular HTML, Flash, Flex, and Ajax dev’ all with different backends (CF, PHP, ASP.NET, “Ruby/Rails” [workin’ on it], etc). It doesn’t matter what we want to do…it is all about the present gig and the needs of it vs forcing the gig into what you are comfortable with.
Flash being available isn’t likely but in the event it isn’t available (or the right version isn’t available) you can provide alternate content for upgrading OR simply do a custom auto/express install. The same issue is there for JS. If it isn’t turned on, what do you do? You provide alternate content to the user and ask/tell them to turn it on.
An open Flash Player would be nice. Maybe haters/non-users of non-open tools/software will adopt it and give Flash that 1% it is lacking from having 100% adoption (serious statement, no sarcasm).
1 last point: Rails def’ has nothing to do with keeping Flex at bay. Rails rivals ColdFusion, PHP, ASP.NET, etc frameworks. At the core it is a web server framework, right? So, it adds on easily integrated DHTML/Ajax functionality (which is sweet btw)...that’s coo. But it still, by itself, has nothing to do with rivaling Flash and I’ve never heard anyone speak about Rails being a better option than Flex or Flash. That’s the same as saying CakePHP rivals Flash because it includes Ajax/DHTML built in.
Ajax does rival it but it is like Windows vs Mac. Flex no doubt has marketshare, in areas, but Ajax is still a powerhouse. You want to know the best part though? They easily & nicely integrate with each other so the competition is really…well…gone.
Disclaimer: As said, I’m not flaming you dude. You presented a close minded view which surprised me since, if I am correct, you are the creator of Ruby or Rails, whichever one. Nothing personal.
To stick to the post, this is good news. Flash Remoting is a great technology.
Mike, Flash Remoting is faster than JSON, SOAP, etc. As Campbell stated, it is binary which is great for packet size. You’ll be thoroughly surprised when/if you use it. It feels like you are talking directly with the database, when done right.
“Show me an Ajax app that rivals YouTube and/or Google Video”
Your comment was full of problems but that sentence I quoted above shone in its idiocy.
You pointed out two sites that use Flash for video only. Notice how they don’t use it for anything else.
Both of those sites could easily eliminate Flash completely from their site by using Quicktime or some other video format.
“As Campbell stated, it is binary which is great for packet size.”
The dynamic (AJAX) request size of most web apps is very small. Unless you’re trying to fetch the full text of “Moby Dick” dynamically, then the binary/plain-text argument is useless (and even then, theres always on the fly gzip-compression available on pretty much every webserver).
Yep and AMF can be GZIP compressed too…that is a browser & server feature not a lanuage feature.
Hey its what ever you need to make cool content and that solves problems bro
Flash has its place in many other situations other than video. lol I havent seen many banner ads done with javascript yet though (bugger), so yes it gets abused and a bad name because some people mis-use it.
JonD- Are you serious? QuickTime vs Flash video? Again, show me an app that can beat it. QT sucks when compared to Flash video. That is why you are seeing less and less of QT and WMP on sites. Look at Amazon’s new video service (Flash video), ABC (Flash video), etc, etc, etc.
Ok…you want an example of a Flash app that Ajax can’t rival: http;//www.hellomoto.com/studio. Build it and show me. We can compare code. ;-) This isn’t a Flash video site but Ajax/DHTML can’t touch it.
NOW, you can build a site with similar drag/drop features but the playback of the animations with the sounds, etc can’t be done easier than with Flash, IMO.
Understand, I’m not anti-Ajax/DHTML. I love them as well. There is a time and place for everything. All I’m saying is it isn’t an apples to apples kind of thing here.
As for the binary, I wasn’t arguing anything here. I was merely substantiating the binary comment. I haven’t tested but highly doubt Ajax calls are faster than Remoting. If they are…not by much. Comparing 1 call with a number argument (let’s just say the number 1 is passed) in Ajax vs Remoting is what I’d like to see. Then, pass an array full of arrays, objects, etc and let’s compare then. Also, include the parsing time. Get those numbers together and let’s see which is faster. :-D
Bottom line, it is all about the need of the app. You could probably benefit from extra time to yourself if you did some things in Flash and vice versa for Flash developers using Ajax. Disclaimer: take Rails out of the equation. They make it super simple. :-)