SlideShare a Scribd company logo
Building Desktop RIAs with
PHP and JavaScript
Ed Finkler • funkatron.com • @funkatron
ZendCon 09 • #thistalksucks
What to expect
This is mainly a JavaScript talk
  jQuery framework for JS examples
  But we talk about PHP on the server and the
  desktop, too
This is mainly a desktop app dev talk
  Diffs between server app dev and desktop app dev
Examples of desktop app <-> server app interaction
Web runtimes
A browser engine environment used for building "local"
apps
Current web runtimes
AIR (adobe.com/go/air)
  Desktop
Titanium (appcelerator.com)
  Desktop
  Mobile
Palm webOS
(developer.palm.com)
  Mobile
We'll use AIR & Titanium
 But others bear examination
JavaScript on the Desktop

Can use (almost) any
available JS libs/frameworks
  No cross-domain
  restrictions
  security restrictions in app
  sandbox (AIR only)
Desktop vs Server-side
PHP stack is built up/torn down every time
  mem leaks not much of an issue
  exec time < a few seconds max
  almost always synchronous calls
Desktop apps are persistent
  exec time can be hours or days
  mem leaks a HUGE issue
  lots of asynchronous calls
JavaScript frameworks




Some stuff in JS SUCKS without a framework
Lots of choices
jQuery pwnz yoo



jQuery is teh awesome (for some stuff)
but you can use anything
PHP is your server-side buddy
    PHP
tubby jedi master


     JavaScript
      hyper frontman


  Use 5.2 at least (you are, right?)
     adds native JSON encoding/decoding
PHP talking to JS Desktop
Serve data structures instead of HTML
  Use JSON

  Use JSON

  USE JSON
  do not use XML (if you can avoid it)
  set the correct mime type (application/json)
Example 1:
PHP duz yer math
Async calls using jQuery AJAX methods
Communicate via JSON




            Flash
                                   Zee Cloud
                                    web server

            Webkit
Example 2:
PHP 'shops yer pics
Uploading via Flash APIs
JSON based communication



             Flash
                           Zee Cloud
                            web server

             Webkit
PHP & jQuery:
THE UNHOLY UNION
        Only works in Titanium Desktop
        (0.7 or higher)
        Also doable with Ruby and
        Python
        PHP support in Titanium is still a
        work in progress
Additional resources
 Adobe AIR for JavaScript Developers Pocketguide
 http://www.tostring.org/
 Developing Adobe® AIR™ Applications with HTML and Ajax
 http://short.ie/ggd9tc
 Titanium
 http://appcelerator.com
 http://codestrong.com
 Titanium Forums
 http://short.ie/d4ponk
 Searchatron Source
 http://short.ie/g9z6qt
Additional resources
 DearZend.com source
 http://github.com/funkatron/dearzend-server
 http://github.com/funkatron/dearzend-client
 Spaz Desktop Source
 http://code.google.com/p/spaz/
 Spaz webOS Source
 http://github.com/funkatron/spaz-webos/
 SpazCore
 http://github.com/funkatron/spazcore
Questions?
@funkatron • funkatron.com • joind.in/922

More Related Content

What's hot (20)

PPT
PHP Custom Web application development
Marion Welch
 
PDF
Desktop apps with node webkit
Paul Jensen
 
PPTX
Blazor
Sandun Perera
 
KEY
Re-imaginging CakePHP
Graham Weldon
 
PDF
A look at FastCgi & Mod_PHP architecture
Aimee Maree
 
PPTX
BBS Selenium & Docker
Mustafa Topçuoğulları
 
PDF
Internet Explorer 9
pietrobr
 
PPT
Buzzword, How'd They Build That?
dcoletta
 
PDF
Web application intro
Tobias Pfeiffer
 
PDF
Padre user experience
Charlie Gonzalez
 
KEY
DC Alt.Net: Building Web Apps With node.js
Troy Goode
 
ODP
Riereta Node.js session 3 (with notes)
Tekno Paul
 
PDF
WordPress&映像配信セミナー+さぶみっと!オフ会- 第2回 さぶみっと! WEB制作セミナー Supported by NTTスマートコネクト
Hiromichi Koga
 
PDF
さぶみっと
Hiromichi Koga
 
PDF
Compiling To Web Assembly
Igalia
 
