SlideShare a Scribd company logo
Cross-Platform Native App
ontwikkeling met Appcelerator
De Haagse Hogeschool

15 maart 2015
Fokke Zandbergen

@FokkeZB
Fokke Zandbergen
Developer Evangelist
@FokkeZB
Agenda
• Operation Information Overload (~45m)
• Pauze (15m)
• From Zero to App (tot 20:45)
Operation Information Overload
• Waarom Cross-Platform?
• Waarom Native?
• Wie is Appcelerator?
• Hoe werkt Titanium?
• Wat heeft Elon Musk’s Hyperloop ermee te maken?
• Hoe werkt Alloy?
Waarom

Cross-Platform?
Omdat je je zelden tot één platform kunt beperken
Omdat er niet zoiets bestaat als één platform
1.0 1.1 1.5 1.6 2.0 2.0.1 2.1 2.2 2.3-2.3.2 2.3.3-2.3.7 3.0
3.1 3.2 4.0-4.0.2 4.0.3-4.04 4.1 4.2 4.3 4.4 5.0 5.1
2011 2012 2013 2014 2015
0%
20%
40%
60%
80%
100%
The white line shows the market share of the leading API level at any time
De white line shows the market share

of the leading API level at any time
Maart 2016

developer.apple.com
Omdat je te maken hebt met duizenden type devices
Per-platform ontwikkeling
!Product Management
Team
Team
Team
Cross-platform ontwikkeling
!Product Management Team
Waarom Native?
Wat betekent “Native” eigenlijk?
⎕ De developer gebruikt de platform tools
⎕ De developer gebruikt de platform taal/talen
⎕ De developer gebruikt de platform’s APIs
⎕ De user experience is zoals men op het platform verwacht
HTML Apps
"
Hoe Cross-Platform lang gewerkt heeft
Write once, fail everywhere
Wat “Native” volgens ons betekent
⎕ De developer gebruikt de platform tools
⎕ De developer gebruikt de platform taal/talen
⎕ De developer gebruikt de platform’s APIs
⎕ De user experience is zoals men op het platform verwacht✔
✔
JS2Native
Cross-platform Native App ontwikkeling met Appcelerator
2 Native
Wie is Appcelerator?
Apps alone won’t cut it
You need Triple
You need Triple
appcelerator.com
Cross-platform Native App ontwikkeling met Appcelerator
Cross-platform Native App ontwikkeling met Appcelerator
IBM
KONY
SAP
PEGASYSTEMS
ADOBE
XAMARIN
TELERIK
SENCHA
SALESFORCE.COM
MICROSTRATEGY
APPLE
MICROSOFT
ORACLE
GOOGLE
DSI
MOTOROLA SOLUTIONS
EMBARCEDERO
CLICKSOFTWARE
VERIVO SOFTWARE
CHALLENGERS LEADERS
NICHE PLAYERS VISIONARIES
COMPLETENESS OF VISION
ABILITYTOEXECUTE
AS OF SEPTEMBER 2014
825.000 ontwikkelaars
395.000.000 devices
Cross-platform Native App ontwikkeling met Appcelerator
Cross-platform Native App ontwikkeling met Appcelerator
Hoe werkt Titanium?
Architectuur
Alloy Codebase Development
JavaScript
Package
Run-time
Titanium
Module APIs
Titanium
Core APIs
Hyperloop
APIs
Kroll
(iOS/Android)
HAL
(Windows)
3P APIs OS Device & UI APIs Platform
Hello World
var window = Ti.UI.createWindow({
backgroundColor: “black"
});
var label = Ti.UI.createLabel({
text: “Hello, world!”,
color: “red”
});
label.addEventListener(“click”,
function open() {
alert(“Hello, world!”);
}
);
window.add(label);
window.open();
Ti API
Ti.createMyFartApp()
Ti.UI.createX() // Cross-platform UI View factories
Ti.UI.X // The UI View proxy the factory creates
Ti.UI.iOS.X // Platform specific UI View factories
Ti.X // Cross-platform device APIs

