SlideShare a Scribd company logo
Ben Ramsey • Zend/PHP Conference & Expo • 2 Nov 2010
Desktop Apps with PHP and Titanium
What Is Titanium?
Desktop Apps with PHP and Titanium • Ben Ramsey
Four main parts…
‣HTML/CSS/JavaScript
‣APIs
‣Language-OS bridge
‣Run-time shell
5
$9M in funding from
Sierra Ventures and eBay!
Using Titanium Developer
Desktop Apps with PHP and Titanium • Ben Ramsey
Installation on Linux
‣There is a known issue with the GTK libraries for Titanium Developer
on Linux
‣Until there is a fix, do this after installing Titanium Developer:
‣cd ~/.titanium/runtime/linux/1.0.0
‣rm libgobject* libgthread* libglib* libgio*
19
“Hello, World!”
<html>
<head>
<title>Hello, World!</title>
</head>
<body>
<h1>Hello, World!</h1>
</body>
</html>
var mainMenu = Titanium.UI.createMenu();
mainMenu.appendItem(Titanium.UI.createMenuItem("File"));
var menu = Titanium.UI.createMenu();
menu.appendItem(Titanium.UI.createMenuItem("Quit", function() {
if (confirm("Are you sure you want to quit?")) {
Titanium.App.exit();
}
}));
mainMenu.getItemAt(0).setSubmenu(menu);
Titanium.UI.currentWindow.menu = mainMenu;
Desktop Apps with PHP and Titanium • Ben Ramsey
Titanium has APIs!
‣API
‣Analytics
‣App
‣Codec
‣Database
‣Desktop
‣Filesystem
‣JSON
‣Media
‣Network
‣Notification
‣Platform
‣Process
‣UI
‣UpdateManager
‣Worker
27
PHP in Titanium
<script type="text/php">
// PHP code goes here
</script>
<script type="text/javascript">
var heading = document.getElementById("title");
heading.innerHTML = "Hello, World!";
</script>
<script type="text/php">
$heading = $document->getElementById("title");
$heading->innerHTML = "Hello, World!";
</script>
<html>
<head>
<title>PHP Info</title>
<script type="text/php">
date_default_timezone_set('America/Chicago');
ini_set('default_charset', 'utf8');
ini_set('display_errors', 'Off');
function getPhpInfo() {
ob_start();
phpinfo();
return ob_get_clean();
}
</script>
</head>
<body style="background-color: white; padding: 10px;">
<script type="text/php">
$document->write('<pre>' . getPhpInfo() . '</pre>');
</script>
</body>
</html>
Desktop Apps with PHP and Titanium • Ben Ramsey
PHP caveats
‣echo does not work as expected
‣Titanium state transitions (links) do not send requests
‣Pre-processed scripts (.php) are processed at compile/build time
‣Cannot inject classes defined in .php into runtime code with include/
require
36
The client-server
relationship does not exist.
Planet PHP Demo
Wrapping up…
Desktop Apps with PHP and Titanium • Ben Ramsey
Questions?
‣I blog at benramsey.com.
‣I tweet at @ramsey.
‣Please rate this presentation at joind.in/2259.
‣Get the source code for my examples at GitHub.
‣Find out more about Titanium at appcelerator.com.
‣My company is Moontoast. Check us out at moontoast.com. Follow us
on Twitter and like us on Facebook.
40
Desktop Apps with PHP and Titanium
Copyright © 2010 Ben Ramsey. Some rights reserved.
Presented on November 2, 2010 at Zend/PHP Conference
and Expo, Hyatt Regency Hotel, Santa Clara, CA.
This work is licensed under a Creative Commons Attribution-
Noncommercial-No Derivative Works 3.0 United States
License.
For uses not covered under this license, please contact the
author.
Desktop Apps with PHP and Titanium • Ben Ramsey
Photo Credits
‣ Titan-crystal bar from Wikimedia Commons
‣ Titanium-cylinder from Wikimedia Commons
‣ Apollo 17 full Earth photograph from NASA/Goddard Space Flight Center Scientific Visualization
Studio
‣ titanium cylinder, GRADE 2 quality from Wikimedia Commons
‣ Surface of a compressed cylinder of titanium from High-Res Images of Chemical Elements
‣ Guggenheim Museum Bilbao from Wikimedia Commons
42

