What benefits does an AIR app have over a Flex browser app? - apache-flex

Please feel free to add multiple answers, each with a single point, to make the voting work well... and don't add something someone else already said.
All I know about AIR is you can have local storage, but there must be more to it... offline access is another key one but then you can run a SWF locally if you save it to your PC.

The biggest benefits (in addition to LocalStorage/SqlLite support) would be...
Read/Write Access to the local file system (including support for native file system dialogs)
Native Drag and Drop Support
In addition, Air apps aren't just Flash based, but can also use HTML/JavaScript via WebKit
Update:
All the info you need on Air is on the Wikipedia page. (and it's external links) http://en.wikipedia.org/wiki/Adobe_Integrated_Runtime
In short, if you need native filesystem and limited desktop interaction Air is the way to go, if you don't need these features, use Flex in the browser.
If you need additional system integration but still cross platform, try Appcelerator/Titanium, Java/JavaFX, Python with WxWidgets, or C++/QT.
It really depends on what you want to build.

You can find all features specific to AIR here :
http://www.adobe.com/products/air/features/

Running a swf file locally doesn't really work for applications that have been pushed out to end users. The user's won't have access to any updates of the application (which an Air application does). Also a swf run locally might not be able to connect back to the server it came from, depending on the security settings.
In reality the nice part of flex is you don't have to commit to web or air. You can develop an application that can be built to run in both the web and on the desktop. For example you can put a majority of the code in a library project and then have a web specific and desktop specific projects that use that library.
Two other advantages of Air - one is that it allows you manage updates to your application and have the updates automatically pushed out. Second is it supports drag and drop (similar to native file access) so you can support dragging pictures or files onto your application.

AIR apps run using Adobe AIR runtime. It has access to your file system and includes more powerful capabilities. Whereas, a web-based flash/flex app runs in a flash player within a web browser. It runs in a sandbox. It has limitations. It can't access local file systems (without user intervention).
Features of AIR:
Can access file system.
With AIR 2.0 you can access (communicate) to native file (executables) of that OS. Means you can communicate to a C app which does some OS specific functionality from the AIR app.
Encrypted Local Store for securely storing credentials.
Easy drag-and-drop functionality.
Behaves as native desktop applications.
Notifications.
System tray icons.
.. and much more.

Related

Architecture for an integrated offline windows + Web + android application with minimal duplicate effort

We are looking to develop an application wherein the requirement is such that we need some help on designing the architecture. I am putting down below the requirements of the application.
Brief Description
1) The application shall work on web + Android + Offline desktop version (Offline version meaning entirely offline environment wherein full functionality shall work without internet)
if possible offline android as well (which as per my research is difficult to do in same backend so caching can be used for temporary offline usage)
2) While designing the architecture we want to minimise the rework such that we shall be able to use the same Database, Logic code and Frontend as much as possible
3) Everytime application is updated then web and android will reflect it immediately due to API integration. And for offline application, we want to update the logic and database everytime it connects to internet.
Challenges I am facing
1) Database choice : Since it has to be an offline solution as well, I understand that we will have to use either SQLite or SQL compact edition so that we can use the free version and installation file is also not very big
2) Logic : Due to offline requirement, we may have to put entire logic in Asp.net / (any other suggestions) since stored procedures are not supported in above mentioned databases
Some links I found regarding this :
https://www.codeproject.com/Questions/346702/How-to-make-work-an-Online-Web-application-Offline
3) Application framework : Which framework MVC / MVVM etc would be suitable to minimise the work for web based and offline app.
4) Frontend : I understand that we will have to make different screens for web and android. However want to know whether we can use HTML 5 (cache feature) or Angular JS which can be used in offline environment as well or do we have to make offline screens seperately?
Build an ASP.Net web app with offline functionality
https://www.html5rocks.com/en/tutorials/appcache/beginner/
5) Can apache cordova be used in someway for better architecture (I dont know much about it hence)
6) I am sure I might be missing something. If you can offer some suggestion on best way to go about developing this application then will really appreciate your help
Your requirements are not very clear to me.
But if i have backend which is catering to multiple clients with different devices.
I will take the following strategy.
I will expose the backend functionality through rest/HTTP and let the clients consume them.
If i want to make the same UI and functionality and want to do it quickly for different mobile platforms. i will go for a Cordova,Phonegap or a Xamarin app. But keep it in mind that they lack some native functionality.
For web i will go with a UI framework which is device screen size responsive like like openUI5 ( i am sure there are dozen others ), such that an user can open the application in a web browser in any device and it gets rendered easily.
For Desktop based apps again i have to develop a separate UI. If you again have multiple flavors in Desktop application like Windows , Mac etc. You can take multiple strategies like Have a common Java layer + Minimal native layers for each OS or having full blown native layers or have the logic exposed as API in a low level language as C++ and then let high level languages consume them.
For all the apps you can use DBs like SQLite . Have the common DB and scripts ready which easily replicate the table structure for you.
Determination of a technology for the backend can be upto you (depending upon your requirements) and should not matter to clients if you expose your functionality in a restful manner.
Hope this helps.
Best Regards,
Saurav