Ti.Android.X // Platform specific device APIs
require(“ti.map”).X // CommonJS & Titanium Modules
docs.appcelerator.com
Bestandsstructuur
config
code & assets▾ Resources
▾ images
logo.png
app.js
main.js
utils.js
tiapp.xml
Hoe werkt Alloy?
Titanium Classic
var window = Ti.UI.createWindow({
backgroundColor: “black"
});
var label = Ti.UI.createLabel({
text: “Hello, world!”,
color: “red”
});
label.addEventListener(“click”,
function open() {
alert(“Hello, world!”);
}
);
window.add(label);
window.open();
style
logic
markup
Titanium Alloy
<Alloy>
<Window>
<Label onClick=”open”>Hello World</Label>
</Window>
</Alloy>
”Window”: {
backgroundColor: “black”
}
”Label”: {
color: “red”
}
function open() {
alert(“Hello World”);
}
$.index.open();
index.xml
index.tss
index.js
XML & TSS naar JS conversie
XML & TSS naar JS conversie
▸ app
▾ Resources
▾ alloy
▾ controllers
index.js
backbone.js
CFG.js
underscore.js
▾ images
logo.png
alloy.js
app.js
utils.js
tiapp.xml
▾ Resources
▾ images
logo.png
app.js
main.js
utils.js
tiapp.xml
Bestandsstructuur
▾ app
▾ assets
▾ images

logo.png
▾ controllers
index.js
▾ lib
utils.js
▾ styles
index.tss
▾ views
index.xml
▾ widgets
alloy.js
config.json
▸ Resources
tiapp.xml
Alloy XML & TSS wordt classic Titanium
<Foo>
<Foo ns=“Ti.bar”>
<Foo module=“bar”>
<Require src=“foo”>

<Widget src=“foo”>

<Foo id=“bar”>
<Foo bar=“zoo”>



“#bar”: {

color: “white”

}
Ti.UI.createFoo();
Ti.bar.createFoo();
require(“bar”).createFoo();
Alloy.createController(“foo”)

.getView();
Alloy.createWidget(“foo”)

.getView();
$.bar = Ti.UI.createFoo();
Ti.UI.createFoo({

bar: “zoo”

});
$.bar = Ti.UI.createFoo({

color: “white”

});
Themes & Widgets
app


controllers
views
styles
assets
widgets
controllers
views
styles
assets
themes
styles
assets
Hyperloop?!
Cross-platform Native App ontwikkeling met Appcelerator
Cross-platform Native App ontwikkeling met Appcelerator
Titanium API uitbreiden dmv modules

var blur =
require('bencoding.blur');
var view =
blur.createBasicBlurView({
blurRadius: 5,
image: '/images/background.png'
});
var window = Ti.UI.createWindow();
window.add(view);
window.open();
Hyperloop for Windows
var Window = require('Windows.UI.Xaml.Window'),
TextBlock = require('Windows.UI.Xaml.Controls.TextBlock'),
Colors = require('Windows.UI.Colors'),
SolidColorBrush = require('Windows.UI.Xaml.Media.SolidColorBrush');
var text = new TextBlock();
text.Text = 'Hello, world!';
text.FontSize = 50;
text.Foreground = new SolidColorBrush(Colors.Red);
var window = Window.Current,
window.Content = text;
window.Activate();
 Hyperloop for iOS
var Hyperloop = require("hyperloop");
var TiApp = require("TiApp");
var UIViewController = require("UIViewController");
var UILabel = require("UILabel");
var UIColor = require("UIColor");
var UIScreen = require("UIScreen");
var CGRect = require("CGRect");
var NSTextAlignment = require("NSTextAlignment");
var label = UILabel.initWithFrame(CGRect.Make(0, 0,
UIScreen.mainScreen().bounds.width,
UIScreen.mainScreen().bounds.height
));
label.setText('Hello World!');
label.setTextColor(UIColor.redColor());
var viewController = UIViewController.init();
viewController.view.setBackgroundColor(UIColor.whiteColor());
viewController.view.addSubview(label);
TiApp.app().showModalController(viewController, false);
 Hyperloop for iOS
