SlideShare une entreprise Scribd logo
1  sur  18
Télécharger pour lire hors ligne
Building Desktop RIAs with
PHP and JavaScript
Ed Finkler • funkatron.com • @funkatron
php|tek 09
What to expect
This is mainly a JavaScript talk
  Compare JS and PHP
  jQuery framework for JS examples
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 quot;localquot;
apps
Current web runtimes


AIR (adobe.com/go/air)
Titanium (titaniumapp.com)
Palm webOS
(developer.palm.com)
We'll use AIR
 But others bear examination
JavaScript in AIR
 Can use (almost) any
 available JS libs/frameworks
   No cross-domain
   restrictions
   security restrictions in app
   sandbox ( eval() )
 Access AIR APIs
 Access standard Flash APIs
 Use compiled AS3 libs
PHP vs JavaScript
JavaScript is fundamentally
different
JS is a functional
language
  closures
  first-order functions
Object model is totally
different
PHP vs JavaScript
Everything in JS is an object
Arrays are not associative – objects serve as
associative array equivalents
No include/require statements available
Event-driven model/asynchronous actions


     Further reading:
      – JavaScript: The Definitive Guide, David Flanagan
      – JavaScript: The Good Parts, Douglas Crockford
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
  almost always asynchronous calls
JavaScript frameworks
Some stuff is a huge pain without the help of a
framework
Lots of choices
Must play well with AIR
  eval usage gotchas
jQuery pwnz yoo



jQuery is teh awesome
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 AIR
 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
Example 3:
DearZend.com
JSON based communication
Desktop alternative to web front-end



             Flash
                                       Zee Cloud
                                        web server

             Webkit
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://titaniumapp.com/

 Titanium Forums
 http://short.ie/d4ponk

 Searchatron Source
 http://short.ie/g9z6qt

 DearZend.com source
 http://github.com/funkatron/dearzend-server
 http://github.com/funkatron/dearzend-client
Questions?
@funkatron • http://funkatron.com • joind.in/198

Contenu connexe

Tendances

Back to the future: Isomorphic javascript applications
Back to the future:  Isomorphic javascript applicationsBack to the future:  Isomorphic javascript applications
Back to the future: Isomorphic javascript applicationsLuciano Colosio
 
Django Introduction & Tutorial
Django Introduction & TutorialDjango Introduction & Tutorial
Django Introduction & Tutorial之宇 趙
 
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)James Titcumb
 
Leveraging a distributed architecture to your advantage
Leveraging a distributed architecture to your advantageLeveraging a distributed architecture to your advantage
Leveraging a distributed architecture to your advantageMichelangelo van Dam
 
Introduction To Django
Introduction To DjangoIntroduction To Django
Introduction To DjangoJay Graves
 
Angular Best Practices v2
Angular Best Practices v2Angular Best Practices v2
Angular Best Practices v2Henry Tao
 
Create a web-app with Cgi Appplication
Create a web-app with Cgi AppplicationCreate a web-app with Cgi Appplication
Create a web-app with Cgi Appplicationolegmmiller
 
* DJANGO - The Python Framework - Low Kian Seong, Developer
    * DJANGO - The Python Framework - Low Kian Seong, Developer    * DJANGO - The Python Framework - Low Kian Seong, Developer
* DJANGO - The Python Framework - Low Kian Seong, DeveloperLinuxmalaysia Malaysia
 
Creating a Plug-In Architecture
Creating a Plug-In ArchitectureCreating a Plug-In Architecture
Creating a Plug-In Architectureondrejbalas
 
Zend expressive workshop
Zend expressive workshopZend expressive workshop
Zend expressive workshopAdam Culp
 
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)James Titcumb
 
ITB2019 ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 V...
ITB2019 ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 V...ITB2019 ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 V...
ITB2019 ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 V...Ortus Solutions, Corp
 
OpenAPI development with Python
OpenAPI development with PythonOpenAPI development with Python
OpenAPI development with PythonTakuro Wada
 
A gentle intro to the Django Framework
A gentle intro to the Django FrameworkA gentle intro to the Django Framework
A gentle intro to the Django FrameworkRicardo Soares
 
TDD with PhpSpec - Lone Star PHP 2016
TDD with PhpSpec - Lone Star PHP 2016TDD with PhpSpec - Lone Star PHP 2016
TDD with PhpSpec - Lone Star PHP 2016CiaranMcNulty
 