More Related Content

What's hot

Practical PHP Deployment with Jenkins
Practical PHP Deployment with JenkinsPractical PHP Deployment with Jenkins
Practical PHP Deployment with Jenkins
Adam Culp
 
API All the Things!
API All the Things!API All the Things!
API All the Things!
David Stockton
 
Testing Your Code as Part of an Industrial Grade Workflow
Testing Your Code as Part of an Industrial Grade WorkflowTesting Your Code as Part of an Industrial Grade Workflow
Testing Your Code as Part of an Industrial Grade Workflow
Pantheon
 
Internet Explorer 9
Internet Explorer 9Internet Explorer 9
Internet Explorer 9pietrobr
 
Integração Contínua com PHPCI
Integração Contínua com PHPCIIntegração Contínua com PHPCI
Integração Contínua com PHPCI
Thiago Paes
 
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Pantheon
 
XMLPasteの紹介
XMLPasteの紹介XMLPasteの紹介
XMLPasteの紹介
Atsushi Matsuo
 
Quick & Dirty Wordpress Customization
Quick & Dirty Wordpress CustomizationQuick & Dirty Wordpress Customization
Quick & Dirty Wordpress Customization
Magnetic Ideas, LLC
 
Building Big on the Web
Building Big on the WebBuilding Big on the Web
Building Big on the Web
Cal Henderson
 
Paving the way with Jakarta EE and apache TomEE at cloudconferenceday
Paving the way with Jakarta EE and apache TomEE at cloudconferencedayPaving the way with Jakarta EE and apache TomEE at cloudconferenceday
Paving the way with Jakarta EE and apache TomEE at cloudconferenceday
César Hernández
 
Azure Functions
Azure FunctionsAzure Functions
Azure Functions
Rodolfo Finochietti
 
Php test fest
Php test festPhp test fest
Php test fest
Barry O Sullivan
 
From HTML5 to Hardware - Simonyi Conference Budapest April 15
From HTML5 to Hardware - Simonyi Conference Budapest April 15From HTML5 to Hardware - Simonyi Conference Budapest April 15
From HTML5 to Hardware - Simonyi Conference Budapest April 15
Jan Jongboom
 
JAZOON'13 - Andres Almiray - Rocket Propelled Java
JAZOON'13 - Andres Almiray - Rocket Propelled JavaJAZOON'13 - Andres Almiray - Rocket Propelled Java
JAZOON'13 - Andres Almiray - Rocket Propelled Javajazoon13
 
Make the most of twig
Make the most of twigMake the most of twig
Make the most of twig
Andrew Yatsenko
 
Developing mobile apps with f sharp
Developing mobile apps with f sharpDeveloping mobile apps with f sharp
Developing mobile apps with f sharpGustavo Guerra
 
Launching Learning Content with xAPI
Launching Learning Content with xAPILaunching Learning Content with xAPI
Launching Learning Content with xAPI
HT2 Labs
 
10/29 Austin Ansible MeetUp - AnsibleFest Talk & Extending Ansible
10/29 Austin Ansible MeetUp - AnsibleFest Talk & Extending Ansible10/29 Austin Ansible MeetUp - AnsibleFest Talk & Extending Ansible
10/29 Austin Ansible MeetUp - AnsibleFest Talk & Extending Ansible
tylerturk
 
On the Move, Migrations Made Simple
On the Move, Migrations Made SimpleOn the Move, Migrations Made Simple
On the Move, Migrations Made Simple
Jonathan Perlman
 
Tech talk: PHP
Tech talk: PHPTech talk: PHP
Tech talk: PHP
Jen Wei Lee
 

What's hot (20)

Practical PHP Deployment with Jenkins
Practical PHP Deployment with JenkinsPractical PHP Deployment with Jenkins
Practical PHP Deployment with Jenkins
 
API All the Things!
API All the Things!API All the Things!
API All the Things!
 
