Cross platform native development with appcelerator titanium (2014 devnexus)

19
STEPHEN FEATHER Cross Platform Native Development with Appcelerator Titanium

Transcript of Cross platform native development with appcelerator titanium (2014 devnexus)

Page 1: Cross platform native development with appcelerator titanium (2014 devnexus)

STEPHEN FEATHER

Cross Platform Native Developmentwith Appcelerator Titanium

Page 2: Cross platform native development with appcelerator titanium (2014 devnexus)

STEPHEN FEATHER

Stephen Feather

• Author, Technical Editor• Appcelerator Titan,

Expert• OS Contributor• @stephenfeather

Page 3: Cross platform native development with appcelerator titanium (2014 devnexus)

STEPHEN FEATHER

Mobile Languages

• iOS - Objective C

• Android - Java

• Mobile web - HTML5

• Blackberry - Java

• Windows 8 Mobile - .NET (C#)

Page 4: Cross platform native development with appcelerator titanium (2014 devnexus)

STEPHEN FEATHER

Abstraction Layers

Page 5: Cross platform native development with appcelerator titanium (2014 devnexus)

STEPHEN FEATHER

Why use an abstraction layer?

• Simpler maintenance

• Quicker Development

• Re-use existing knowledge/libraries

• Less training/re-training

Page 6: Cross platform native development with appcelerator titanium (2014 devnexus)

STEPHEN FEATHER

“…the process of formulating generalized ideas or concepts by extracting common

qualities from specific examples…”

Page 7: Cross platform native development with appcelerator titanium (2014 devnexus)

STEPHEN FEATHER

Enter Titanium

Page 8: Cross platform native development with appcelerator titanium (2014 devnexus)

STEPHEN FEATHER

Titanium

• Open Source - Source code is available on github

• Code in JavaScript

• It is not a “Generator”

• JavaScript to Bridge (kroll) to Native

Page 9: Cross platform native development with appcelerator titanium (2014 devnexus)

STEPHEN FEATHER

JAVASCRIPT

TITANIUM SDK (3.2.1.GA)

iOS6.x

iOS7.0.x

Android2.3.3 (API

10)

Android4.4.x (API

19)

BB NDK

10.0.x

BB NDK

10.2.x

Mobile

Web

Page 10: Cross platform native development with appcelerator titanium (2014 devnexus)

STEPHEN FEATHER

Advantages• Write Once

• Deploy all over

• Native Interface Controls

• Reduce Maintenance

• Simplify deployment to new platforms

• Utilize existing JavaScript skills

Page 11: Cross platform native development with appcelerator titanium (2014 devnexus)

STEPHEN FEATHER

Disadvantages

• Modify often

• New feature delays

• Bugs fix delays

Page 12: Cross platform native development with appcelerator titanium (2014 devnexus)

STEPHEN FEATHER

Code Reuse?

• 100% of non-UI code is reusable

• 50% of UI code (classic) is reusable

• 80-85% of UI code (alloy) is reusable

• The better the coder, the more reuse (experience and patterns)

Page 13: Cross platform native development with appcelerator titanium (2014 devnexus)

STEPHEN FEATHER

Appcelerator Platform

• Titanium SDK• Appcelerator Studio• Enterprise Connectors• Code Analysis• Liveview• Analytics• Testing/SOASTA• Personalized Support• Titanium SDK• Call Sales

Page 14: Cross platform native development with appcelerator titanium (2014 devnexus)

STEPHEN FEATHER

Titanium

• Titanium SDK• Titanium Studio• Alloy• Cloud Services• Community Support

Page 15: Cross platform native development with appcelerator titanium (2014 devnexus)

STEPHEN FEATHER

Let’s Build an App!(No, we need to do some installing first)

15

Page 16: Cross platform native development with appcelerator titanium (2014 devnexus)

STEPHEN FEATHER

Installing Titanium• Visit appcelerator.com

• Create an Appcelerator account

• Download Titanium Studio

• Open up the Docs/Guides site for reference (http://docs.appcelerator.com/titanium/latest/#!/guide/Installation_and_Configuration)

• Studio will attempt to walk you through installing the prerequisites (node, xCode, Java, Android tooling)

Page 17: Cross platform native development with appcelerator titanium (2014 devnexus)

STEPHEN FEATHER

Installation for the Rebellious

• Install node

• Install xCode (osx only)

• Install Android tooling (including 2.3.3 and latest API you wish to support)

• Set path for android tooling

• (be a true rebel, install Genymotion and throw Google Apps on a VM)

• Ensure you have the correct jdk installed (6, 32bit on windows)

• [sudo] npm -g install titanium

• [sudo] npm -g install alloy

• titanium setup (quick setup)

• titanium sdk install latest

• vi (note: duck as emac users will be throwing shoes)

Page 18: Cross platform native development with appcelerator titanium (2014 devnexus)

STEPHEN FEATHER

OK, NOW Let’s Build an App

Page 19: Cross platform native development with appcelerator titanium (2014 devnexus)

STEPHEN FEATHER

Additional Resources• https://github.com/sfeather/2014DevNexus

• tiDev.io - Titanium News, Tips, Tutorials

• gitt.io - Search github for Modules/Widgets

• Docs - Official API Documentation, Guides(http://docs.appcelerator.com/)

• Q&A - Community Forum (http://developer.appcelerator.com/questions)

• Marketplace - Appcelerator’s store for free/paid addons(marketplace.appcelerator.com)