Deploying a webapp that uses chrome native client without involving webstore

I'm investigating the possibility of building a chrome app for a specific enterprise customer. This app would only be used by that customer (ie, it is not a general purpose app).
Among the use cases described on the Technical Overview are the ability to replace "Legacy desktop applications" and "enterprise applications that require heavy computation" - the solution I'm considering fits into both these gaps, as we have some mathematical libraries that we'd like to incorporate into a client-side web app.
Later on in the same document, however, it indicates that you can only deploy native client apps that are deployed on chrome webstore, as clarified by the https://developers.google.com/native-client/devguide/distributing document (and various developer scenarios).
Question: Is it possible to have build a web-app that uses Native Client, and distribute that to users worldwide, but without using Chrome Webstore (ie, using an internal server)?
Note: I've seen this document about creating a private chrome app collection on webstore, but this seems to be specific to ChromeOS. I'm interested in deploying to users that have the latest stable build of Chrome.
It is absolutely possible to run a Native Client app without hosting it on the Chrome Webstore -- otherwise, it would be very difficult to develop an NaCl app in the first place. It is possible for end users to use an NaCl app hosted on any random site. The catch is that the user needs to specifically enable the feature in their Chrome browser. It looks like the current way to enable this is to visit the "chrome://plugins/" page (or "about:plugins" page, same thing), and check the "Enabled" box under "Native Client".
Perhaps enterprise-level administration makes this easier to roll out, or perhaps allow finer-grained control so that only NaCl apps within the corporate intranet are trusted while not allowing stuff from the broader internet (NaCl is supposed to be safe and sandboxed, but Google is still playing it safe and paranoid, just in case).
For a public example of a self-hosted NaCl app, check out NaClBox, a Native Client port of the venerable Dosbox emulator. While it is also hosted in the Chrome Webstore, their support page describes how to run it directly from their site.

Flex multimedia file management

Just I have started learning flex for my project. This is project is a kind image, video, audio file management which is accessible from local hard drive like adding, deleting etc..
I heard that Air is doing this kind of work. But our client asking that the project should run only on the browser not like a application.
I have searched lot of tuts. But I haven't get much tutorials. please give me some suggestion to get this type o tutorial.
Thanks
Browser applications cannot manipulate local hard disk contents, regardless of their type - Flash, or JavaScript, or Silverlight - security model is similar for all of them. Try to persuade your client with seamless install of AIR applications (google "AIR badge install".)

How to find references to the file system in a flash application?

I need to disable all the aspects of functionality which access the client file system in a flash/flex application. I started having a look on how to do this. It appears that the package flash.filesystem need to be importated to allow the interaction with the file system.
However, I did not find any reference to this package in the application.
I am a beginner concerning these technologies so maybe I am missing a point here. Do I need to look into an other direction?
Thanks
Basic flash/as3 resource: http://www.adobe.com/devnet/actionscript/as3.html
The flash.filesystem library is for AIR applications only because flash is not supposed to be able to reach outside the browser to affect a client's computer. That would be a security violation. Even AIR apps are highly restricted in this way.
Update:
Related Question:
flash actionscript access filesystem without air?
This is brand-new in Flash 10.
Update 2:
And an older reference in Flash 9 here. Though it mentions that it's still subject to the user turning off permissions via their settings manager.

Advantages/Disadvantages of AIR vs Flex/Web

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 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:
If you want to use specific AIR features like offline usage, integration with the user's OS etc, you should use AIR (of course)
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:
Does it need to be on the Web?
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();
}

Categories

Resources