FROM GURU TO BLOG

di Marco Casario

Adobe AIR 7 Day Sprint - Day 1
It was an idea proposed by Ryan some months ago so I’ve decided to dedicate my spare time (do I have spare time?) to make 7 posts in which I take 7 days to learn Adobe AIR 1 (the next one will be on Adobe Flex 3).
My plan is to talk about the resources, the problems and the solutions I’ll find simulating the issues a new AIR developer will face with. I’ll take advantage of some notes I’ve collected during my last Adobe AIR Crash course I held for an italian company.

Adobe AIR 7 Day Sprint - Day 1
Before starting with the development, we have to set the machine up. One of the cool aspect of Adobe AIR is that it lets developers use proven web technologies to build desktop applications and run across operating systems. So it does not matter if you’re a Flex, Flash, or AJAX developers. You don’t have to learn a new language or a new IDE to develop AIR applications.
Use your existing code in Adobe Dreamweaver CS3, Flex Builder, Aptana, Eclipse, Flash CS3 and your favourite frameworks (dojo, spry, prototype, scriptacolous, cairngorm, PureMVC, Degrafa, etc) to deliver applications to the desktop that complement and expand your browser applications. The first step is to download the free Adobe AIR runtime. The runtime is available for Windows and Mac OS system (read the requirements) and it will soon be available for Linux system too. The runtime is only available in english language.
Just in case you’re wondering, the Adobe AIR Runtime is available for distribution and use beyond single-user installations. This means that if you’ll use the web distribution or you’ll use the runtime as individual users you won’t need to sign an Adobe AIR Runtime Distribution License Agreement. Instead, if you are an OEM or PC manufacturer and would like to bundle the Adobe AIR Runtime with your computers, contact Adobe and read the FAQ about
Adobe AIR Runtime distribution. The next step is to download the software, SDKs, extensions, and frameworks you need to build, package, and deploy Adobe AIR applications according to your development environment: Adobe AIR SDK: http://www.adobe.com/products/air/tools/sdk/ the Adobe AIR SDK provides the tools you need to package and deploy Adobe AIR applications, if you prefer working with a text editor or another development environment. Flex 3 SDK: http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex3email
the Free Adobe Flex® 3 SDK has all you need to build and deploy browser- or desktop-based applications that can run on Adobe Flash Player or Adobe AIR (includes the tools from the Adobe AIR SDK).

Flex Builder 3: http://www.adobe.com/cfusion/entitlement/index.cfm?e=flex3email
develop RIAs with Adobe Flex Builder™ 3 software, an Eclipse™ based IDE (includes the Flex 3 SDK and the tools
from the Adobe AIR SDK).

Adobe AIR extension for Dreamweaver CS3: http://www.adobe.com/products/air/tools/ajax/
Package and preview Adobe AIR application files from within Adobe Dreamweaver® CS3 software.

Adobe AIR update for Flash CS3 Professional: http://www.adobe.com/support/flash/downloads.html
Package and preview AIR application files from within Adobe Flash CS3 Professional software.

AIR plug-in for Aptana: http://www.aptana.com/docs/index.php/Getting_started_with_AIR_developmen... Aptana is available both as a standalone application and as an Eclipse plug-in. You can add AIR support to your
Aptana or Eclipse IDE by installing the AIR plug-in.

Ok, you now have the runtime to run and test Adobe AIR applications, the SDKs, extensions, and frameworks to build them. It’s time for some inspiration. There’s no better thing to do, when you don’tknow so much about a new technology, to see what other developers developed with it. Adobe has set up a place where donwload trusted AIR applications: the Adobe AIR Marketplace. Two examples I really invite you to donwload and study are the following:

Google Analytics Reporting Suite
The Google Analytics Reporting Suite brings Google Analytics to the desktop, with a host of features that help you understand how your website is performing and where you can improve. From tracking your visitors, referrals and campaigns to viewing your AdWords ROI metrics, the Google Analytics Reporting suite is a must-have for every web business.

