Getting Started with Titanium

41
1 http://www.appcelerator.com | Code Strong! Getting Started With Titanium Kevin Whinnery Twitter: @kevinwhinnery | http://kevinwhinnery.com More Information: Twitter: @appcelerator | http://appcelerator.com

description

 

Transcript of Getting Started with Titanium

Page 1: Getting Started with Titanium

1http://www.appcelerator.com | Code Strong!

Getting Started With Titanium

Kevin Whinnery

Twitter: @kevinwhinnery | http://kevinwhinnery.com

More Information:

Twitter: @appcelerator | http://appcelerator.com

Page 2: Getting Started with Titanium

2http://www.appcelerator.com | Code Strong!

Today’s Presentation

•What is Titanium?•Why Titanium?• Architecture and API Overview• Demos:– Your First Project – Desktop Twitter Client– Mobile TwitPic Client– The mobile ‘kitchen sink’

•Q&A

Page 3: Getting Started with Titanium

3http://www.appcelerator.com | Code Strong!

Want to give this talk?

• This presentation is designed for reuse• Great for your company or user group• Slides, Code, Examples, and Notes available at github.com/kwhinnery/MeetupPack• Register for free t-shirts and goodies at appcelerator.com/community/app-u

Page 4: Getting Started with Titanium

4http://www.appcelerator.com | Code Strong!

An Unlikely Hero

• Over a decade, web technologies have become one of the world’s most popular client application technology solutions:– Easy to develop, deploy and maintain– Cross platform– Open standards

•Warts and all, it’s tough to find a developer who has ZERO experience with these tools

Page 5: Getting Started with Titanium

5http://www.appcelerator.com | Code Strong!

If web apps are so great...

...why are we interested in building native applications at all? Well:– They feel responsive– They leverage platform capabilities • Filesystem I/O• Local Database•Mobile: Camera or Accelerometer

– They are or can be ‘always on’– They can be used offline

Page 6: Getting Started with Titanium

6http://www.appcelerator.com | Code Strong!

But my dev shop has...

• An investment in the people, tools, skills, and technology to build web applications• An appreciation for open source and open standards• A need to get market quickly• An aversion to maintaining a codebase per supported platform

Page 7: Getting Started with Titanium

7http://www.appcelerator.com | Code Strong!

If only you could...

• Build fully native apps using web technologies you know today• Build cross platform apps from a shared codebase• Use open source software, based on open standards• Find lots of available development talent to build these apps

Page 8: Getting Started with Titanium

8http://www.appcelerator.com | Code Strong!

Enter Titanium

•Website: http://appcelerator.com• Twitter: http://twitter.com/appcelerator• Source: http://github.com/appcelerator

Titanium is an open source framework for building native desktop and mobile

applications using open web technologies (HTML, CSS, and JavaScript)

Page 9: Getting Started with Titanium

9http://www.appcelerator.com | Code Strong!

Platforms?

• Desktop: Win32, Mac OS X (Intel), Linux• Mobile: iPhone OS, Android• More to come

Page 10: Getting Started with Titanium

10

http://www.appcelerator.com | Code Strong!

License?

• Open Source under Apache 2.0• Commercial training and support services available• More value add services to come (analytics)• Core SDK - always free and open source

Page 11: Getting Started with Titanium

11

http://www.appcelerator.com | Code Strong!

Titanium “Sweet Spot”

• Data-driven web service clients (Enterprise applications)•Web service mash-ups• Social utilities• Brand affinity• Casual games• Anything requiring cross-platform support

Page 12: Getting Started with Titanium

12

http://www.appcelerator.com | Code Strong!

More on Titanium

•Web: http://appcelerator.com• Twitter: http://twitter.com/appcelerator• Docs: http://www.codestrong.com• Videos: http://vimeo.com/appcelerator• Source: http://github.com/appcelerator

Page 13: Getting Started with Titanium

13

http://www.appcelerator.com | Code Strong!

Desktop Architecture and API Overview

Page 14: Getting Started with Titanium

14

http://www.appcelerator.com | Code Strong!

Desktop Architecture

Page 15: Getting Started with Titanium

15

http://www.appcelerator.com | Code Strong!

Desktop User Interface

• Tray and Dock icons• System Notifications• Application Menus• More

Page 16: Getting Started with Titanium

16

http://www.appcelerator.com | Code Strong!

Media

• Play bundled or remote sound files• System notification (beep)

Page 17: Getting Started with Titanium

17

http://www.appcelerator.com | Code Strong!

Networking

• HTTPClient (XHR style object)• Socket level access• Built-in IRC chat client

Page 18: Getting Started with Titanium

18

http://www.appcelerator.com | Code Strong!

