June 7th, 2013
www.fokkezb.nl
Titanium
FOKKE
ZANDBERGEN
• What is native?
• HTML5 vs native
• Titanium
• Alloy Framework
• Appcelerator Platform
• Summary
• Q&A
Titanium
What is native?
The myth of native languages
“Applications must be originally written in
Objective-C, C, C++, or JavaScript as executed
by the iPhone OS WebKit engine”
- iPhone OS 4 beta proposed license (2010)
C#
C
C++
Objective-C
JavaScript
Ruby Python
Lua
Scheme
Lisp
Smalltalk
Haskell
ActionScript
.NET languages
ANY language compiled to ARM objects
ANY language you write a compiled interpreter for
QT
What is native?
The myth of compiled languages
Would you call these inferior?
https://github.com/languages
HTML5 vs Native
!= interpreted
PHP
HTML/JS/CSS
output
Machine
compilation
C
interpretation
input
C++
Machine
compilation
output
UI
HTML5 vs Native
== web-in-an-app
?
UI
output
Machine
compilation
Objective-C
interpretation
HTML5 vs Native
== web-in-an-app
?
UI
output
Machine
compilation
Objective-C
interpretation
input
Objective-C
Machine
compilation
output
UI
HTML/JS/CSS
HTML5 vs Native
Compared
HTML5 Native
Web UI Native UI
Performance bottlenecks Accelerated performance
Open data Secured data
Slow standards bodies Thousands of API’s
No monetization model One-Click-Buy
200+ Browser versions iOS + 28 Android versions
Single code base Multiple code base
Huge / Cheap expertise Scarce / Expensive expertise
Direct distribution Indirect distribution
~ 75.000 apps ~ 1.200.000 apps
What if...
Best of Both?
Titanium
= native
JavaScript
UI
output
Machine
compilation
Objective-C / Java
interpretation
100%
NATIVE
Titanium
Facts
• Multi-platform
iOS, Android, Blackberry, Tizen,
MobileWeb, Windows
• Native UI
• Thousands of interpretable API’s
• Custom API modules marketplace
• Single codebase
• Titanium Studio IDE
• Familiar JavaScript
• 465.000+ developers
• 185+ countries
• 55.000+ apps in public stores
• 136.000.000+ devices
• NBC, PWC, Mitsubishi, Reuters
• imgZine, Snowciety, WappZapp
Titanium
Code
var window = Ti.UI.createWindow({
backgroundColor: “white”
});
var label = Ti.UI.createLabel({
color: “black”
});
label.addEventListener(“click”,
function() {
require(“windowTwo”);
}
);
window.add(label);
window.open();
It gets...
Even Better!
Alloy Framework
Benefits
• Write up to 50% less code
• Re-style apps using themes
• Re-use code using widgets
• Bind abstracted data models
• Separate concerns, e.g. design
Compilation
• Cleans conditional code & assets
• Compiles XML and TSS to JS
• Compresses JS
• Fully integrated in Studio
• Widget marketplace coming
Alloy Framework
<Alloy>
<Window>
<Label onClick=”open”>Hello World</Label>
</Window>
</Alloy>
“Window”: {
backgroundColor: “white”
}
“Label”: {
color: “black”
}
function open() {
require(“windowTwo”);
}
$.index.open();
views/index.xml
controllers/index.jsstyles/index.tss
But wait...
There is more!
Appcelerator Platform
Mobile first
Appcelerator Platform
Compared
Titanium Appcelerator
SDK SDK
Enterprise Connectors
Marketplace Marketplace
Alloy Alloy
Titanium Studio Appcelerator Studio
TiShadow LiveView / Code Analyzer / Performance Profiler
Automated Tests / Monitoring
Flurry / Google Analytics
Titanium Cloud Appcelerator Cloud
5M push / 5M API / Client SSL / NodeJS > 10M push / 10M API / Server SSL / NodeJS
Best Effort / Community Support 99+ SLA / Live Support
http://www.appcelerator.com/plans-pricing/
Appcelerator Platform
Cloud
5+
MLN
Appcelerator
Platfrom
Titanium
Alloy
Summary
ACS
FREE
Test
Analytics
Support
Questions?
mail@FokkeZB.nl
www.FokkeZB.nl
@FokkeZB
www.amsterdam-titanium.nl
meeting every 2 months
talks • discussion • beer

Titanium #MDS13