PPTX
Automated Testing with Cucumber, PhantomJS and Selenium
Dev9Com
 
PDF
LCA2014 - Introduction to Go
dreamwidth
 
PPTX
HTTPS and HTTP/2
MatthewWalker9
 
PPTX
Xdebug, KCacheGrind and Webgrind with WampServer
Mediovski Technology
 
PDF
HTTP/2: speed up your apps and dispatch real time updates (Symfony and API Pl...
Les-Tilleuls.coop
 
PHP Custom Web application development
Marion Welch
 
Desktop apps with node webkit
Paul Jensen
 
Re-imaginging CakePHP
Graham Weldon
 
A look at FastCgi & Mod_PHP architecture
Aimee Maree
 
BBS Selenium & Docker
Mustafa Topçuoğulları
 
Internet Explorer 9
pietrobr
 
Buzzword, How'd They Build That?
dcoletta
 
Web application intro
Tobias Pfeiffer
 
Padre user experience
Charlie Gonzalez
 
DC Alt.Net: Building Web Apps With node.js
Troy Goode
 
Riereta Node.js session 3 (with notes)
Tekno Paul
 
WordPress&映像配信セミナー+さぶみっと!オフ会- 第2回 さぶみっと! WEB制作セミナー Supported by NTTスマートコネクト
Hiromichi Koga
 
さぶみっと
Hiromichi Koga
 
Compiling To Web Assembly
Igalia
 
Automated Testing with Cucumber, PhantomJS and Selenium
Dev9Com
 
LCA2014 - Introduction to Go
dreamwidth
 
HTTPS and HTTP/2
MatthewWalker9
 
Xdebug, KCacheGrind and Webgrind with WampServer
Mediovski Technology
 
HTTP/2: speed up your apps and dispatch real time updates (Symfony and API Pl...
Les-Tilleuls.coop
 

Viewers also liked (6)

PDF
Intro to Sails.js
DevOpsDays Austin 2014
 
PDF
JavaScript for PHP Developers
funkatron
 
PDF
Building RIAs with CodeIgniter and JavaScript
funkatron
 
PDF
JavaScript for PHP Developers
funkatron
 
PDF
Secure PHP Development with Inspekt
funkatron
 
PDF
The WebKit project (LinuxCon North America 2012)
Igalia
 
Intro to Sails.js
DevOpsDays Austin 2014
 
JavaScript for PHP Developers
funkatron
 
Building RIAs with CodeIgniter and JavaScript
funkatron
 
JavaScript for PHP Developers
funkatron
 
Secure PHP Development with Inspekt
funkatron
 
The WebKit project (LinuxCon North America 2012)
Igalia
 
Ad

Similar to Building Desktop RIAs with JavaScript and PHP - ZendCon09 (20)

PDF
Building Desktop RIAs With PHP And JavaScript
funkatron
 
PDF
Building Desktop RIAs with PHP, HTML & Javascript in AIR
funkatron
 
PDF
PHP in a mobile ecosystem
Ivo Jansch
 
PDF
Desktop Apps with PHP and Titanium
Ben Ramsey
 
PDF
An Intro to Mobile HTML5
James Pearce
 
PDF
Building Desktop RIAs with PHP, HTML & Javascript in AIR
funkatron
 
PPT
Ria Development With Flex And PHP
John Coggeshall
 
PPT
Ria Applications And PHP
John Coggeshall
 
PPT
Building Dynamic Web Applications on i5 with PHP
John Coggeshall
 
PPTX
CA Plex on Apple Mac, iOS, Android
CM First Group
 
PDF
Integrating PHP With System-i using Web Services
Ivo Jansch
 
PDF
Building cross platform mobile web apps
James Pearce
 
PDF
PHP in a Mobile Ecosystem (Zendcon 2010)
Ivo Jansch
 
PPTX
Flex for php developers
10n Software, LLC
 
PDF
HTML5 and the dawn of rich mobile web applications
James Pearce
 
KEY
Mobile ECM with JavaScript - JSE 2011
Nuxeo
 
PPTX
Introduction To Web Development & The New Digital Workplace
Jen Wei Lee
 
KEY
HTML5 and the Future of Apps
Tom Croucher
 
PPTX
Php xperts 2010-masnun
Abu Ashraf Masnun
 
KEY
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
davyjones
 
Building Desktop RIAs With PHP And JavaScript
funkatron
 
Building Desktop RIAs with PHP, HTML & Javascript in AIR
funkatron
 
PHP in a mobile ecosystem
Ivo Jansch
 
Desktop Apps with PHP and Titanium
Ben Ramsey
 
An Intro to Mobile HTML5
James Pearce
 
Building Desktop RIAs with PHP, HTML & Javascript in AIR
funkatron
 
Ria Development With Flex And PHP
John Coggeshall
 
Ria Applications And PHP
John Coggeshall
 
Building Dynamic Web Applications on i5 with PHP
John Coggeshall
 
CA Plex on Apple Mac, iOS, Android
CM First Group
 
Integrating PHP With System-i using Web Services
Ivo Jansch
 
Building cross platform mobile web apps
James Pearce
 
PHP in a Mobile Ecosystem (Zendcon 2010)
Ivo Jansch
 
Flex for php developers
10n Software, LLC
 
HTML5 and the dawn of rich mobile web applications
James Pearce
 
Mobile ECM with JavaScript - JSE 2011
Nuxeo
 
Introduction To Web Development & The New Digital Workplace
Jen Wei Lee
 
HTML5 and the Future of Apps
Tom Croucher
 
Php xperts 2010-masnun
Abu Ashraf Masnun
 
HTML5 is the Future of Mobile, PhoneGap Takes You There Today
davyjones
 
Ad

Recently uploaded (20)

PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PPTX
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 

Building Desktop RIAs with JavaScript and PHP - ZendCon09

  • 1. Building Desktop RIAs with PHP and JavaScript Ed Finkler • funkatron.com • @funkatron ZendCon 09 • #thistalksucks
  • 2. What to expect This is mainly a JavaScript talk jQuery framework for JS examples But we talk about PHP on the server and the desktop, too This is mainly a desktop app dev talk Diffs between server app dev and desktop app dev Examples of desktop app <-> server app interaction
  • 3. Web runtimes A browser engine environment used for building "local" apps
  • 4. Current web runtimes AIR (adobe.com/go/air) Desktop Titanium (appcelerator.com) Desktop Mobile Palm webOS (developer.palm.com) Mobile
  • 5. We'll use AIR & Titanium But others bear examination
  • 6. JavaScript on the Desktop Can use (almost) any available JS libs/frameworks No cross-domain restrictions security restrictions in app sandbox (AIR only)
  • 7. Desktop vs Server-side PHP stack is built up/torn down every time mem leaks not much of an issue exec time < a few seconds max almost always synchronous calls Desktop apps are persistent exec time can be hours or days mem leaks a HUGE issue lots of asynchronous calls
  • 8. JavaScript frameworks Some stuff in JS SUCKS without a framework Lots of choices
  • 9. jQuery pwnz yoo jQuery is teh awesome (for some stuff) but you can use anything
  • 10. PHP is your server-side buddy PHP tubby jedi master JavaScript hyper frontman Use 5.2 at least (you are, right?) adds native JSON encoding/decoding
  • 11. PHP talking to JS Desktop Serve data structures instead of HTML Use JSON Use JSON USE JSON do not use XML (if you can avoid it) set the correct mime type (application/json)
  • 12. Example 1: PHP duz yer math Async calls using jQuery AJAX methods Communicate via JSON Flash Zee Cloud web server Webkit
  • 13. Example 2: PHP 'shops yer pics Uploading via Flash APIs JSON based communication Flash Zee Cloud web server Webkit
  • 14. PHP & jQuery: THE UNHOLY UNION Only works in Titanium Desktop (0.7 or higher) Also doable with Ruby and Python PHP support in Titanium is still a work in progress
  • 15. Additional resources Adobe AIR for JavaScript Developers Pocketguide http://www.tostring.org/ Developing Adobe® AIR™ Applications with HTML and Ajax http://short.ie/ggd9tc Titanium http://appcelerator.com http://codestrong.com Titanium Forums http://short.ie/d4ponk Searchatron Source http://short.ie/g9z6qt
  • 16. Additional resources DearZend.com source http://github.com/funkatron/dearzend-server http://github.com/funkatron/dearzend-client Spaz Desktop Source http://code.google.com/p/spaz/ Spaz webOS Source http://github.com/funkatron/spaz-webos/ SpazCore http://github.com/funkatron/spazcore