Titanium Appcelerator for real developer



Why a native coder should use Titanium?
Semi-serious guide

WHO am i?

I'm Paolo Mosca
Freelance Developer
Prototype - Startup Supporter
Titanium Lover
also Tango Dancer, Amateur Photographer...
....Strong Traveler, Workaholic...
Life addicted

twitter: @tangotrotter

Who are you?

Business shark
Native coder
experienced programmer
Mobile solutions expert
Marketer
Just Curious
Lost Tourist
I'm here for the BEER

Who you are NOT?


Code Purist


I can write a NASA launching rocket 
algorithm in a single line...


...i will forget how to read that again in 5 minutes

...but I don't need that... 
I never write wrong code

Flash Programmer / Graphic Designer


I got fired
I cannot find job

I made a great website buying a great template for Wordpress
I know Dreamweaver
I know FrontPage (really?!?)

I will start to develop awesome apps

... please don't... or try AdobeAir

.NET Developer

I worked for a long time in a big company
I'm tired to work for corporate projects,
proprietary CMS, CRM, SAP...
I really know C#
I love Microsoft

I want to step in the smart world of app dev

try Xamarin

PhoneGAP Lover


I'm here for my Religion War
to tell you you're wrong

I will refute all your theories about Hybrid 
and Cross Platform development


Cross Platform Promise


Write Once
Works Everywhere

Average revenue for single platform app (~500$/month)
Average revenue for multiple platform app (~1500$/month)
[...source: Developer Economics 2013...]

THIS IS SPARTA!



SOMETIMES DEVELOPERS FORGET THAT WE ARE HERE TO NOT JUST BUILD GREAT STUFF, BUT ALSO TO MAKE MONEY.

WORK SMARTER, NOT HARDER.

Starting with Titanium

I was old school native coder.
I must admit, this was my face when i started with Titanium

why?

I will lose control
I cannot optimize my code
I will not be able to use the last smartest paradigm I've learned in the course "best practices for awesome developer"

I will lose in performances for my great app



a near-real case

the customer: Can you develop a very simple app (no more than an hello world application)?
me: Sure! Let's do it

day 1: design the best architecture I can think, respect all the paradigm of MVC decoupling even my brain from my head
day 2: hard coding
day 3: (the customer) can you add a button to make a coffee? can you move this label to give a better experience of happiness to the end user? can you blablabla


Pure spaghetti code

45 days later...

COst ANalysis

To build a Multi Platform app going Native
iOS Development = €€€
Android Development = €€€
Development cost = €€€ + €€€
Maintain 2 different codes (often 2 teams)

To build a Cross Platform app with Titanium
Js/Titan Development = €€€ 
(usually less expensive than native and easier to find)
Development cost = LESS

Let's start to take it seriously


what I need to start with Titanium?

  • It's better if you are a native coder
  • knowledge about OOP paradigms
  • strong JS skills (no... jquery is not enough) 
  • you really know what is (not how-to) mobile development

Titanium Platform

Development IDE (Titanium Studio)
CLI (Command line interface)
API System based on native UI control
JS to native build -> node.js
Simulator / Emulator / Devices Integration
Marketplaces Deployment
Cloud Solution (ACS)

Free & OpenSource

Pros

Pros:
  • development faster than native (~70%) even on single platform
  • one SDK for multiple platform
  • javascript (Write Once, ADAPT Everywhere)
  • performances close to native (~85-90%)
  • very good documentation (since 6 months, before was horrible)
  • great community
  • more than 500k developers in the world

Cons

Fake Cons:
  • Memory leaks (usually caused by js bad programming)
Cons:
  • Bigger app (not so much)
  • Native controls not 100% provided
  • Debugging (Android debugging really sucks)
  • Update delay on native SDK new features released
  • No visual UI 

Code sample

var win = Ti.UI.createWindow({
	backgroundColor:'#fff'
});
var button = Ti.UI.createButton({
 	right:20,
	left:20,
	title:'Hi there'
});
win.add(button);
win.open();
button.addEventListener('click', function(e){
	alert('click!');
});

let's run our code



iphone

tizen

android

Alloy MVC

Model: Backbone
Views:
<Alloy>
   <Window id="win">
       <Button id="button" class="cool" onClick="clickMe" platform="ios,android"/>
   </Window>
</Alloy>
Style View:
"#win":{
   backgroundColor:'#fff'
},
"#button":{
   right:20,
   left:20,
   title:'Hi there'
},".cool":{   backgroundColor: '#999'}
Controller:
win.open();
function clickME(){
   alert('click!');
};

Titanium Today

  • iOS/Android/Tizen/BB10/MobileWeb(html5 export)
  • UI controls
  • Database Managements
  • Push Notifications
  • Social Network support
  • Native Modules integration
  • Alloy MVC
  • ACS support

Near Future: Ti.next

  • WP8 Support
  • Including Native Code
  • Compilation in ASM (faster than native!!)
  • Smaller build

 Slides: https://slid.es/pablotango/titanium-presentation

 paolo@idev.io

 @tangotrotter

Muchas Gracias

TITANIUM APPCELERATOR FOR REAL DEVELOPER

By Paolo Mosca

TITANIUM APPCELERATOR FOR REAL DEVELOPER

Why a native coder should use Titanium? Semi-serious guide

  • 936