Create responsive websites with Django, REST and AngularJS
Create responsive websites with Django, REST and AngularJSCreate responsive websites with Django, REST and AngularJS
Create responsive websites with Django, REST and AngularJSHannes Hapke
 

Tendances (20)

Back to the future: Isomorphic javascript applications
Back to the future:  Isomorphic javascript applicationsBack to the future:  Isomorphic javascript applications
Back to the future: Isomorphic javascript applications
 
DDD with Behat
DDD with BehatDDD with Behat
DDD with Behat
 
Django Introduction & Tutorial
Django Introduction & TutorialDjango Introduction & Tutorial
Django Introduction & Tutorial
 
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
Kicking off with Zend Expressive and Doctrine ORM (PHPNW2016)
 
Leveraging a distributed architecture to your advantage
Leveraging a distributed architecture to your advantageLeveraging a distributed architecture to your advantage
Leveraging a distributed architecture to your advantage
 
Django by rj
Django by rjDjango by rj
Django by rj
 
Introduction To Django
Introduction To DjangoIntroduction To Django
Introduction To Django
 
Angular Best Practices v2
Angular Best Practices v2Angular Best Practices v2
Angular Best Practices v2
 
Create a web-app with Cgi Appplication
Create a web-app with Cgi AppplicationCreate a web-app with Cgi Appplication
Create a web-app with Cgi Appplication
 
* DJANGO - The Python Framework - Low Kian Seong, Developer
    * DJANGO - The Python Framework - Low Kian Seong, Developer    * DJANGO - The Python Framework - Low Kian Seong, Developer
* DJANGO - The Python Framework - Low Kian Seong, Developer
 
Let's Graph
Let's GraphLet's Graph
Let's Graph
 
Django Best Practices
Django Best PracticesDjango Best Practices
Django Best Practices
 
Creating a Plug-In Architecture
Creating a Plug-In ArchitectureCreating a Plug-In Architecture
Creating a Plug-In Architecture
 
Zend expressive workshop
Zend expressive workshopZend expressive workshop
Zend expressive workshop
 
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
 
ITB2019 ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 V...
ITB2019 ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 V...ITB2019 ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 V...
ITB2019 ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 V...
 
OpenAPI development with Python
OpenAPI development with PythonOpenAPI development with Python
OpenAPI development with Python
 
A gentle intro to the Django Framework
A gentle intro to the Django FrameworkA gentle intro to the Django Framework
A gentle intro to the Django Framework
 
TDD with PhpSpec - Lone Star PHP 2016
TDD with PhpSpec - Lone Star PHP 2016TDD with PhpSpec - Lone Star PHP 2016
TDD with PhpSpec - Lone Star PHP 2016
 
Create responsive websites with Django, REST and AngularJS
Create responsive websites with Django, REST and AngularJSCreate responsive websites with Django, REST and AngularJS
Create responsive websites with Django, REST and AngularJS
 

En vedette (7)

Pengenalan Teknologi ajax
Pengenalan Teknologi ajaxPengenalan Teknologi ajax
Pengenalan Teknologi ajax
 
jQuery's Secrets
jQuery's SecretsjQuery's Secrets
jQuery's Secrets
 
J query 01.07.2013
J query 01.07.2013J query 01.07.2013
J query 01.07.2013
 
Android Workshop 2013
Android Workshop 2013Android Workshop 2013
Android Workshop 2013
 
Jquery ajax
Jquery ajaxJquery ajax
Jquery ajax
 
Week 4 - jQuery + Ajax
Week 4 - jQuery + AjaxWeek 4 - jQuery + Ajax
Week 4 - jQuery + Ajax
 
ASP.NET AJAX - 20090916
ASP.NET AJAX - 20090916ASP.NET AJAX - 20090916
ASP.NET AJAX - 20090916
 

Similaire à Building Desktop RIAs With PHP And JavaScript

Building Desktop RIAs with JavaScript and PHP - ZendCon09
Building Desktop RIAs with JavaScript and PHP - ZendCon09Building Desktop RIAs with JavaScript and PHP - ZendCon09
Building Desktop RIAs with JavaScript and PHP - ZendCon09funkatron
 