Testing Your Code as Part of an Industrial Grade Workflow
Testing Your Code as Part of an Industrial Grade WorkflowTesting Your Code as Part of an Industrial Grade Workflow
Testing Your Code as Part of an Industrial Grade Workflow
 
Internet Explorer 9
Internet Explorer 9Internet Explorer 9
Internet Explorer 9
 
Integração Contínua com PHPCI
Integração Contínua com PHPCIIntegração Contínua com PHPCI
Integração Contínua com PHPCI
 
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
Creating a Smooth Development Workflow for High-Quality Modular Open-Source P...
 
XMLPasteの紹介
XMLPasteの紹介XMLPasteの紹介
XMLPasteの紹介
 
Quick & Dirty Wordpress Customization
Quick & Dirty Wordpress CustomizationQuick & Dirty Wordpress Customization
Quick & Dirty Wordpress Customization
 
Building Big on the Web
Building Big on the WebBuilding Big on the Web
Building Big on the Web
 
Paving the way with Jakarta EE and apache TomEE at cloudconferenceday
Paving the way with Jakarta EE and apache TomEE at cloudconferencedayPaving the way with Jakarta EE and apache TomEE at cloudconferenceday
Paving the way with Jakarta EE and apache TomEE at cloudconferenceday
 
Azure Functions
Azure FunctionsAzure Functions
Azure Functions
 
Php test fest
Php test festPhp test fest
Php test fest
 
From HTML5 to Hardware - Simonyi Conference Budapest April 15
From HTML5 to Hardware - Simonyi Conference Budapest April 15From HTML5 to Hardware - Simonyi Conference Budapest April 15
From HTML5 to Hardware - Simonyi Conference Budapest April 15
 
JAZOON'13 - Andres Almiray - Rocket Propelled Java
JAZOON'13 - Andres Almiray - Rocket Propelled JavaJAZOON'13 - Andres Almiray - Rocket Propelled Java
JAZOON'13 - Andres Almiray - Rocket Propelled Java
 
Make the most of twig
Make the most of twigMake the most of twig
Make the most of twig
 
Developing mobile apps with f sharp
Developing mobile apps with f sharpDeveloping mobile apps with f sharp
Developing mobile apps with f sharp
 
Launching Learning Content with xAPI
Launching Learning Content with xAPILaunching Learning Content with xAPI
Launching Learning Content with xAPI
 
10/29 Austin Ansible MeetUp - AnsibleFest Talk & Extending Ansible
10/29 Austin Ansible MeetUp - AnsibleFest Talk & Extending Ansible10/29 Austin Ansible MeetUp - AnsibleFest Talk & Extending Ansible
10/29 Austin Ansible MeetUp - AnsibleFest Talk & Extending Ansible
 
On the Move, Migrations Made Simple
On the Move, Migrations Made SimpleOn the Move, Migrations Made Simple
On the Move, Migrations Made Simple
 
Tech talk: PHP
Tech talk: PHPTech talk: PHP
Tech talk: PHP
 

Similar to Desktop Apps with PHP and Titanium (ZendCon 2010)

Titanium meetup Tokyo #13
Titanium meetup Tokyo #13Titanium meetup Tokyo #13
Titanium meetup Tokyo #13
Kota Iguchi
 
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
funkatron
 
TiConf EU 2014
TiConf EU 2014TiConf EU 2014
TiConf EU 2014
Ingo Muschenetz
 
Native Mobile Application Using Open Source
Native Mobile Application Using Open SourceNative Mobile Application Using Open Source
Native Mobile Application Using Open SourceAxway Appcelerator
 
OSCON Titanium Tutorial
OSCON Titanium TutorialOSCON Titanium Tutorial
OSCON Titanium Tutorial
Kevin Whinnery
 
Mongodb and Totsy - E-commerce Case Study
Mongodb and Totsy - E-commerce Case StudyMongodb and Totsy - E-commerce Case Study
Mongodb and Totsy - E-commerce Case Study
Mitch Pirtle
 
Updates on webSpoon and other innovations from Hitachi R&D
Updates on webSpoon and other innovations from Hitachi R&DUpdates on webSpoon and other innovations from Hitachi R&D
Updates on webSpoon and other innovations from Hitachi R&D
Hiromu Hota
 
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015
Adam Paxton
 
