adobe air overview

20
AIR 101 Web Directions North 08 Andre Charland, Nitobi [email protected] Monday, February 4, 2008

Upload: andrecharland

Post on 21-May-2015

9.476 views

Category:

Technology


1 download

DESCRIPTION

Overview of AIR, the APIs you get access to and how to build a simple Flex and HTML application with it. From there we will explore some of the tools available to make AIR development easier and faster. We’ll finish up with a few important usability guidelines and real world case studies of AIR projects.

TRANSCRIPT

Page 1: Adobe AIR Overview

AIR 101Web Directions North 08

Andre Charland, [email protected]

Monday, February 4, 2008

Page 2: Adobe AIR Overview

About Me

Andre Charland

Co-Founder/CE0 @ Nitobi

Usability & RIA Focus

Author, Blogger, Skier

Monday, February 4, 2008

Page 3: Adobe AIR Overview

About Nitobi

Ajax and Flex Components and Services

Founded in 1998

Revenue funded

Over 1000+ customers worldwide

12 Employees

Vancouver, BC

Monday, February 4, 2008

Page 4: Adobe AIR Overview

Customers

Monday, February 4, 2008

Page 5: Adobe AIR Overview

AIR?

Cross OS Runtime

Web developers can build desktop apps

Supports: Flash, Flex, HTML, PDF, JavaScript

Totally Free

OS Level APIs

Monday, February 4, 2008

Page 6: Adobe AIR Overview

AIR APIs and Features

File I/O

Native Windowing

Menuing

Online/Offline Detection

Chrome Control

Local Storage

System Notifications

Auto Updates

SQL Lite Database

Background Processes

Monday, February 4, 2008

Page 7: Adobe AIR Overview

Neat Things...

Call ActionScript directly from JavaScript

HTML content in Flash

Badge Install

Air Aliases.js

Use ActionScript Libraries

Keyboard Shortcuts

Monday, February 4, 2008

Page 8: Adobe AIR Overview

Technicalities

Flash 9

WebKit (Safari) - Not a Browser

Windows, Mac (Linux Coming Soon!)

Not a Plug-In

AIR is not Flex, Ajax, Flash...it’s a run-time

Monday, February 4, 2008

Page 9: Adobe AIR Overview

How To’s

Flex Builder 3

HTML/Ajax

Monday, February 4, 2008

Page 10: Adobe AIR Overview

Application Descriptor File

<?xml version="1.0" encoding="UTF-8"?> <application xmlns="http://ns.adobe.com/air/application/1.0.M6">

<id>samples.flex.HelloWorld</id> <version>0.1</version> <filename>HelloWorld</filename> <initialWindow>

<content>HelloWorld.swf</content> <visible>true</visible> <systemChrome>none</systemChrome> <transparent>true</transparent> <width>400</width> <height>200</height>

</initialWindow> </application>

Monday, February 4, 2008

Page 11: Adobe AIR Overview

File I/O• Setup a File object

var myFile:File = File.appStorageDirectory;myFile = myFile.resolve( “contacts.xml” );

• Instantiate and FileStream objectvar myStream:FileStream = new FileStream();

• Setup the appropriate event listenersmyStream.addEventListener( Event.COMPLETE, doReadData );

• Call FileStream.open() or FileStream.openAsync() with the appropriate modemyStream.openAsync( myFile, FileMode.READ );

• Call the appropriate read and write methods• Close the file using FileStream.close()

myStream.close();

Monday, February 4, 2008

Page 12: Adobe AIR Overview

Windowing Create a new Native Window

var options:NativeWindowInitOptions = new NativeWindowInitOptions();options.systemChrome = NativeWindowSystemChrome.STANDARD;options.transparent = false;var newWin:NativeWindow = new NativeWindow(options);

Window Size:

var maxOSSize:Point = NativeWindow.systemMaxSize;var minOSSize:Point = NativeWindow.systemMinSize;

Monday, February 4, 2008

Page 13: Adobe AIR Overview

Service MonitorInclude the external SWF Library<script type="application/x-shockwave-flash" src="servicemonitor.swf"></script>

Check for the availability of a particular URL

var monitor;

function checkURLStatus(url) {! var req = new air.URLRequest(url);! monitor = new window.runtime.air.net.URLMonitor(req);! monitor.pollInterval = 5000;! monitor.addEventListener(air.StatusEvent.STATUS, showStatus);! monitor.start();

Monday, February 4, 2008

Page 14: Adobe AIR Overview

Snitter

http://snook.ca/snitter/Monday, February 4, 2008

Page 15: Adobe AIR Overview

Scrutinizer

http://about.stompernet.com/scrutinizerMonday, February 4, 2008

Page 16: Adobe AIR Overview

Analytics Reporting

http://analytics.boulevart.be/

http://analytics.boulevart.be/

Monday, February 4, 2008

Page 17: Adobe AIR Overview

Opportunities

Companion Applications

API Libraries

File Libraries

Advanced features – syncing, etc..

Casual games

Downloadable games

Monday, February 4, 2008

Page 18: Adobe AIR Overview

Usability Gotchas

Keyboard shortcuts (tab, enter…)

Throbbers / Activity indicators – no spinner

Allow text to be copied

Add functions for minimize, move, resize, close when ‘chromeless’

Mouse hints, invitations, tool tips

Monday, February 4, 2008

Page 19: Adobe AIR Overview

Limitations in 1.0

No support for hardware acceleration (3D games, video compositing tools, video encoders, etc)

No access to native libraries (DLLs, etc)

Cannot connect to devices (other than web cams and microphones)

Accessibility support is limited

Printing support is limited

Limited localization in 1.0

Monday, February 4, 2008

Page 20: Adobe AIR Overview

Questions:)

[email protected]

http://blogs.nitobi.com/andre

http://www.nitobi.com

Monday, February 4, 2008