Friday, May 30, 2008

An Argument for RIA

Last year I worked on a UK mobile phone and mobile phone deals comparison site: Omio.com

When the project kicked off, we knew we wanted a beautiful interface with rich behavior. For example, the ability to filter deals and compare phones needed to have almost rich client usability and responsiveness. At the time, the team believed HTML & jQuery were the best option for the entire website. Since this was a public facing site we also (obviously) had search engine indexing requirements. The site turned out beautifully in the end, but these days I wonder if strictly HTML & jQuery were the best solution.

The last few weeks I've been working heavily with Adobe Flex 3. I've been very pleased by how productive the framework has helped me become. Very often a stakeholder will ask for a feature that sounds hard to deliver, but is made trivial by some built in component in Flex. I went into the project interested in Flex, and after a few weeks I find myself completely on-board.

Flex gives me all kinds of components and effects. It relieves cross browser pain. It gives me views that can contain objects, not just strings. It gives me those things and many other things that I had considered before I gave it a shot. I wasn't convinced. On paper Flex had nice things, but I was missing the killer feature.

Now that I've used it, I've found what the killer feature is for me--productivity. There are plenty of things to complain about (just like every other technology), but the combined result of all the improvements is better software, faster.

Getting back to Omio, I certainly don't believe that the entire site should be done in Flex. However, the very dynamic aspects of the site would have been easier to develop had we used Flex. Off the top of my head I would surely have built the filters and the comparison logic in Flex. The phone and deal detail pages should be done in HTML because they are easy, static, and can be indexed; however, the dynamic aspects of the site do nothing for, if not hurt page rank.

There are valid concerns with RIA. Neal Ford recently posted a good blog entry explaining how choosing Flex or Silverlight can lock you to a vendor. This usually isn't an issue since you are often locked to a vendor anyway. However, on my current project we experienced a moment where we thought that Flex simply wasn't going to do what we needed, and we were going to have to start over from scratch. It turned out to be a false alarm, but Neal's post really hit home for me those few days.

There are benefits, and concerns. However, if you go into the situation with your eyes open, I think RIA is the right choice far more often most of us previously thought.

11 comments:

  1. Anonymous3:35 PM

    What do you use on the server side? I use WebOrb and ASP.Net for my objects.

    ReplyDelete
  2. Anonymous12:32 AM

    You should check out OpenLaszlo, Jay. It also works with DHTML as a runtime platform.

    ReplyDelete
  3. Anonymous8:17 AM

    what about "search engine indexing requirements" and flex? I'm interested in using flex too but many of our customers are from civil services so we have to provide a text-version for each site(german law, accessibility).

    ReplyDelete
  4. For our Flex-based web RIA products, we're using a Java/Spring/BlazeDS/ActiveMQ stack. Totally open source (we stick with the community variety as opposed to the commercial open source):

    Spring-centric open source stack for the server-side (from bottom toward top):
    http://css.dzone.com/news/airgonaut-desktop-airtop-serie#comment-3058

    ReplyDelete
  5. Anonymous4:45 AM

    Anonymous: On my current project I use Rails, exposing resources as XML. I've been very happy with the integration.

    Mike Pence jr: I've haven't need the DHTML option yet, but when I do I'll be sure to give it a look. Flex has given me all I need so far. Thanks for the tip though.

    Anonymous: I haven't had to solve the "must be available in text" problem yet. I'm suggesting doing dynamic, rich behavior in flex though, which you would normally do with Javascript anyway. So, I assume you could solve the issue the same way as you do for Javascript. You could design less dynamic versions of the pages and point at those when necessary.

    Rogerv, thanks for the tip. My client wasn't very concerned with OS/CS, but it's nice to know there's an Open Source solution.

    Cheers, Jay

    ReplyDelete
  6. Anonymous7:56 PM

    One way to solve the "must be available in text" requirement is to use a CMS like Drupal for your content and have Flex pull it's content directly from the Drupal database. That way with not much extra effort, you have both a HTML and Flex site.

    Using straight XML web services is good if you're going to change the back-end or interact with other services but the convenience of passing typed objects both ways is hard to ignore for me. Have you tried RubyAMF?

    ReplyDelete
  7. Anonymous4:05 AM

    Darren,

    I've heard of RubyAMF, but I haven't tried putting it in my app yet. From a performance perspective XML has been good enough for now. From a productivity perspective I didn't think there'd be much difference.

    It sounds like your recommending spending a morning to see how much cleaner it makes the code, is that right?

    Cheers, Jay

    ReplyDelete
  8. Anonymous7:56 PM

    Not advocating them, but perhaps a component-based web framework would provide similar benefits with regard to productivity?

    ReplyDelete
  9. Anonymous4:21 AM

    I think it would be nearly impossible to create a component-based framework with the rich behavior that Flex provides and ensure cross browser compatibility. Perhaps it's possible, but it's a lot of work.

    ReplyDelete
  10. @Mike Pence Jr:

    I've checked out OpenLaszlo a coupla times, and I've found the documentation to be severely lacking. I've found the opposite to be true with Flex... there's almost an overwhelming amount of documentation.

    I honestly believe that part of Laszlo Systems' business model involve(d|s) releasing OpenLaszlo with intentionally bad documentation so that Laszlo Systems would be called in to do some very expensive consulting to fill in the gaps.

    A company I worked for recently hired a very expensive contractor who specialized in OpenLaszlo to come in to work on a project. I seriously haven't met anyone so remarkably stupid in a long time.

    Lastly, I personally think the fastest way to make an ugly RIA UI is to use unskinned Laszlo components (I've heard this comment from several other folks as well). Again, I find Flex to be the complete opposite. Yes, using default components is kinda boring, but I'd rather start with something that isn't as atrocious and work from there.

    YMMV, but I'm definitely no fan of OpenLaszlo though there were the first out the gate with an XML + JS => Flash solution.

    ReplyDelete
  11. I got into flex a year ago as well bought the book and thought it was great. However i backed off when i came to the point i had to learn yet another framework (cairnghorm) to really get flex show its muscles. So i have mixed feelings :i don't want to write twice the hole business model, but then, if you're not really going deep into it, why not stay with jquery/prototype.... or sproutcore(?)

    ReplyDelete

Note: Only a member of this blog may post a comment.