Build a chatroom!
Build a chatroom!Build a chatroom!
Build a chatroom!
SheilaJimenezMorejon
 
Titanium #MDS13
Titanium #MDS13Titanium #MDS13
Titanium #MDS13
Fokke Zandbergen
 
Story of A Thousand Birds
Story of A Thousand BirdsStory of A Thousand Birds
Story of A Thousand Birds
Lim Chee Aun
 
Titanium Desktop Intro
Titanium Desktop IntroTitanium Desktop Intro
Titanium Desktop Intro
Marshall Culpepper
 
A Tale of Two Toolkits
A Tale of Two ToolkitsA Tale of Two Toolkits
A Tale of Two Toolkits
Zend by Rogue Wave Software
 
Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024
Henry Schreiner
 
Why I Love TorqueBox (And Why You Will Too)
Why I Love TorqueBox (And Why You Will Too)Why I Love TorqueBox (And Why You Will Too)
Why I Love TorqueBox (And Why You Will Too)
benbrowning
 
Introduction to Appcelerator Titanium
Introduction to Appcelerator TitaniumIntroduction to Appcelerator Titanium
Introduction to Appcelerator Titanium
Adam Paxton
 
Web to App:作業系統革命 Firefox OS
Web to App:作業系統革命  Firefox OSWeb to App:作業系統革命  Firefox OS
Web to App:作業系統革命 Firefox OS
Veck Hsiao
 
Appcelerator Titanium Intro
Appcelerator Titanium IntroAppcelerator Titanium Intro
Appcelerator Titanium IntroNicholas Jansma
 
Getting Started with Titanium
Getting Started with TitaniumGetting Started with Titanium
Getting Started with Titanium
Kevin Whinnery
 

Similar to Desktop Apps with PHP and Titanium (ZendCon 2010) (20)

Titanium meetup Tokyo #13
Titanium meetup Tokyo #13Titanium meetup Tokyo #13
Titanium meetup Tokyo #13
 
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
 
TiConf EU 2014
TiConf EU 2014TiConf EU 2014
TiConf EU 2014
 
Native Mobile Application Using Open Source
Native Mobile Application Using Open SourceNative Mobile Application Using Open Source
Native Mobile Application Using Open Source
 
OSCON Titanium Tutorial
OSCON Titanium TutorialOSCON Titanium Tutorial
OSCON Titanium Tutorial
 
Mongodb and Totsy - E-commerce Case Study
Mongodb and Totsy - E-commerce Case StudyMongodb and Totsy - E-commerce Case Study
Mongodb and Totsy - E-commerce Case Study
 
Updates on webSpoon and other innovations from Hitachi R&D
Updates on webSpoon and other innovations from Hitachi R&DUpdates on webSpoon and other innovations from Hitachi R&D
Updates on webSpoon and other innovations from Hitachi R&D
 
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015
 
Build a chatroom!
Build a chatroom!Build a chatroom!
Build a chatroom!
 
Titanium #MDS13
Titanium #MDS13Titanium #MDS13
Titanium #MDS13
 
Story of A Thousand Birds
Story of A Thousand BirdsStory of A Thousand Birds
Story of A Thousand Birds
 
Titanium Desktop Intro
Titanium Desktop IntroTitanium Desktop Intro
Titanium Desktop Intro
 
A Tale of Two Toolkits
A Tale of Two ToolkitsA Tale of Two Toolkits
A Tale of Two Toolkits
 
Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024
 
Why I Love TorqueBox (And Why You Will Too)
Why I Love TorqueBox (And Why You Will Too)Why I Love TorqueBox (And Why You Will Too)
Why I Love TorqueBox (And Why You Will Too)
 
Introduction to Appcelerator Titanium
Introduction to Appcelerator TitaniumIntroduction to Appcelerator Titanium
Introduction to Appcelerator Titanium
 
CCU_Speech
CCU_SpeechCCU_Speech
CCU_Speech
 
Web to App:作業系統革命 Firefox OS
Web to App:作業系統革命  Firefox OSWeb to App:作業系統革命  Firefox OS
Web to App:作業系統革命 Firefox OS
 
