SlideShare uma empresa Scribd logo
1 de 42
Baixar para ler offline
Ben Ramsey • Zend/PHP Conference & Expo • 2 Nov 2010
Desktop Apps with PHP and Titanium
What Is Titanium?
Desktop Apps with PHP and Titanium (ZendCon 2010)
Desktop Apps with PHP and Titanium (ZendCon 2010)
Desktop Apps with PHP and Titanium • Ben Ramsey
Four main parts…
‣HTML/CSS/JavaScript
‣APIs
‣Language-OS bridge
‣Run-time shell
5
Desktop Apps with PHP and Titanium (ZendCon 2010)
Desktop Apps with PHP and Titanium (ZendCon 2010)
Desktop Apps with PHP and Titanium (ZendCon 2010)
$9M in funding from
Sierra Ventures and eBay!
Desktop Apps with PHP and Titanium (ZendCon 2010)
Using Titanium Developer
Desktop Apps with PHP and Titanium (ZendCon 2010)
Desktop Apps with PHP and Titanium (ZendCon 2010)
Desktop Apps with PHP and Titanium (ZendCon 2010)
Desktop Apps with PHP and Titanium (ZendCon 2010)
Desktop Apps with PHP and Titanium (ZendCon 2010)
Desktop Apps with PHP and Titanium (ZendCon 2010)
Desktop Apps with PHP and Titanium (ZendCon 2010)
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!”
Desktop Apps with PHP and Titanium (ZendCon 2010)
<html>
<head>
<title>Hello, World!</title>
</head>
<body>
<h1>Hello, World!</h1>
</body>
</html>
Desktop Apps with PHP and Titanium (ZendCon 2010)
Desktop Apps with PHP and Titanium (ZendCon 2010)
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 (ZendCon 2010)
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
Desktop Apps with PHP and Titanium (ZendCon 2010)
Desktop Apps with PHP and Titanium (ZendCon 2010)
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>
Desktop Apps with PHP and Titanium (ZendCon 2010)
<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

Mais conteúdo relacionado

Mais procurados

Practical PHP Deployment with Jenkins
Practical PHP Deployment with JenkinsPractical PHP Deployment with Jenkins
Practical PHP Deployment with JenkinsAdam Culp
 
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 WorkflowPantheon
 
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 PHPCIThiago 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
 
Quick & Dirty Wordpress Customization
Quick & Dirty Wordpress CustomizationQuick & Dirty Wordpress Customization
Quick & Dirty Wordpress CustomizationMagnetic Ideas, LLC
 
Building Big on the Web
Building Big on the WebBuilding Big on the Web
Building Big on the WebCal 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 cloudconferencedayCésar Hernández
 
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 15Jan 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
 
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 xAPIHT2 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 Ansibletylerturk
 
On the Move, Migrations Made Simple
On the Move, Migrations Made SimpleOn the Move, Migrations Made Simple
On the Move, Migrations Made SimpleJonathan Perlman
 

Mais procurados (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
 

Semelhante a Desktop Apps with PHP and Titanium (ZendCon 2010)

Titanium meetup Tokyo #13
Titanium meetup Tokyo #13Titanium meetup Tokyo #13
Titanium meetup Tokyo #13Kota 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 - ZendCon09funkatron
 
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 TutorialKevin 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 StudyMitch 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&DHiromu 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 2015Adam Paxton
 
Story of A Thousand Birds
Story of A Thousand BirdsStory of A Thousand Birds
Story of A Thousand BirdsLim Chee Aun
 
Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024Software Quality Assurance Tooling - Wintersession 2024
Software Quality Assurance Tooling - Wintersession 2024Henry 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 TitaniumAdam Paxton
 
Web to App:作業系統革命 Firefox OS
Web to App:作業系統革命  Firefox OSWeb to App:作業系統革命  Firefox OS
Web to App:作業系統革命 Firefox OSVeck 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 TitaniumKevin Whinnery
 

Semelhante a 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
 
Web to App:作業系統革命 Firefox OS
Web to App:作業系統革命  Firefox OSWeb to App:作業系統革命  Firefox OS
Web to App:作業系統革命 Firefox OS
 
CCU_Speech
CCU_SpeechCCU_Speech
CCU_Speech
 
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
 

Mais de 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 ServicesBen Ramsey
 
Caching with Memcached and APC
Caching with Memcached and APCCaching with Memcached and APC
Caching with Memcached and APCBen 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 MemcacheBen Ramsey
 
Hidden Gems in HTTP
Hidden Gems in HTTPHidden Gems in HTTP
Hidden Gems in HTTPBen Ramsey
 
Grokking the REST Architectural Style
Grokking the REST Architectural StyleGrokking the REST Architectural Style
Grokking the REST Architectural StyleBen 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 AppsBen 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 ServicesBen 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 ServicesBen Ramsey
 

Mais de 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
 

Último

UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
NIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopNIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopBachir Benyammi
 
Introduction to Quantum Computing
Introduction to Quantum ComputingIntroduction to Quantum Computing
Introduction to Quantum ComputingGDSC PJATK
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Commit University
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IES VE
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdfPedro Manuel
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.YounusS2
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaborationbruanjhuli
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureEric D. Schabell
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6DianaGray10
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...DianaGray10
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfDaniel Santiago Silva Capera
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1DianaGray10
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxGDSC PJATK
 
Digital magic. A small project for controlling smart light bulbs.
Digital magic. A small project for controlling smart light bulbs.Digital magic. A small project for controlling smart light bulbs.
Digital magic. A small project for controlling smart light bulbs.francesco barbera
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8DianaGray10
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Adtran
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7DianaGray10
 
GenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation IncGenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation IncObject Automation
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostMatt Ray
 

Último (20)

UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
NIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopNIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 Workshop
 
Introduction to Quantum Computing
Introduction to Quantum ComputingIntroduction to Quantum Computing
Introduction to Quantum Computing
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdf
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability Adventure
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptx
 
Digital magic. A small project for controlling smart light bulbs.
Digital magic. A small project for controlling smart light bulbs.Digital magic. A small project for controlling smart light bulbs.
Digital magic. A small project for controlling smart light bulbs.
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7
 
GenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation IncGenAI and AI GCC State of AI_Object Automation Inc
GenAI and AI GCC State of AI_Object Automation Inc
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
 

Desktop Apps with PHP and Titanium (ZendCon 2010)

  • 1. Ben Ramsey • Zend/PHP Conference & Expo • 2 Nov 2010 Desktop Apps with PHP and Titanium
  • 5. Desktop Apps with PHP and Titanium • Ben Ramsey Four main parts… ‣HTML/CSS/JavaScript ‣APIs ‣Language-OS bridge ‣Run-time shell 5
  • 9. $9M in funding from Sierra Ventures and eBay!
  • 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
  • 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;
  • 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
  • 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>
  • 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