logo

Which Is Better - Flex or AIR?

Following on from yesterday's post about how easy it is to create a desktop application using Adobe AIR if you're a competent Flex developer, I want to look at which is best - Flex or AIR. Before I do though, here's what the AIR app I created looks like in Windows 7:

icons

At the top you can see how it looks when alt-tabbing. You can also see what it looks like in the taskbar and recent programs list of the Start menu. For all intents and purposes it is an application.

The fact it acts like an application is the single biggest selling point of AIR over Flex. But let's look at each in more depth.

Before I start I just want it to be known that, although Flex is currently my preferred hammer, it doesn't mean that every requirement a customer gives me looks like a nail! I only use RIAs when it fits the requirements. Most of the time it doesn't.

Flex-Based Browser Apps

Pros:

  • Can be accessed anywhere you have a browser (and Flash player installed)
  • Easy to push out an upgrade or new version of the app without any user interaction.

Cons:

  • With Flex apps in browsers it's all too easy to accidentally close or backspace to the previous page and lose your settings/data etc.
  • User needs to remember the URL or where the bookmark to the app is.
  • Browser is paranoid. Flex can't access URLs on server that don't allow it to.

AIR-Based Desktop Apps

Pros:

  • Behaves more like how a user might expect an application to.
  • Easy to find in start menu (and when running) by virtue of its own icon.
  • Better integration with desktop and drag-drop to and from it. Easy access to file system.
  • Can open, write to and delete files on user's disk.
  • Access to secure/encrypted local SQL database.
  • No need for an internet connection (if app is non-data-dependent). Is also "connection aware" so you know when to push data back online if the user's gone offline.
  • AIR includes the Webkit HTML rendering engine.

Cons:

  • AIR apps need both the AIR runtime on the PC and the app installed.
  • No way to automate upgrades. Although you can tell users there's a new version they need to take action to upgrade and stay bug free.

Summary

I've probably missed out some key pros/cons of both but I think that's the general picture. Bascially, AIR is probably "better" but it's harder to push out new versions. It's almost worth developing and debugging in Flex and then converting to AIR once you're happy that's it's stable.

Tomorrow I'll look at when an RIA should and shouldn't be used (IMHO).

Comments

  1. Hello Jake,

    I really apreciate all your works. I understand that you try -everyday- to demonstrate that lotus domino is a technology like others and we can create beautifull and usefull application.

    In all case, with web technologies, I think the worst problem is to continually reload a lot of resources as js, images or switch between screens, so users loose a lot of time to wait datas refresh.

    In fact, I would know if you dont think that JavaScript Frameworks (Ext JS, jQuery, ...) and Ajax are not better solutions than others to provide a good surfing experience. I love that way when datas are refreshed without reload the web page. More, those technologies are largely used, so you can find a lot of resources.

    At last, you need only a notepad.

    Thanks.

    Plz, excuse my English ...

      • avatar
      • Jake Howlett
      • Tue 30 Mar 2010 05:59 AM

      Thanks satourne.

      "At last, you need only a notepad."

      With Flex/AIR you only need Notepad too (oh and the free open-source Flex SDK installed). You don't *have* to buy Flex Builder. You can compile the SWF/AIR file from the command prompt.

      Jake

      PS: Votre Anglais c'est plus beaucoup de mon Francais! Regardez.

  2. Jake,

    Every technology has it pro and cons. The flexibility of Flex is that you can write it for the browser and at the same time provide it as a client based solution. This is what IBM is trying to do with XPages so that the Notes client becomes the XPages run-time client. However, it needs to lose so a lot of weight compared to the AIR runtime. You got me thinking. I have Flex Builder, but I am wondering if I can expand my UX Page Engine to generate the Flex code and run the open-source Flex SDK? Interesting.

  3. Hi Jake,

    Does this app have a backend or is the backend inside the temperature product and you are just calling the data through it's API? Or are you using sqlite?

    • avatar
    • Lance
    • Tue 30 Mar 2010 10:45 AM

    Jake,

    Can you give us a list with links of what is needed to play with flex/air without purchasing products?

    I would like to have a look around and play a bit but my department does not have budget for tools like this at this point.

    Thanks,

    -Lance

      • avatar
      • Jake Howlett
      • Tue 30 Mar 2010 03:44 PM

      Just google "flex sdk" Lance. I've never done it but I believe all you need is the SDK from Adobe and a text editor. Can't imagine it's much fun though. What about just using the 30 day trial instead?

    • avatar
    • Ferdy
    • Tue 30 Mar 2010 01:11 PM

    hi Jake,

    I just wanted to ping that by pure coincedence, today I also had the idea to write an article about when to use RIA technology. It's a question I've struggled with for months at work, but I've now settled on an answer.

    Anyways, I hope our articles enrich each other :) I'll probably write it tomorrow.

      • avatar
      • Jake Howlett
      • Tue 30 Mar 2010 03:46 PM

      Great minds, hey!

      I might just wait until you've written yours. If it's inline with my thoughts I might just link to yours. feeling lazy lately.

      Jake

      Show the rest of this thread

  4. I just discovered this so I haven't actually used it, but it's a framework for creating browser free apps for the desktop, iPhone and Android OS from a single code base (I think). For desktop apps it supports OS-X, Windows and Linux.

    They claim "Unlike Adobe AIR, Titanium gives you access to the entire system’s resources. And Titanium apps take up to 1/10th the memory that AIR apps do."

    It looks like you write your code in most any scripting language; HTML, CSS, Ruby, Python; and it translates it into an app for whatever platform you want. They also say they're going to add iPad and Blackberry support.

    They have a free version that seems to only leave out support.

    It's called Titanium from Appcelerator. Here's the URL:

    http://www.appcelerator.com/

    Worth a look I think.

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment:


About This Page

Written by Jake Howlett on Tue 30 Mar 2010

Share This Page

# ( ) '

Comments

The most recent comments added:

Skip to the comments or add your own.

You can subscribe to an individual RSS feed of comments on this entry.

Let's Get Social


About This Website

CodeStore is all about web development. Concentrating on Lotus Domino, ASP.NET, Flex, SharePoint and all things internet.

Your host is Jake Howlett who runs his own web development company called Rockall Design and is always on the lookout for new and interesting work to do.

You can find me on Twitter and on Linked In.

Read more about this site »

Elsewhere

Here are the external links posted on the same day.

More links are available in the archive »

More Content