Appcelerator Titanium Intro
Appcelerator Titanium IntroAppcelerator Titanium Intro
Appcelerator Titanium Intro
 
Getting Started with Titanium
Getting Started with TitaniumGetting Started with Titanium
Getting Started with Titanium
 

More from Ben Ramsey

Api Versioning
Api VersioningApi Versioning
Api VersioningBen Ramsey
 
Grokking REST (ZendCon 2010)
Grokking REST (ZendCon 2010)Grokking REST (ZendCon 2010)
Grokking REST (ZendCon 2010)
Ben Ramsey
 
Introduction to AtomPub Web Services
Introduction to AtomPub Web ServicesIntroduction to AtomPub Web Services
Introduction to AtomPub Web Services
Ben Ramsey
 
Caching with Memcached and APC
Caching with Memcached and APCCaching with Memcached and APC
Caching with Memcached and APC
Ben Ramsey
 
Give Your Site a Boost with Memcache
Give Your Site a Boost with MemcacheGive Your Site a Boost with Memcache
Give Your Site a Boost with Memcache
Ben Ramsey
 
Hidden Gems in HTTP
Hidden Gems in HTTPHidden Gems in HTTP
Hidden Gems in HTTP
Ben Ramsey
 
Grokking the REST Architectural Style
Grokking the REST Architectural StyleGrokking the REST Architectural Style
Grokking the REST Architectural Style
Ben Ramsey
 
Making the Most of HTTP In Your Apps
Making the Most of HTTP In Your AppsMaking the Most of HTTP In Your Apps
Making the Most of HTTP In Your Apps
Ben Ramsey
 
You Look Like You Could Use Some REST!
You Look Like You Could Use Some REST!You Look Like You Could Use Some REST!
You Look Like You Could Use Some REST!
Ben Ramsey
 
Distribution and Publication With Atom Web Services
Distribution and Publication With Atom Web ServicesDistribution and Publication With Atom Web Services
Distribution and Publication With Atom Web Services
Ben Ramsey
 
Distribution and Publication With Atom Web Services
Distribution and Publication With Atom Web ServicesDistribution and Publication With Atom Web Services
Distribution and Publication With Atom Web Services
Ben Ramsey
 

More from Ben Ramsey (11)

Api Versioning
Api VersioningApi Versioning
Api Versioning
 
Grokking REST (ZendCon 2010)
Grokking REST (ZendCon 2010)Grokking REST (ZendCon 2010)
Grokking REST (ZendCon 2010)
 
Introduction to AtomPub Web Services
Introduction to AtomPub Web ServicesIntroduction to AtomPub Web Services
Introduction to AtomPub Web Services
 
Caching with Memcached and APC
Caching with Memcached and APCCaching with Memcached and APC
Caching with Memcached and APC
 
Give Your Site a Boost with Memcache
Give Your Site a Boost with MemcacheGive Your Site a Boost with Memcache
Give Your Site a Boost with Memcache
 
Hidden Gems in HTTP
Hidden Gems in HTTPHidden Gems in HTTP
Hidden Gems in HTTP
 
Grokking the REST Architectural Style
Grokking the REST Architectural StyleGrokking the REST Architectural Style
Grokking the REST Architectural Style
 
Making the Most of HTTP In Your Apps
Making the Most of HTTP In Your AppsMaking the Most of HTTP In Your Apps
Making the Most of HTTP In Your Apps
 
You Look Like You Could Use Some REST!
You Look Like You Could Use Some REST!You Look Like You Could Use Some REST!
You Look Like You Could Use Some REST!
 
Distribution and Publication With Atom Web Services
Distribution and Publication With Atom Web ServicesDistribution and Publication With Atom Web Services
Distribution and Publication With Atom Web Services
 
Distribution and Publication With Atom Web Services
Distribution and Publication With Atom Web ServicesDistribution and Publication With Atom Web Services
Distribution and Publication With Atom Web Services
 

Recently uploaded

FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 