var Hyperloop = require("hyperloop");
var TiApp = require("TiApp");
var UIViewController = require("UIViewController");
var UILabel = require("UILabel");
var UIColor = require("UIColor");
var UIScreen = require("UIScreen");
var CGRect = require("CGRect");
var NSTextAlignment = require("NSTextAlignment");
var label = UILabel.initWithFrame(CGRect.Make(0, 0,
UIScreen.mainScreen().bounds.width,
UIScreen.mainScreen().bounds.height
));
label.setText('Hello World!');
label.setTextColor(UIColor.redColor());
var viewController = UIViewController.init();
viewController.view.setBackgroundColor(UIColor.whiteColor());
viewController.view.addSubview(label);
TiApp.app().showModalController(viewController, false);
Hyperloop for Android
var TextView = require('android.widget.TextView'),
Activity = require('android.app.Activity'),
Color = require('android.graphics.Color'),
RelativeLayout = require('android.widget.RelativeLayout'),
Gravity = require('android.view.Gravity'),
TypedValue = require('android.util.TypedValue');
var text = new TextView(activity);
text.setText("Hello World!");
text.setTextColor(Color.RED);
text.setTextSize(TypedValue.COMPLEX_UNIT_PX, 60);
var layout = new RelativeLayout(activity);
layout.setGravity(Gravity.CENTER);
layout.setBackgroundColor(Color.BLACK);
layout.addView(text);
var activity = new Activity(Ti.Android.currentActivity);
activity.setContentView(layout);
Abstractie heeft zijn voordelen
var window = Ti.UI.createWindow({
backgroundColor: “black"
});
var label = Ti.UI.createLabel({
text: “Hello, world!”,
color: “red”
});
label.addEventListener(“click”,
function open() {
alert(“Hello, world!”);
}
);
window.add(label);
window.open();
From Zero to App
• Appcelerator OSS vs Platform
• Dependency Hell
• Titanium & Alloy installeren
• Onze eerste app in 10 best practices
Cross-platform Native App ontwikkeling met Appcelerator
Cross-platform Native App ontwikkeling met Appcelerator
OSS INDIE $39/m TEAM $259/m
Ti CLI ✔ ✔ ✔
Ti SDK CI & Second-last GA ✔ ✔
Alloy ✔ ✔ ✔
AppC unified CLI ✔ ✔
Publish / Production ✔ ✔ ✔
Collaboration ✔ ✔
Studio ✔ ✔
LiveView, Profiler etc. ✔ ✔
Premium modules ✔
Arrow DB 1M / 5GB 10M / 10GB
Arrow Push 1M 10M
Arrow Web ✔
Arrow Builder ✔
Analytics 30 days 12 months
SLA 99%
Support community ✔
Labs ✔
Appcelerator Studio
www.appcelerator.com/signup
www.appcelerator.org
Dependency Hell
Installatie OSS
• Titanium CLI
/appcelerator/titanium
[sudo] npm install -g titanium && ti setup
• Titanium SDK *
/appcelerator/titanium_mobile
ti sdk install -b 5_2_X -d
• Alloy CLI
/appcelerator/alloy
[sudo] npm install -g alloy
Installatie OSS
I can use
my skills
to build
truly native
 apps!
WOW!
www.tislack.org

More Related Content

