Home Register Members List Search Today's Posts Mark Forums Read

Go Back   TechFuels Forum > Software > Applications

Reply
 
LinkBack Thread Tools
techno23
Senior Member
 

techno23 is offline  
Old 01-26-2008, 11:02 AM
  #1 (permalink)
Create Rich Internet Apps

With Web 2.0 being the buzz¬word amongst the develop¬ment community, developers
are continuously churning out innovative and more interactive applications for the web as well as the desktop. Browser plug¬ins such as Flash and the recently launched MS Silverlight, have given a plat¬form to web developers for rendering in¬teractive applications over the Web. We have Java or .NET for delivering applica¬tions for desktops but none of these could be used by developers whose skills are restricted to just HTML, JavaScript or Flash.
In March '07,Adobe introduced a tech¬nology called AIR (Adobe Integrated Run¬time) that could be used by web developers to create Rich Internet Applica¬tions (RIA) for the desktop. It is a collection of application resources installed on the computer system that is used to exe¬cute other applications. As AIR is a cross platform runtime, application developers do not have to worry about platform spe¬cific programming. The runtime provides a consistent cross-operating system plat¬form and framework for deploying appli¬cations, eliminating cross-OS testing. Instead of developing applications cater¬ing to a specific operating system, the de¬veloper concentrates on his application programming only. The installed runtime itself has a common application data be¬cause of which the developed applications are lightweight and smaller in size. Adobe AIR, which currently is in public beta ver¬sion 2, was formerly code-named Apollo. Once this AIR runtime is installed, it pro¬vides support for building both HTML and Flash based applications. Adobe AIR presently supports Windows and Mac, but later this year a version for Linux is also expected to be released. With Adobe AIR web de¬velopers can extend their Flash, Flex, HTML, and Ajax¬based applications to the desktop, without having to learn traditional desktop develop¬ment technologies like Java or . NET.
AppsforAIR
Applications that are developed for AIR consist mostly of HTML or Flash SWF files. AIR provides a container for running these files and also provides features such as local file-system access, which would not have been available if these applica¬tions were run from a browser. Webkit, the same engine that powers Safari web¬browser, is used to render HTML docu¬ments used for the application. For launching the application in AIR, a de¬scriptor file is needed, which is an XML file that contains specifications and the file information thatAIR has to read and load onto the AIR container. The applica¬tion that is developed is packaged and dis¬tributed as a single- file installer, known as an AIR file (.air). You'll need to install the AIR runtime environment on a system to run .air files on it.
Getting started
With this month's PCQ Professional CD, you'll find the Adobe AIR runtime and the AIR SDK. First install the runtime using file air_b2_win.exe and then extract the AIR SDK from zip file air_b2_win_sdk.zip. Once you've extracted the SDK on your root drive and named the folder as aicsdk, you need to set the system environment path for the command-line tools in bin folder. Open System properties and through Advanced tab select the Environment variables op¬tion. Under System Variables append ".;<sdk_path>/bin"to the PATH entry. The two tools that are located in sdk's bin directory are ADL andADT.ADL or AIR Debug Launcher is used to test the devel¬oped application and also provides error messages to developers, whereas ADT is a packaging tool, used to package the devel¬oped application and distribute it as an installer file. Once the runtime has been installed and the SDK environment vari¬ables configured, we can start developing our first AIR application.
First AIR application
Through this demo application we shall try to get familiar with the steps needed to start developing rich Internet apps for the AIR runtime environment. We shall use HTML and JavaScript for this demo app. We shall use scripting to access AIR libraries to get access to the file system and also create a new window. From the initial welcome window, we shall shift fo¬cus to a newly created window where the user will be prompted to select a destina¬tion directory. This will be done by using AIR's File I/O library through JavaScript.

Name:  1436439486_30e76cdcc2.jpg
Views: 158
Size:  77.6 KB

For the application, we first need to create a directory where all files for the app will be created and hosted. Let's as¬sume this home directory to be C:/de¬moApp. As discussed already, an XML descriptor file is important for the appli¬cation. So, we'll create that first. For this, open a text editor and add the following code to it. Save the file as 'application.xml.'

This XML file contains the necessary information that is needed by AIR run¬time to execute the application. The appli¬cation tag contains the attribute 'appId', used to give a unique identity to the AIR application. The Name tag gives the appli¬cation a name that is displayed in the title bar of the application. For this demo app, we'll get 'Try Adobe Air' as the app name in the title bar. Lastly, the Tag Content specifies which file is to be opened up by AIR runtime in Web kit browser for HTML files or in Flash for SWF files.
Now, let's create the main.html file.
This will be the welcome page of the ap¬plication and will have a button that will pop-up another child-window containing the file-system access code to select a di¬rectory. Secondly, we also need the di¬rectory and paste that onto the applica¬tion directory, which in our case is C:/demo- App. The following code is for main.html file that will be loaded onto the Webkit browser during the execution by AIR.

Last edited by techno23; 01-26-2008 at 11:04 AM..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT +1. The time now is 09:02 AM.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0
Copyright Techfuels -->
SEO by SubmitEdge


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151