Desktop Apps with PHP and Titanium (ZendCon 2010)

  • 1. Ben Ramsey • Zend/PHP Conference & Expo • 2 Nov 2010 Desktop Apps with PHP and Titanium
  • 3.
  • 4.
  • 5. Desktop Apps with PHP and Titanium • Ben Ramsey Four main parts… ‣HTML/CSS/JavaScript ‣APIs ‣Language-OS bridge ‣Run-time shell 5
  • 6.
  • 7.
  • 8.
  • 9. $9M in funding from Sierra Ventures and eBay!
  • 10.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19. Desktop Apps with PHP and Titanium • Ben Ramsey Installation on Linux ‣There is a known issue with the GTK libraries for Titanium Developer on Linux ‣Until there is a fix, do this after installing Titanium Developer: ‣cd ~/.titanium/runtime/linux/1.0.0 ‣rm libgobject* libgthread* libglib* libgio* 19
  • 21.
  • 23.
  • 24.
  • 25. var mainMenu = Titanium.UI.createMenu(); mainMenu.appendItem(Titanium.UI.createMenuItem("File")); var menu = Titanium.UI.createMenu(); menu.appendItem(Titanium.UI.createMenuItem("Quit", function() { if (confirm("Are you sure you want to quit?")) { Titanium.App.exit(); } })); mainMenu.getItemAt(0).setSubmenu(menu); Titanium.UI.currentWindow.menu = mainMenu;
  • 26.
  • 27. Desktop Apps with PHP and Titanium • Ben Ramsey Titanium has APIs! ‣API ‣Analytics ‣App ‣Codec ‣Database ‣Desktop ‣Filesystem ‣JSON ‣Media ‣Network ‣Notification ‣Platform ‣Process ‣UI ‣UpdateManager ‣Worker 27
  • 28.
  • 29.
  • 31. <script type="text/php"> // PHP code goes here </script>
  • 32. <script type="text/javascript"> var heading = document.getElementById("title"); heading.innerHTML = "Hello, World!"; </script>
  • 33. <script type="text/php"> $heading = $document->getElementById("title"); $heading->innerHTML = "Hello, World!"; </script>
  • 34.
  • 35. <html> <head> <title>PHP Info</title> <script type="text/php"> date_default_timezone_set('America/Chicago'); ini_set('default_charset', 'utf8'); ini_set('display_errors', 'Off'); function getPhpInfo() { ob_start(); phpinfo(); return ob_get_clean(); } </script> </head> <body style="background-color: white; padding: 10px;"> <script type="text/php"> $document->write('<pre>' . getPhpInfo() . '</pre>'); </script> </body> </html>
  • 36. Desktop Apps with PHP and Titanium • Ben Ramsey PHP caveats ‣echo does not work as expected ‣Titanium state transitions (links) do not send requests ‣Pre-processed scripts (.php) are processed at compile/build time ‣Cannot inject classes defined in .php into runtime code with include/ require 36
  • 40. Desktop Apps with PHP and Titanium • Ben Ramsey Questions? ‣I blog at benramsey.com. ‣I tweet at @ramsey. ‣Please rate this presentation at joind.in/2259. ‣Get the source code for my examples at GitHub. ‣Find out more about Titanium at appcelerator.com. ‣My company is Moontoast. Check us out at moontoast.com. Follow us on Twitter and like us on Facebook. 40
  • 41. Desktop Apps with PHP and Titanium Copyright © 2010 Ben Ramsey. Some rights reserved. Presented on November 2, 2010 at Zend/PHP Conference and Expo, Hyatt Regency Hotel, Santa Clara, CA. This work is licensed under a Creative Commons Attribution- Noncommercial-No Derivative Works 3.0 United States License. For uses not covered under this license, please contact the author.
  • 42. Desktop Apps with PHP and Titanium • Ben Ramsey Photo Credits ‣ Titan-crystal bar from Wikimedia Commons ‣ Titanium-cylinder from Wikimedia Commons ‣ Apollo 17 full Earth photograph from NASA/Goddard Space Flight Center Scientific Visualization Studio ‣ titanium cylinder, GRADE 2 quality from Wikimedia Commons ‣ Surface of a compressed cylinder of titanium from High-Res Images of Chemical Elements ‣ Guggenheim Museum Bilbao from Wikimedia Commons 42