PDF
TiCalabash: Fully automated Acceptance Testing @ TiConf EU 2014
PPTX
TiConf EU 2014
PDF
Ti.conf titanium on firefoxos
PDF
10 Golden Rules For Outstanding Titanium Apps
PDF
Appcelerator Alloy MVC
PDF
Building Native Mobile Apps using Javascript with Titanium
PPTX
Arquitetura Orientada a Atores
PDF
Develop apps for (Apple) TV
TiCalabash: Fully automated Acceptance Testing @ TiConf EU 2014
TiConf EU 2014
Ti.conf titanium on firefoxos
10 Golden Rules For Outstanding Titanium Apps
Appcelerator Alloy MVC
Building Native Mobile Apps using Javascript with Titanium
Arquitetura Orientada a Atores
Develop apps for (Apple) TV

What's hot (8)

PPTX
Appium overview session final
PDF
Appium Native Application Crawler
PDF
Getting Started with Titanium & Alloy
PPSX
Cross platform test automation using Appium
PPTX
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
PPTX
README.MD for building the first purely digital mobile bank in Indonesia
PPTX
Android Automation & Testing
PPTX
Appium solution
Appium overview session final
Appium Native Application Crawler
Getting Started with Titanium & Alloy
Cross platform test automation using Appium
Parallel Test Runs with Appium on Real Mobile Devices – Hands-on Webinar
README.MD for building the first purely digital mobile bank in Indonesia
Android Automation & Testing
Appium solution
Ad

Similar to Cross-platform Native App ontwikkeling met Appcelerator (20)

PDF
Cross-Platform Native Apps with JavaScript
PDF
Appcelerator Titanium Intro (2014)
PDF
Titanium: Develop Native Mobile Apps with JavaScript
PDF
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015
PPT
Titanium Alloy Framework
PDF
Multi platform development using titanium + alloy
PDF
The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...
PPTX
Welcome to Titanium
PPTX
Cross Platform Mobile Development
PPTX
Mix-IT 2015
PDF
Hyperloop
PPTX
Presentation
PDF
Titanium Alloy Tutorial
PPT
Titanium Meetup Deck
PPTX
Appcelerator Titanium Intro
PDF
Introduction to Appcelerator Titanium
PPT
Cross platform native development with appcelerator titanium (2014 devnexus)
PPTX
Dev summer-keynote
PDF
Hyperloop
ZIP
Mobile for the rest of us
Cross-Platform Native Apps with JavaScript
Appcelerator Titanium Intro (2014)
Titanium: Develop Native Mobile Apps with JavaScript
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015
Titanium Alloy Framework
Multi platform development using titanium + alloy
The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...
Welcome to Titanium
Cross Platform Mobile Development
Mix-IT 2015
Hyperloop
Presentation
Titanium Alloy Tutorial
Titanium Meetup Deck
Appcelerator Titanium Intro
Introduction to Appcelerator Titanium
Cross platform native development with appcelerator titanium (2014 devnexus)
Dev summer-keynote
Hyperloop
Mobile for the rest of us
Ad

More from Fokke Zandbergen (17)

PDF
Building the (Support) Robot at Zapier
PDF
Lessons from helping developers integrate 1,000 APIs with Zapier
PDF
We are all Remote Advocates
PDF
Appcelerator OSS & Platform
PDF
Platform 4.0 Meetup Launch Event
PDF
The Ultimate Titanium CLI Toolchain
PDF
Getting ready for iOS 8 & iPhone 6
PDF
Titanium Community Toolkit Showcase
PDF
5 app alternatieven #AIB2013
PDF
Apps voor kerken #Kerk2013
PDF
TiNy #TiAppCamp
PDF
Internetmarketing
PDF
Alloy Tips & Tricks #TiLon
PDF
Alloy #DMC13
PDF
Titanium #MDS13
Building the (Support) Robot at Zapier
Lessons from helping developers integrate 1,000 APIs with Zapier
We are all Remote Advocates
Appcelerator OSS & Platform
Platform 4.0 Meetup Launch Event
The Ultimate Titanium CLI Toolchain
Getting ready for iOS 8 & iPhone 6
Titanium Community Toolkit Showcase
5 app alternatieven #AIB2013
Apps voor kerken #Kerk2013
TiNy #TiAppCamp
Internetmarketing
Alloy Tips & Tricks #TiLon
Alloy #DMC13
Titanium #MDS13