Adobe Developer Connection Developer Desktop
The Adobe Developer Connection Developer Desktop (ADC Desktop) is an Adobe AIR application that delivers a number of helpful resources for Developers. You can easily track and receive desktop notifications to changes in bugs you are tracking from the public Adobe bugbase.
Additionally, You can explore and track aggregated Flex components on your desktop. Lastly, you can use an integrated RSS reader to view news and feeds, and get updates as they happen.
We’re about to close our first day. You’ve learned a lot of things about Adobe AIR. Waht follow is a list of useful resources about Adobe AIR development:

Adobe AIR resources: http://www.adobe.com/support/documentation/en/air/
the Adobe official documentation about AIR. All for free. You can read it via the online Livedocs or download the
PDF version

Adobe AIR Developer Center: http://www.adobe.com/devnet/air/
the Adobe Developer Center dedicated to AIR.

Popular AIR bloggers:
Christian Cantrell
Lee Brimelow
Mike Chambers
Mike Downey
Daniel Dura
Kevin Hoyt
Mike Potter
Ryan Stewart

Our first Adobe AIR Sprint Day is over. You have all the tools you need to run, test mad develop AIR desktop applications. To prepare to the next lesson have a look at the AIR APIs and at the Getting Started section on the Adobe AIR Developer Center.

Posted by marco casario on March 13, 2008 at 04:00 PM

*****************************

Having to do with many presentations, conferences and prototypes for clients, I’m creating many small applications using AIR and Flex 3. Most of them are prototypes with the purposes of showing AIR features and the quantity of code is small (600 lines at most).
In this context it does not make much sense to use a framework or architecture such as Cairngorm or PureMVC or Defraga. So that I’m using a lot what in JSP is called the View Helper pattern. The view components of your AIR and Flex applications, that will only contain the controls that define the user interface of the application, will use a simple View Helper, consisting in an ActionScript class, to encapsulate business logic in a helper instead of a view, making our application more modular by facilitating component re-use. A view contains formatting code, delegating its processing responsibilities to its helper classes, implemented as an Actionscript class. Helpers also store the view’s intermediate data model and serve as business data adapters. View helpers has the following advantages:
improve the separation between the presentation and the business data actinga as intermediaries between the two most of the code contained in a view components is merely mxml code the code within the view components are more readable and a designer can browse and edit it to Using the J2EE View Helper pattern in your
AIR applications change the visual aspects of the application in an easy way it can cache lookup tables for the application
To invoke a view helper you can simply <h:UploadHelper id=”uploadHelper” mlns:h=”com.comtaste.proto.controls.*” />
and the view helper UploadHelper class is an ActionScript class where you’ll encapsulate the business logic of view component:

  1. package com.casario.proto.controls
  2. {
  3. import flash.events.Event;
  4. import flash.events.IOErrorEvent;
  5. import mx.controls.Alert;
  6. public class MainHelper
  7. {
  8. protected var URLString:URLRequest = new URLRequest(“http://www.domain.com/file.jsp”);
  9. [Bindable]
  10. private var statusStr:String = new String(“”);
  11. public function MainHelper()
  12. {
  13. super();
  14. }
  15. }}

For those who will attend my FITC session (Flex Solutions For Your Daily Development) of the next week I’ll show some examples of the View Helper pattern in Flex development. If you want to have more details and investigate on this pattern you can visit the View Helper Design Pattern of J2EE.

Posted by marco casario on February 22, 2008 at 06:10 PM

________________________________________________________________

Marco Casario
m.casario@comtaste.com
Dal 2001 collabora con Macromedia Italia (Adobe oggi) realizzando presentazioni, articoli e partecipando a numerose conferenze che potete trovare elencate nel suo blog personale casario.blogs.com, visitato da migliaia di utenti ogni giorno. Nel 2005 fonda Comtaste (www.comtaste.com), società Solution Partner di Adobe che esplora le nuove frontiere delle Rich Internet Applications. Marco è il punto di riferimento per la comunità italiana di utenti Adobe (www.augitaly.com)all’interno del quale ricopre il ruolo di Channel Manager per la sezione dedicata a Flex ed AIR (www.augitaly.com/flexgala).
E’ autore per FriendsOfED del libro “Flex Solutions: Essential Tecniques for Flex Developers” e “AdvancED AIR Applications”.