Building Desktop RIAs with PHP, HTML & Javascript in AIR
Building Desktop RIAs with PHP, HTML & Javascript in AIRBuilding Desktop RIAs with PHP, HTML & Javascript in AIR
Building Desktop RIAs with PHP, HTML & Javascript in AIRfunkatron
 
Introduction to Google App Engine with Python
Introduction to Google App Engine with PythonIntroduction to Google App Engine with Python
Introduction to Google App Engine with PythonBrian Lyttle
 
Googleappengineintro 110410190620-phpapp01
Googleappengineintro 110410190620-phpapp01Googleappengineintro 110410190620-phpapp01
Googleappengineintro 110410190620-phpapp01Tony Frame
 
Building PHP Powered Android Applications
Building PHP Powered Android ApplicationsBuilding PHP Powered Android Applications
Building PHP Powered Android ApplicationsJohn Coggeshall
 
Open Source Web Technologies
Open Source Web TechnologiesOpen Source Web Technologies
Open Source Web TechnologiesAastha Sethi
 
Making Watir and Cucumber an efficient tool for Web UI Automation
Making Watir and Cucumber an efficient tool for Web UI AutomationMaking Watir and Cucumber an efficient tool for Web UI Automation
Making Watir and Cucumber an efficient tool for Web UI AutomationRuslan Strazhnyk
 
HTML5 - The Python Angle (PyCon Ireland 2010)
HTML5 - The Python Angle (PyCon Ireland 2010)HTML5 - The Python Angle (PyCon Ireland 2010)
HTML5 - The Python Angle (PyCon Ireland 2010)Kevin Gill
 
Modern JavaScript Talk
Modern JavaScript TalkModern JavaScript Talk
Modern JavaScript TalkDerek Binkley
 
Web II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side developmentWeb II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side developmentRandy Connolly
 
Building Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsBuilding Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsTroy Miles
 
DevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetDevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetAdil Mughal
 
Building Rich Applications with Appcelerator
Building Rich Applications with AppceleratorBuilding Rich Applications with Appcelerator
Building Rich Applications with AppceleratorMatt Raible
 
Flex and PHP For the Flash Folks
Flex and PHP For the Flash FolksFlex and PHP For the Flash Folks
Flex and PHP For the Flash Folks10n Software, LLC
 
PHP and Zend Framework on Windows
PHP and Zend Framework on WindowsPHP and Zend Framework on Windows
PHP and Zend Framework on WindowsShahar Evron
 
Building with JavaScript - write less by using the right tools
Building with JavaScript -  write less by using the right toolsBuilding with JavaScript -  write less by using the right tools
Building with JavaScript - write less by using the right toolsChristian Heilmann
 
Adobe AIR. NativeProcess. FFMPEG. Awesome.
Adobe AIR. NativeProcess. FFMPEG. Awesome.Adobe AIR. NativeProcess. FFMPEG. Awesome.
Adobe AIR. NativeProcess. FFMPEG. Awesome.Joseph Labrecque
 
Deview 2013 mobile browser internals and trends_20131022
Deview 2013 mobile browser internals and trends_20131022Deview 2013 mobile browser internals and trends_20131022
Deview 2013 mobile browser internals and trends_20131022NAVER D2
 
Node.js meetup 17.05.2017 ember.js - escape the javascript fatigue
Node.js meetup 17.05.2017   ember.js - escape the javascript fatigueNode.js meetup 17.05.2017   ember.js - escape the javascript fatigue
Node.js meetup 17.05.2017 ember.js - escape the javascript fatigueTobias Braner
 

Similaire à Building Desktop RIAs With PHP And JavaScript (20)

Building Desktop RIAs with JavaScript and PHP - ZendCon09
Building Desktop RIAs with JavaScript and PHP - ZendCon09Building Desktop RIAs with JavaScript and PHP - ZendCon09
Building Desktop RIAs with JavaScript and PHP - ZendCon09
 
Building Desktop RIAs with PHP, HTML & Javascript in AIR
Building Desktop RIAs with PHP, HTML & Javascript in AIRBuilding Desktop RIAs with PHP, HTML & Javascript in AIR
Building Desktop RIAs with PHP, HTML & Javascript in AIR
 
Introduction to Google App Engine with Python
Introduction to Google App Engine with PythonIntroduction to Google App Engine with Python
Introduction to Google App Engine with Python
 
Googleappengineintro 110410190620-phpapp01
Googleappengineintro 110410190620-phpapp01Googleappengineintro 110410190620-phpapp01
Googleappengineintro 110410190620-phpapp01
 
