Imagine for a second that you’ve had this really great idea for a new web based application
and you built it using standard HTML and some form of server side scripting.
You’re pretty pleased with it, but a short while later a similar app pops up out of nowhere with a better interface.
At that point, you start dabbling with the dark magick or RIA’s, only to get stuck.
Rich Application Interface.
Basically, a way of making a web application function more like a desktop application by eliminating page refreshing for most common actions performed within the application.
Common methods for RIA’s
A RIA application can be built with a number of technologies.
There’s also the older OpenLazslo, which is now coming up to version 4, which does some similar stuff to Flex, but which will also create a DHTML based version of it’s output if needed.
AJAX is ready and raring to go in Rails thanks to it’s integration with the Prototype and Scriptaculous libraries.
One slight issue is that it can sometimes feel like you’re locked in unless you want to learn to use those AJAX libraries directly as there’s only so much Rails will do for you, but what it does do is often enough unless you’re doing something more complex (I’ve had no real problems using AJAX in the CMS I’ve been tinkering with as a first project with Rails).
Another disadvantage is that whenever some new code is inserted, you may end up waiting in order for everything to update.
Flex 2 is Adobe’s RIA generator platform as well as a tool for writing some Flash applications.
It basically allows you to write code in an XML based syntax with ActionScript mixed in for logic and CSS for presentation.
The benefit of Flex is that it saves you writing XHTML code for your interface and having to test that code in every browser platform to make sure it looks good as Flash apps will look the same regardless of if the user has Explorer 6 or Firefox 2.
On top of that, there’s still Flash’s ability to do what it does best, pretty and detailed animations that can update and change on the fly.
Taking a look at the Flex style editor application on Adobe’s site shows this off quite well as styling changes are done as you move sliders and change values, including the curvature of the element corners.
One big issue with Flex is that it’s reliant on Flash 9.
While Flash 9 is out now for Windows, OSX and Linux, people who don’t like Flash (you’d be surprised how many find it annoying) or don’t have access to Flash 9 will be stuck unless you cater to them by providing another interface.
Flex, being Flash powered, is designed to consume data in an XML format, but Rails provides a set of tools for easily generating XML data and there’s alreaty integration tools to make Rails + Flex applications easier to build.
As well as Flex, Adobe has been working on a system called Apollo, which is basically Flex for the desktop.
Apollo uses a runtime though, so it shouldn’t have any real issues with people not having the right version of the Flash stand alone player.
The only real gripe I can pick with Flex right now is the lack of a decent editor for it that doesn’t cost over £300 and which will run on my choice of OS (Flex Builder 2 is built on top of Eclipse and offers visual interface design tools like you’d get in Delphi or Visual Studio, but unlike Eclipse, it’s only out for Windows and OSX).
The whole “charting costs extra” thing doesn’t really bother me as Rails has it’s own charting packages that output to image files, which are then capable of being imported into Flex applications.
For more on Flex, pop by http://flexfanatic.wordpress.com/
Open Lazslo is an older contender which was once commercial, but which is now free.
OL has many of the same issues as Flex when it comes to building interfaces with Flash, though it’s version requirements aren’t as high at Flash 7.
I’m not sure if there is a proper Lazslo editor out there as I’ve only used it through the example interface on their site.
I had some issues with OL and how it handles scrolling on things such as multi-line text boxes, but other than that, there was nothing major.
One advantage of Lazslo when it gets a version 4 final release will be that it can output to DHTML as well as Flash 7.
While DHTML may be the devil child that ruined many sites and “DOM scripting” and “AJAX” sound better, at least you’ve got options with OL as to what your code comes out as.
Again, OL consumes XML, but again, Rails is pretty good at spitting out XML code.
Well, there’s always plain Flash, plain reloading interfaces or you could try to find something else to suit your needs such as Java… It depends on what you need and what you want as well as on what you expect your end users to have installed on their systems.