Database and Filesystem

•Write files to the local filesystem• Read files from disk• Read file via drag and drop• Use a synchronous or asynch database API

Page 19: Getting Started with Titanium

19

http://www.appcelerator.com | Code Strong!

Workers

• Spin off worker threads• Communicate asynchronously with the worker through a JavaScript API• Offload long running tasks to keep your app responsive

Page 20: Getting Started with Titanium

20

http://www.appcelerator.com | Code Strong!

Language Modules

• Language modules are optionally included• Full DOM access• Three currently supported modules:– Ruby– Python– PHP

Page 21: Getting Started with Titanium

21

http://www.appcelerator.com | Code Strong!

More

• Manage/run processes and applications• Take screenshots• Update your application remotely• Get runtime platform data• More at http://codestrong.com/titanium

Page 22: Getting Started with Titanium

22

http://www.appcelerator.com | Code Strong!

Mobile Architecture and API Overview

Page 23: Getting Started with Titanium

23

http://www.appcelerator.com | Code Strong!

Mobile Architecture

Page 24: Getting Started with Titanium

24

http://www.appcelerator.com | Code Strong!

MediaStream or package audio and video content

Page 25: Getting Started with Titanium

25

http://www.appcelerator.com | Code Strong!

More Media...Interact with the iPhone or Android built-in cameras

Page 26: Getting Started with Titanium

26

http://www.appcelerator.com | Code Strong!

GeolocationUse Geolocation to leverage youruser’s position in the world

Page 27: Getting Started with Titanium

27

http://www.appcelerator.com | Code Strong!

AccelerometerUse advanced gestures and track movement to create groundbreaking user interfaces

Page 28: Getting Started with Titanium

28

http://www.appcelerator.com | Code Strong!

Database and File SystemAccess a SQLite Database (synch or asynch) and the platform file system

Page 29: Getting Started with Titanium

29

http://www.appcelerator.com | Code Strong!

Network

XHR-style object for remote data requests.

Page 30: Getting Started with Titanium

30

http://www.appcelerator.com | Code Strong!

Native UI ControlsUse native controls through a JavaScript interface.

Page 31: Getting Started with Titanium

31

http://www.appcelerator.com | Code Strong!

Integrated YQL Support

• YQL - A web service aggregator using open tables• Built in to Titanium.Yahoo namespace

Page 32: Getting Started with Titanium

32

http://www.appcelerator.com | Code Strong!

Facebook Connect

• Facebook Connect module (currently iPhone only)• Currently support for FQL• More on the way

Page 33: Getting Started with Titanium

33

http://www.appcelerator.com | Code Strong!

Native iPhone UI

• Tab Bar• Nav Bar• Table View• Alert / Options• Group Views / Text• Many More

Page 34: Getting Started with Titanium

34

http://www.appcelerator.com | Code Strong!

Native Android UI

• Tab Bar• Table View• Alert / Options• Activity Indicator• Notifications• Many More

Page 35: Getting Started with Titanium

35

http://www.appcelerator.com | Code Strong!

Common APIsiPhone Table View Android Table View

Same Code Creates Both

Page 36: Getting Started with Titanium

36

http://www.appcelerator.com | Code Strong!

More APIs

• Platform / OS Data• Application Properties• Logging• Scroll and Image Views• Composite Views• More always coming

Page 37: Getting Started with Titanium

37

http://www.appcelerator.com | Code Strong!

Still Want More?

• Kitchen Sink - Full API Demo• Codestrong.com has Examples and Guides• http://www.codestrong.com/timobile/samples/

Page 38: Getting Started with Titanium

38

http://www.appcelerator.com | Code Strong!

Titanium Developer

•Developer is a Titanium Application•Projects created/managed via Titanium Developer

•Titanium Developer deploys code to simulators

•Developer also helps with testing and packaging for devices

•Requires sign-up for Appcelerator Network (support, e-mail list, other services)

Page 39: Getting Started with Titanium

39

http://www.appcelerator.com | Code Strong!

Kicking The Tires

• Your first application– Desktop project layout– Mobile project layout

• Demos– Desktop Twitter Client– Mobile TwitPic Client– Shared library for both– Mobile: Kitchen Sink

Page 40: Getting Started with Titanium

40

http://www.appcelerator.com | Code Strong!

Next Steps

• Download: appcelerator.com/download• Hack– Docs/Samples: http://www.codestrong.com– Screencasts: http://vimeo.com/appcelerator

• Get Help– http://support.appcelerator.net– IRC Chat - irc.freenode.net / #titanium_app

Page 41: Getting Started with Titanium

41

http://www.appcelerator.com | Code Strong!

Questions?