Recently uploaded (20)

PDF
A novel scalable deep ensemble learning framework for big data classification...
PPTX
1. Introduction to Computer Programming.pptx
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
A comparative study of natural language inference in Swahili using monolingua...
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
A Presentation on Artificial Intelligence
PPTX
A Presentation on Touch Screen Technology
PDF
1 - Historical Antecedents, Social Consideration.pdf
PPTX
TLE Review Electricity (Electricity).pptx
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
Getting Started with Data Integration: FME Form 101
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Enhancing emotion recognition model for a student engagement use case through...
PPTX
Chapter 5: Probability Theory and Statistics
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
August Patch Tuesday
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
A novel scalable deep ensemble learning framework for big data classification...
1. Introduction to Computer Programming.pptx
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
A comparative study of natural language inference in Swahili using monolingua...
OMC Textile Division Presentation 2021.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
A Presentation on Artificial Intelligence
A Presentation on Touch Screen Technology
1 - Historical Antecedents, Social Consideration.pdf
TLE Review Electricity (Electricity).pptx
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
Getting Started with Data Integration: FME Form 101
DP Operators-handbook-extract for the Mautical Institute
MIND Revenue Release Quarter 2 2025 Press Release
Enhancing emotion recognition model for a student engagement use case through...
Chapter 5: Probability Theory and Statistics
Unlocking AI with Model Context Protocol (MCP)
August Patch Tuesday
Heart disease approach using modified random forest and particle swarm optimi...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx

