28
Desktop Apps with Web Techs Abu Ashraf Masnun Business student, Web Developer, Tech addict!

Php xperts 2010-masnun

Embed Size (px)

DESCRIPTION

My talks on the phpXperts seminar 2010 :)

Citation preview

Page 1: Php xperts 2010-masnun

Desktop Apps with Web Techs

Abu Ashraf MasnunBusiness student, Web Developer,

Tech addict!

Page 2: Php xperts 2010-masnun

So, what’s it all about?

Use Web technologies

Develop Cross OS

Apps

Use Existing Skill set

Page 3: Php xperts 2010-masnun

Desktop Apps

Netbeans Firefox VLC

MS Office Photoshop Winzip

Page 4: Php xperts 2010-masnun

Web Apps

Gmail Facebook Twitter

Miproapps WordPress Bing

Page 5: Php xperts 2010-masnun

Common Web Technologies

HTML CSSJavascrip

t

960.gs jQuery

And Others….

PHP

Page 6: Php xperts 2010-masnun

Available Tool Kits

Tool Operating System

Winbinder Windows Only

PHP-GTK Cross OS

Titanium App Accelerator Cross OS

Adobe AIR Cross OS

Page 7: Php xperts 2010-masnun

Available Tool Kits

Tool Technology

Winbinder PHP Only

PHP-GTK PHP Only

Titanium App Accelerator

Python, PHP & HTML + CSS + JS

Adobe AIR HTML + CSS + JS, Flex

Page 8: Php xperts 2010-masnun

Available Tool Kits

•Access to Win32 APIs •Good for Windows Apps

Winbinder:

Page 9: Php xperts 2010-masnun

Available Tool Kits

•Looks Bad on Mac• Project is almost dead

PHP-GTK:

Page 10: Php xperts 2010-masnun

Available Tool Kits

• Buggy on Linux• Complex Packaging

Titanium:

Page 11: Php xperts 2010-masnun

Available Tool Kits

• Easy to pick up• Runs fine on All OS

Adobe AIR:

Page 12: Php xperts 2010-masnun

Adobe AIR Hall of Fame!

Page 13: Php xperts 2010-masnun

What do we need?

AIR SDK

AIR RuntimeBasic Knowledge in web

dev.Let’s get started…

Page 14: Php xperts 2010-masnun

What do we build?

Page 15: Php xperts 2010-masnun

The Workflow

Setup the environmentDesign the UI with HTML and

CSSAdd Interaction with Javascript

Pack it up!

Yes, it’s that simple!

Page 16: Php xperts 2010-masnun

Setting Up The Environment

Download the SDK

Extract the ZIP file

Add the “bin” directory to System Path

Windows Linux Mac

Create a project directory

Page 17: Php xperts 2010-masnun

<body align="center">

<input type="button" onClick="javascript:alert('hello experts!')“value="Click me!" style="margin-top:150px;">

</body>

The HTML!Index.html

Page 18: Php xperts 2010-masnun

<?xml version="1.0" encoding="UTF-8"?> <application xmlns="http://ns.adobe.com/air/application/1.5"> <id>phpXperts.air.demo</id> <version>0.1</version> <filename>AIR Demo</filename>

<initialWindow> <content>index.html</content> <title>AIR Demo</title> <visible>true</visible> <width>350</width> <height>450</height>

</initialWindow></application>

The Descriptor!Descriptor.xml

XNOT FOR READING!

Page 19: Php xperts 2010-masnun

<?xml version="1.0" encoding="UTF-8"?> <application xmlns="http://ns.adobe.com/air/application/1.5"> <id>phpXperts.air.demo</id> <version>0.1</version> <filename>AIR Demo - phpXperts</filename>

<initialWindow> <content>index.html</content> <title>AIR Demo - GTN</title> <visible>true</visible> <width>350</width> <height>450</height>

</initialWindow></application>

The Descriptor!Descriptor.xml

<application xmlns="http://ns.adobe.com/air/application/1.5">

Page 20: Php xperts 2010-masnun

<?xml version="1.0" encoding="UTF-8"?> <application xmlns="http://ns.adobe.com/air/application/1.5"> <id>phpXperts.air.demo</id> <version>0.1</version> <filename>AIR Demo - phpXperts</filename>

<initialWindow> <content>index.html</content> <title>AIR Demo - GTN</title> <visible>true</visible> <width>350</width> <height>450</height>

</initialWindow></application>

The Descriptor!Descriptor.xml

<id>phpXperts.air.demo</id> <version>0.1</version> <filename>AIR Demo</filename>

Page 21: Php xperts 2010-masnun

<?xml version="1.0" encoding="UTF-8"?> <application xmlns="http://ns.adobe.com/air/application/1.5"> <id>phpXperts.air.demo</id> <version>0.1</version> <filename>AIR Demo - phpXperts</filename>

<initialWindow> <content>index.html</content> <title>AIR Demo - GTN</title> <visible>true</visible> <width>350</width> <height>450</height>

</initialWindow></application>

The Descriptor!Descriptor.xml

<initialWindow><content>index.html</content>

Page 22: Php xperts 2010-masnun

<?xml version="1.0" encoding="UTF-8"?> <application xmlns="http://ns.adobe.com/air/application/1.5"> <id>phpXperts.air.demo</id> <version>0.1</version> <filename>AIR Demo - phpXperts</filename>

<initialWindow> <content>index.html</content> <title>AIR Demo - GTN</title> <visible>true</visible> <width>350</width> <height>450</height>

</initialWindow></application>

The Descriptor!Descriptor.xml

<title>AIR Demo</title> <visible>true</visible>

<width>350</width>

Page 23: Php xperts 2010-masnun

<?xml version="1.0" encoding="UTF-8"?> <application xmlns="http://ns.adobe.com/air/application/1.5"> <id>phpXperts.air.demo</id> <version>0.1</version> <filename>AIR Demo - phpXperts</filename>

<initialWindow> <content>index.html</content> <title>AIR Demo - GTN</title> <visible>true</visible> <width>350</width> <height>450</height>

</initialWindow></application>

The Descriptor!Descriptor.xml

<height>450</height> </initialWindow>

</application>

Page 24: Php xperts 2010-masnun

Pack it up!

adt -certificate -cn SelfSigned 1024-RSA sampleCert.pfx

samplePassword

Generate Key

Page 25: Php xperts 2010-masnun

Pack it up!

adt -package -storetype pkcs12 -keystore demo.air

descriptor.xml index.html

Bundle it!

Page 26: Php xperts 2010-masnun

Say Hello!

Page 27: Php xperts 2010-masnun

Hall of Fame!

Page 28: Php xperts 2010-masnun

?!? What’s on your mind ?