Building PHP Powered Android Applications
Building PHP Powered Android ApplicationsBuilding PHP Powered Android Applications
Building PHP Powered Android Applications
 
Open Source Web Technologies
Open Source Web TechnologiesOpen Source Web Technologies
Open Source Web Technologies
 
Making Watir and Cucumber an efficient tool for Web UI Automation
Making Watir and Cucumber an efficient tool for Web UI AutomationMaking Watir and Cucumber an efficient tool for Web UI Automation
Making Watir and Cucumber an efficient tool for Web UI Automation
 
HTML5 - The Python Angle (PyCon Ireland 2010)
HTML5 - The Python Angle (PyCon Ireland 2010)HTML5 - The Python Angle (PyCon Ireland 2010)
HTML5 - The Python Angle (PyCon Ireland 2010)
 
Modern JavaScript Talk
Modern JavaScript TalkModern JavaScript Talk
Modern JavaScript Talk
 
Web II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side developmentWeb II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side development
 
Building Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsBuilding Cross-Platform Mobile Apps
Building Cross-Platform Mobile Apps
 
DevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetDevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp Net
 
Building Rich Applications with Appcelerator
Building Rich Applications with AppceleratorBuilding Rich Applications with Appcelerator
Building Rich Applications with Appcelerator
 
Flex and PHP For the Flash Folks
Flex and PHP For the Flash FolksFlex and PHP For the Flash Folks
Flex and PHP For the Flash Folks
 
ODF Mashups
ODF MashupsODF Mashups
ODF Mashups
 
PHP and Zend Framework on Windows
PHP and Zend Framework on WindowsPHP and Zend Framework on Windows
PHP and Zend Framework on Windows
 
Building with JavaScript - write less by using the right tools
Building with JavaScript -  write less by using the right toolsBuilding with JavaScript -  write less by using the right tools
Building with JavaScript - write less by using the right tools
 
Adobe AIR. NativeProcess. FFMPEG. Awesome.
Adobe AIR. NativeProcess. FFMPEG. Awesome.Adobe AIR. NativeProcess. FFMPEG. Awesome.
Adobe AIR. NativeProcess. FFMPEG. Awesome.
 
Deview 2013 mobile browser internals and trends_20131022
Deview 2013 mobile browser internals and trends_20131022Deview 2013 mobile browser internals and trends_20131022
Deview 2013 mobile browser internals and trends_20131022
 
Node.js meetup 17.05.2017 ember.js - escape the javascript fatigue
Node.js meetup 17.05.2017   ember.js - escape the javascript fatigueNode.js meetup 17.05.2017   ember.js - escape the javascript fatigue
Node.js meetup 17.05.2017 ember.js - escape the javascript fatigue
 

Plus de funkatron

Building mobile apps with JavaScript and PHP
Building mobile apps with JavaScript and PHPBuilding mobile apps with JavaScript and PHP
Building mobile apps with JavaScript and PHPfunkatron
 
JavaScript for PHP Developers
JavaScript for PHP DevelopersJavaScript for PHP Developers
JavaScript for PHP Developersfunkatron
 
Building RIAs with CodeIgniter and JavaScript
Building RIAs with CodeIgniter and JavaScriptBuilding RIAs with CodeIgniter and JavaScript
Building RIAs with CodeIgniter and JavaScriptfunkatron
 
Secure PHP Development with Inspekt
Secure PHP Development with InspektSecure PHP Development with Inspekt
Secure PHP Development with Inspektfunkatron
 
JavaScript for PHP Developers
JavaScript for PHP DevelopersJavaScript for PHP Developers
JavaScript for PHP Developersfunkatron
 
Intro To Mvc Development In Php
Intro To Mvc Development In PhpIntro To Mvc Development In Php
Intro To Mvc Development In Phpfunkatron
 
Building Desktop RIAs with PHP, HTML & Javascript in AIR
Building Desktop RIAs with  PHP, HTML & Javascript  in AIRBuilding Desktop RIAs with  PHP, HTML & Javascript  in AIR
Building Desktop RIAs with PHP, HTML & Javascript in AIRfunkatron
 
Securing the PHP Environment with PHPSecInfo - OSCON 2008
Securing the PHP Environment with PHPSecInfo - OSCON 2008Securing the PHP Environment with PHPSecInfo - OSCON 2008
Securing the PHP Environment with PHPSecInfo - OSCON 2008funkatron
 
