logo

Flex + Chrome + Domino = Desktop Application?

three-icons Google's Chrome browser allows you to create application shortcuts. While playing with the feature it occurred to me just how much like having a real application installed on your PC this is.

For example let's take the Accounts.nsf Flex app, which, like most web-based Flex apps, is more like a real app in its own right than it is a typical website.

If I open the app in Chrome and click the little "page" icon to the right of the address bar I get the option to create a shortcut:

ScreenShot002

This then gives me the following option(s):

ScreenShot005

Which feels just a bit like installing an application, no?

The shot below is of my desktop (click to enlarge) after the "install". Notice the icon on the desktop called "Accounts Version 4" (name comes from the host HTML page's title). The icon itself is the favicon.ico from the web server!

chrom-flex-small

When you double click the new desktop icon a new Chrome window opens with the Flex app inside. Notice however that the browser window has no address bar or other buttons. Just the title bar and the app.

Now, is it me, or does that just look to all intents like a "real" application!?

Chrome even remembers the size and position of the window on a per-"application" basis! Even more like a real application.

Ok, so it doesn't work offline (which might confuse a user who had been fooled in to thinking it wasn't a web app) but you could soon fix that with Google Gears.

Distributed Apps In Your Company

This all got me thinking about how easy it would be to distribute Flex-based applications within an organisation. Assuming the PCs have Chrome installed you could automate the process of adding shortcuts to user's desktops to certain applications. The help desk for example.

To do this you'd need to know that Chrome installs itself in the user's doc/settings folder rather than the more usual "Program Files" folder. The target for the shortcut icon looks like this:

"C:\Documents and Settings\jake\Local Settings\Application Data\Google\Chrome\Application\chrome.exe" --app=http://www.codestore.net/apps/accounts.nsf

Although this could be re-written with a variable name, like below, and you could distribute and run the same shortcut on any Windows PC:

"%USERPROFILE%\Local Settings\Application Data\Google\Chrome\Application\chrome.exe" --app=http://www.codestore.net/apps/accounts.nsf

How cool is that! The user now has an application "installed" which you can control/update from the Domino web server!!

Taking it further you could create a favicon.ico with a 48x48 and/or 32x32 pixel version as well as the usual 16px icon, so it scales better when on the desktop.

You could probably do this with IE but I don't know if you can remove any reference to "Internet Explorer" from the apps title/task bar or change the IE icon, which kind of gives the game away that it's not really an app and you're just looking at the browser.

Either way it's food for thought?

Comments

    • avatar
    • Marcin
    • Mon 7 Sep 2009 05:23 AM

    Uhm, maybe I'm missing something, but why not just use Adobe AIR? You can build an auto-updateable desktop app that you can write with Flex, can work offline (with an SQLite datastore), and can act more native than a web app - eg. native Drag'n'Drop, native menu/dock integration, etc.

    • avatar
    • Luca P
    • Mon 7 Sep 2009 05:32 AM

    Attempt with Prism you can make one icon on your desktop who launch an instance of FF in a separate process.

    https://wiki.mozilla.org/Prism

    • avatar
    • Jake Howlett
    • Mon 7 Sep 2009 05:34 AM

    That's another (better probably) option Marcin, but if you don't want to have two "code streams" or learn how to make an AIR app then you can just make you already-available Flex app look like an app.

    Jake

  1. Marcin, in theory Air sounds like a great idea but in practice, installing Air is (in my experience) as yet as seamless as it ought be. For a wired world, the method Jake notes is actually much less hassle (even if you extend with Google gears) than getting Air on your computer - at least at this moment.

    Hopefully that will be much less of a problem in the future. As it stands, an Air app isn't really an app so much as just a different compiled object out of the Flex IDE. You still need the Air runtime installed to execute it, much like a .NET app. I'm ranting a bit because I was disappointed at how non-trivial it was to get it rolling. Maybe future Air releases will cover this though.

    Not so much to make a counter point as to make folks aware of what to expect.

  2. @Jake

    This can be done also with IE. Already for years ! only its not as straight forward as with chrome (at least not from the user perspective) but in coorporations you can distrubute a file called HTA (stands for HTML Application).

    And with that file you get exactly the same as the example you made !

    http://msdn.microsoft.com/en-us/library/ms536496%28VS.85%29.aspx

    • avatar
    • Jake Howlett
    • Tue 8 Sep 2009 02:42 AM

    Hi Sjaak. Do you get to change the IE icon in the titlebar and can you remove the "Internet Explorer provided by..." message?

  3. Jake,

    I'd imagine Microsoft's preferred way of removing the IE icon and title text is that you fire up VB and create a Windows app that just has one control - a whole window IE control! ;-)

    See? Nice and easy.

    Oh, no, wait... I meant the other one. A complete pain in the arse.

    Oh well.

    • avatar
    • simon wentley
    • Sat 12 Sep 2009 04:41 PM

    You seem to have missed Marcin's point - Adobe Air IS a Flex app built as a desktop app. There's no "two code streams".

      • avatar
      • hatem
      • Thu 14 Jan 2010 05:34 AM

      the problem with this solution(application shortcuts) with google that I want that the frame to display my application be not resizable. how?

      thank you

Your Comments

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


About This Page

Written by Jake Howlett on Mon 7 Sep 2009

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