Develop application runs on both Desktop and Web environments by Flex and AIR

June 15 20092 Commented

Categorized Under: Engroup, Flex, RIA, Software Engineer, Technology

A big concern we had to solve before developing Engroup is that it should be a web or desktop application. As you are aware, web and desktop applications serve for different purposes. For the applications that are mainly used in LAN, desktop is preferred; otherwise, web is preferred. But if my product is used in both LAN and WAN environments, do I need a desktop application running in LAN, and another web application for remote use?

The most feasible solution that many companies choose is to developboth web and desktop presentations and reuse the back-end layer since, in general,the main difference between desktop and web applications is presentation layer. However, the middleware and persistent layer in web and desktop applications could be different depending on application architecture as well as communication protocol between presentation and back-end layers. Moreover, for enterprise applications, the cost for developing two separate presentation layers is so high. Let's imagine that your application has hundreds of views and many business processes at client side.

eSoftHead found a better solution - AIR/Flex. Being inspired by the article Building web and Adobe AIR applications from a shared Flex code base, we applied that Adobe solution on our product - Engroup ( http://esofthead.com/node/25) to build the both desktop and web applications using the same code base (this does not mean
that all source codes are portable between desktop and web environments but most of them). Our goal is to deliver Engroup to our customers in the same form. Engroup 1.5 Milestone 2 will be released in both versions: Web (for community use) and Desktop (for commercial use). You can see its two screenshots respectively below:

Engroup Web Edition Engroup Desktop Edition

To make the dream of developing web and desktop applications in the same codebase become true, the following design is applied:

  • Build projects based on component responsibility: if a component requires specific classes of AIR libraries, we split the project into 2 sub projects; one for web (if needed) and one for AIR. One example is dynamic loading Engroup modules. We created Platform_AIR including classes responsible for loading the modules of Engroup desktop and Platform_Web including classes responsible for loading the modules of Engroup web.
  • Use Abstract Factory pattern instead of Factory method pattern: Abstract Factory pattern creates a family of different implementation services between web and desktop. It helps you manage the set of differences easier.
  • Try to keep shared code between desktop and web as much as possible: While implementing, we always kept in mind of reducing the size of project specific for AIR and web as small as possible. For example, if we have 5 services that need to be implemented, we try to write 5 implementation classes. The result we got is 6-7 classes.
  • Standardize communication protocol between client and server (regardless of whether client is desktop or web application): we chose Flash/Flex as platform of our Engroup rich internet application due to its capacity of developing both web and desktop application. To avoid using web frameworks for developing web client and Java/Qt etc for developing desktop client, Flash is a good choice with more than 95% code is shared in both web and desktop applications (including hundreds of page and components) in our project. Using Flex makes our application run on Flash platform easier. If we used standard web technology (AJAX and other web frameworks), we would have to use another communication to connect between client and server.

That's our story. If you need to develop an application running on both Web and Desktop, what will you do?

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • BarraPunto
  • Bitacoras.com
  • blinkbits
  • BlinkList
  • blogmarks
  • BlogMemes
  • BlogMemes Cn
  • BlogMemes Fr
  • BlogMemes Jp
  • BlogMemes Sp
  • Blogosphere News
  • Blogsvine
  • blogtercimlap
  • Book.mark.hu
  • Bumpzee
  • co.mments
  • connotea
  • De.lirio.us
  • Design Float
  • DotNetKicks
  • DZone
  • eKudos
  • email
  • Fark
  • Faves
  • feedmelinks
  • Fleck
  • Furl
  • GeenRedactie
  • Global Grind
  • Gwar
  • Haohao
  • HealthRanker
  • Hemidemi
  • Identi.ca
  • IndianPad
  • Internetmedia
  • kick.ie
  • Kirtsy
  • laaik.it
  • Leonaut
  • LinkaGoGo
  • LinkArena
  • LinkedIn
  • Linkter
  • Live
  • Ma.gnolia
  • Meneame
  • MisterWong
  • MisterWong.DE
  • muti
  • MyShare
  • MySpace
  • N4G
  • Netvibes
  • Netvouz
  • NewsVine
  • NuJIJ
  • Ping.fm
  • PlugIM
  • Pownce
  • ppnow
  • Print
  • Propeller
  • Ratimarks
  • Rec6
  • Reddit
  • SalesMarks
  • Scoopeo
  • scuttle
  • Segnalo
  • Shadows
  • Simpy
  • Slashdot
  • Smarking
  • Socialogs
  • SphereIt
  • Spurl
  • StumbleUpon
  • Symbaloo
  • Taggly
  • TailRank
  • Technorati
  • ThisNext
  • Tipd
  • Tumblr
  • TwitThis
  • Upnews
  • Webnews.de
  • Webride
  • Wikio
  • Wikio FR
  • Wikio IT
  • Wists
  • Wykop
  • Xerpi
  • Yahoo! Buzz
  • YahooMyWeb
  • Yigg

Related posts:

  1. Loading Modules in AIR application We had the task-force of loading Flex modules in AIR...
  2. Flex vs Silverlight: Which is win? The battle between Flex and Silverlight happens at the time...
  3. Logging in AIR application We are developing the AIR application and we needed to...
  4. Engroup 1.5.07082009 released eSoftHead is very pleased to announce that Engroup 1.5.07082009 is...
  5. Some approaches of extending Web application There are many lead open source standalone projects as Eclipse,...

2 Responses to “Develop application runs on both Desktop and Web environments by Flex and AIR”

  1. Mark says:

    Been doing it with Java.

    Ways to do it with Java

    1. Webstart
    2. Something like products from Creamtec
    3. Eclipse RAP and RCP

  2. william says:

    Thanks for sharing this article I also like website with flash designing specially the intro part of the website is so attractive and I agree with your view that flash presentation Increasing your web traffic and page views Add, add your website in http://www.directory.itsolusenz.com/

Leave a Reply