Securing the PHP Environment with PHPSecInfo
Securing the PHP Environment with PHPSecInfoSecuring the PHP Environment with PHPSecInfo
Securing the PHP Environment with PHPSecInfofunkatron
 

Plus de funkatron (9)

Building mobile apps with JavaScript and PHP
Building mobile apps with JavaScript and PHPBuilding mobile apps with JavaScript and PHP
Building mobile apps with JavaScript and PHP
 
JavaScript for PHP Developers
JavaScript for PHP DevelopersJavaScript for PHP Developers
JavaScript for PHP Developers
 
Building RIAs with CodeIgniter and JavaScript
Building RIAs with CodeIgniter and JavaScriptBuilding RIAs with CodeIgniter and JavaScript
Building RIAs with CodeIgniter and JavaScript
 
Secure PHP Development with Inspekt
Secure PHP Development with InspektSecure PHP Development with Inspekt
Secure PHP Development with Inspekt
 
JavaScript for PHP Developers
JavaScript for PHP DevelopersJavaScript for PHP Developers
JavaScript for PHP Developers
 
Intro To Mvc Development In Php
Intro To Mvc Development In PhpIntro To Mvc Development In Php
Intro To Mvc Development In Php
 
Building Desktop RIAs with PHP, HTML & Javascript in AIR
Building Desktop RIAs with  PHP, HTML & Javascript  in AIRBuilding Desktop RIAs with  PHP, HTML & Javascript  in AIR
Building Desktop RIAs with PHP, HTML & Javascript in AIR
 
Securing the PHP Environment with PHPSecInfo - OSCON 2008
Securing the PHP Environment with PHPSecInfo - OSCON 2008Securing the PHP Environment with PHPSecInfo - OSCON 2008
Securing the PHP Environment with PHPSecInfo - OSCON 2008
 
Securing the PHP Environment with PHPSecInfo
Securing the PHP Environment with PHPSecInfoSecuring the PHP Environment with PHPSecInfo
Securing the PHP Environment with PHPSecInfo
 

Dernier

DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 

Dernier (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

Building Desktop RIAs With PHP And JavaScript

  • 1. Building Desktop RIAs with PHP and JavaScript Ed Finkler • funkatron.com • @funkatron php|tek 09
  • 2. What to expect This is mainly a JavaScript talk Compare JS and PHP jQuery framework for JS examples 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 quot;localquot; apps
  • 4. Current web runtimes AIR (adobe.com/go/air) Titanium (titaniumapp.com) Palm webOS (developer.palm.com)
  • 5. We'll use AIR But others bear examination
  • 6. JavaScript in AIR Can use (almost) any available JS libs/frameworks No cross-domain restrictions security restrictions in app sandbox ( eval() ) Access AIR APIs Access standard Flash APIs Use compiled AS3 libs
  • 7. PHP vs JavaScript JavaScript is fundamentally different JS is a functional language closures first-order functions Object model is totally different
  • 8. PHP vs JavaScript Everything in JS is an object Arrays are not associative – objects serve as associative array equivalents No include/require statements available Event-driven model/asynchronous actions Further reading: – JavaScript: The Definitive Guide, David Flanagan – JavaScript: The Good Parts, Douglas Crockford
  • 9. 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 almost always asynchronous calls
  • 10. JavaScript frameworks Some stuff is a huge pain without the help of a framework Lots of choices Must play well with AIR eval usage gotchas
  • 11. jQuery pwnz yoo jQuery is teh awesome but you can use anything
  • 12. 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
  • 13. PHP talking to AIR 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)
  • 14. Example 1: PHP duz yer math Async calls using jQuery AJAX methods Communicate via JSON Flash Zee Cloud web server Webkit
  • 15. Example 2: PHP 'shops yer pics Uploading via Flash APIs JSON based communication Flash Zee Cloud web server Webkit
  • 16. Example 3: DearZend.com JSON based communication Desktop alternative to web front-end Flash Zee Cloud web server Webkit
  • 17. 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://titaniumapp.com/ Titanium Forums http://short.ie/d4ponk Searchatron Source http://short.ie/g9z6qt DearZend.com source http://github.com/funkatron/dearzend-server http://github.com/funkatron/dearzend-client