开发者

Advantages/Disadvantages of AIR vs Flex/Web

开发者 https://www.devze.com 2023-01-04 01:03 出处:网络
I\'m tasked with writing an application for placing and connecting objects (sort of like a room planner where you can place furniture). I\'ve made a demo using Flash Builder 4 and built it for AIR as

I'm tasked with writing an application for placing and connecting objects (sort of like a room planner where you can place furniture). I've made a demo using Flash Builder 4 and built it for AIR as a desktop app. Now the client wants the full app, but they and I am unsure whether to continue building it as an AIR app or transform it to a web application using Flex. I tried making a simple conversion of the AIR app to a web app, and most things worked but not all. The things that don't work seem to be simple bugs, though, not complete lack of capability.

The capabilities that I'm going to need (except for the modelling) are:

  • Printing of the finished image + a list of the furniture that has been placed
  • A way to save and retrieve finished plans
  • A way to export the list of furniture to Excel format
  • Handling a whole slew of data about the different objects

Only the printing has been implemented so far, and seems to work in the web app as well.

What advantages/disadvantages are there with the two approaches? Are any of the capabilities I need much worse (or even impossible) to implement in either approach?

Edit: Thanks all for your answers. From them, and my own research, I came up with 开发者_Python百科the following:

Web app

Advantages
  • Accessible, no need for installing software
  • Easy to keep up to date
Disadvantages
  • Requires Flash 10 (for saving files)
  • Requires a web server to serve content
  • Sligthly longer development time (from where I am right now)
  • Requires an internet connection to work
  • Lots of data transport, may be slow on a slow network

Desktop AIR app

Advantages
  • Slightly faster development time (from where I am right now)
  • No web server necessary
  • Can be used while not connected to the internet
  • All data is local and faster to load
Disadvantages
  • Requires the Adobe AIR runtime + a separate installation of the program
  • Updates need to be distributed to all users and an admin needs to install them


There is no one straight answer for this one. A few points to consider:

  1. If you want to use specific AIR features like offline usage, integration with the user's OS etc, you should use AIR (of course)
  2. Flex applications are more easy to distribute and upgrade, because everyone uses the same swf instance from the server. When using a server backend with AIR, you should be aware of possible backwards compatibility issues when upgrading you application.


There are a lot of little differences, but in broad strokes, the only considerations you have to think about are:

  1. Does it need to be on the Web?
  2. Does it need file system access.

If (1) then use regular Flash. If (2) then use AIR.


The biggest disadvantage is related to the update model - you need to be a super user in order to update the air application - especially in enterprise the users of the AIR applications don't have rights to update it. If your application is running in the browser you do not have this issue.

Besides that, I do not see any disadvantage.


Check out flash 10 FileReference you can let users save results easily to their local file system. I've used it to create PDF's and let the user save that for printing.

For the PDF side I used Alive PDF.

protected function PrintCard(event:MouseEvent):void
{
    //ShowHideBorders();
    var printPDF:PDF = new  PDF( Orientation.LANDSCAPE, Unit.MM, Size.LETTER );
    printPDF.setDisplayMode( Display.FULL_WIDTH, Layout.SINGLE_PAGE );
    printPDF.addPage();
    printPDF.addImage(CardPanel);
    var fileRef:FileReference = new FileReference();
    fileRef.save(printPDF.save(Method.LOCAL), "card.pdf");  // Sends the file to the USER

    //ShowHideBorders();    
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号