Cross-platform Native App ontwikkeling met Appcelerator

  • 1. Cross-Platform Native App ontwikkeling met Appcelerator De Haagse Hogeschool 15 maart 2015 Fokke Zandbergen @FokkeZB
  • 3. Agenda • Operation Information Overload (~45m) • Pauze (15m) • From Zero to App (tot 20:45)
  • 4. Operation Information Overload • Waarom Cross-Platform? • Waarom Native? • Wie is Appcelerator? • Hoe werkt Titanium? • Wat heeft Elon Musk’s Hyperloop ermee te maken? • Hoe werkt Alloy?
  • 6. Omdat je je zelden tot één platform kunt beperken
  • 7. Omdat er niet zoiets bestaat als één platform 1.0 1.1 1.5 1.6 2.0 2.0.1 2.1 2.2 2.3-2.3.2 2.3.3-2.3.7 3.0 3.1 3.2 4.0-4.0.2 4.0.3-4.04 4.1 4.2 4.3 4.4 5.0 5.1 2011 2012 2013 2014 2015 0% 20% 40% 60% 80% 100% The white line shows the market share of the leading API level at any time De white line shows the market share
 of the leading API level at any time Maart 2016
 developer.apple.com
  • 8. Omdat je te maken hebt met duizenden type devices
  • 12. Wat betekent “Native” eigenlijk? ⎕ De developer gebruikt de platform tools ⎕ De developer gebruikt de platform taal/talen ⎕ De developer gebruikt de platform’s APIs ⎕ De user experience is zoals men op het platform verwacht
  • 13. HTML Apps " Hoe Cross-Platform lang gewerkt heeft
  • 14. Write once, fail everywhere
  • 15. Wat “Native” volgens ons betekent ⎕ De developer gebruikt de platform tools ⎕ De developer gebruikt de platform taal/talen ⎕ De developer gebruikt de platform’s APIs ⎕ De user experience is zoals men op het platform verwacht✔ ✔
  • 25. IBM KONY SAP PEGASYSTEMS ADOBE XAMARIN TELERIK SENCHA SALESFORCE.COM MICROSTRATEGY APPLE MICROSOFT ORACLE GOOGLE DSI MOTOROLA SOLUTIONS EMBARCEDERO CLICKSOFTWARE VERIVO SOFTWARE CHALLENGERS LEADERS NICHE PLAYERS VISIONARIES COMPLETENESS OF VISION ABILITYTOEXECUTE AS OF SEPTEMBER 2014 825.000 ontwikkelaars 395.000.000 devices
  • 29. Architectuur Alloy Codebase Development JavaScript Package Run-time Titanium Module APIs Titanium Core APIs Hyperloop APIs Kroll (iOS/Android) HAL (Windows) 3P APIs OS Device & UI APIs Platform
  • 30. Hello World var window = Ti.UI.createWindow({ backgroundColor: “black" }); var label = Ti.UI.createLabel({ text: “Hello, world!”, color: “red” }); label.addEventListener(“click”, function open() { alert(“Hello, world!”); } ); window.add(label); window.open(); Ti API
  • 31. Ti.createMyFartApp() Ti.UI.createX() // Cross-platform UI View factories Ti.UI.X // The UI View proxy the factory creates Ti.UI.iOS.X // Platform specific UI View factories Ti.X // Cross-platform device APIs
 Ti.Android.X // Platform specific device APIs require(“ti.map”).X // CommonJS & Titanium Modules
  • 33. Bestandsstructuur config code & assets▾ Resources ▾ images logo.png app.js main.js utils.js tiapp.xml
  • 35. Titanium Classic var window = Ti.UI.createWindow({ backgroundColor: “black" }); var label = Ti.UI.createLabel({ text: “Hello, world!”, color: “red” }); label.addEventListener(“click”, function open() { alert(“Hello, world!”); } ); window.add(label); window.open(); style logic markup
  • 36. Titanium Alloy <Alloy> <Window> <Label onClick=”open”>Hello World</Label> </Window> </Alloy> ”Window”: { backgroundColor: “black” } ”Label”: { color: “red” } function open() { alert(“Hello World”); } $.index.open(); index.xml index.tss index.js
  • 37. XML & TSS naar JS conversie
  • 38. XML & TSS naar JS conversie
  • 39. ▸ app ▾ Resources ▾ alloy ▾ controllers index.js backbone.js CFG.js underscore.js ▾ images logo.png alloy.js app.js utils.js tiapp.xml ▾ Resources ▾ images logo.png app.js main.js utils.js tiapp.xml Bestandsstructuur ▾ app ▾ assets ▾ images
 logo.png ▾ controllers index.js ▾ lib utils.js ▾ styles index.tss ▾ views index.xml ▾ widgets alloy.js config.json ▸ Resources tiapp.xml
  • 40. Alloy XML & TSS wordt classic Titanium <Foo> <Foo ns=“Ti.bar”> <Foo module=“bar”> <Require src=“foo”>
 <Widget src=“foo”>
 <Foo id=“bar”> <Foo bar=“zoo”>
 
 “#bar”: {
 color: “white”
 } Ti.UI.createFoo(); Ti.bar.createFoo(); require(“bar”).createFoo(); Alloy.createController(“foo”)
 .getView(); Alloy.createWidget(“foo”)
 .getView(); $.bar = Ti.UI.createFoo(); Ti.UI.createFoo({
 bar: “zoo”
 }); $.bar = Ti.UI.createFoo({
 color: “white”
 });
  • 45. Titanium API uitbreiden dmv modules  var blur = require('bencoding.blur'); var view = blur.createBasicBlurView({ blurRadius: 5, image: '/images/background.png' }); var window = Ti.UI.createWindow(); window.add(view); window.open();
  • 46. Hyperloop for Windows var Window = require('Windows.UI.Xaml.Window'), TextBlock = require('Windows.UI.Xaml.Controls.TextBlock'), Colors = require('Windows.UI.Colors'), SolidColorBrush = require('Windows.UI.Xaml.Media.SolidColorBrush'); var text = new TextBlock(); text.Text = 'Hello, world!'; text.FontSize = 50; text.Foreground = new SolidColorBrush(Colors.Red); var window = Window.Current, window.Content = text; window.Activate();
  • 47.  Hyperloop for iOS var Hyperloop = require("hyperloop"); var TiApp = require("TiApp"); var UIViewController = require("UIViewController"); var UILabel = require("UILabel"); var UIColor = require("UIColor"); var UIScreen = require("UIScreen"); var CGRect = require("CGRect"); var NSTextAlignment = require("NSTextAlignment"); var label = UILabel.initWithFrame(CGRect.Make(0, 0, UIScreen.mainScreen().bounds.width, UIScreen.mainScreen().bounds.height )); label.setText('Hello World!'); label.setTextColor(UIColor.redColor()); var viewController = UIViewController.init(); viewController.view.setBackgroundColor(UIColor.whiteColor()); viewController.view.addSubview(label); TiApp.app().showModalController(viewController, false);
  • 48.  Hyperloop for iOS var Hyperloop = require("hyperloop"); var TiApp = require("TiApp"); var UIViewController = require("UIViewController"); var UILabel = require("UILabel"); var UIColor = require("UIColor"); var UIScreen = require("UIScreen"); var CGRect = require("CGRect"); var NSTextAlignment = require("NSTextAlignment"); var label = UILabel.initWithFrame(CGRect.Make(0, 0, UIScreen.mainScreen().bounds.width, UIScreen.mainScreen().bounds.height )); label.setText('Hello World!'); label.setTextColor(UIColor.redColor()); var viewController = UIViewController.init(); viewController.view.setBackgroundColor(UIColor.whiteColor()); viewController.view.addSubview(label); TiApp.app().showModalController(viewController, false);
  • 49. Hyperloop for Android var TextView = require('android.widget.TextView'), Activity = require('android.app.Activity'), Color = require('android.graphics.Color'), RelativeLayout = require('android.widget.RelativeLayout'), Gravity = require('android.view.Gravity'), TypedValue = require('android.util.TypedValue'); var text = new TextView(activity); text.setText("Hello World!"); text.setTextColor(Color.RED); text.setTextSize(TypedValue.COMPLEX_UNIT_PX, 60); var layout = new RelativeLayout(activity); layout.setGravity(Gravity.CENTER); layout.setBackgroundColor(Color.BLACK); layout.addView(text); var activity = new Activity(Ti.Android.currentActivity); activity.setContentView(layout);
  • 50. Abstractie heeft zijn voordelen var window = Ti.UI.createWindow({ backgroundColor: “black" }); var label = Ti.UI.createLabel({ text: “Hello, world!”, color: “red” }); label.addEventListener(“click”, function open() { alert(“Hello, world!”); } ); window.add(label); window.open();
  • 51. From Zero to App • Appcelerator OSS vs Platform • Dependency Hell • Titanium & Alloy installeren • Onze eerste app in 10 best practices
  • 54. OSS INDIE $39/m TEAM $259/m Ti CLI ✔ ✔ ✔ Ti SDK CI & Second-last GA ✔ ✔ Alloy ✔ ✔ ✔ AppC unified CLI ✔ ✔ Publish / Production ✔ ✔ ✔ Collaboration ✔ ✔ Studio ✔ ✔ LiveView, Profiler etc. ✔ ✔ Premium modules ✔ Arrow DB 1M / 5GB 10M / 10GB Arrow Push 1M 10M Arrow Web ✔ Arrow Builder ✔ Analytics 30 days 12 months SLA 99% Support community ✔ Labs ✔
  • 59. Installatie OSS • Titanium CLI /appcelerator/titanium [sudo] npm install -g titanium && ti setup • Titanium SDK * /appcelerator/titanium_mobile ti sdk install -b 5_2_X -d • Alloy CLI /appcelerator/alloy [sudo] npm install -g alloy
  • 61. I can use my skills to build truly native  apps! WOW!