Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 55 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
55
Dung lượng
5,25 MB
Nội dung
1 Before You Begin • Prerequisite Software – Latest iPhone SDK – Android SDK with 1.6 and any later SDKs installed – Titanium Developer • Getting Started Guide – http://developer.appcelerator.com/doc/mobile/get_st arted – Linked in tutorial notes at http://oscon.com 2 Native Mobile Applications USINGOpenSource 3 Want to give this talk? • Your local user group • Your company • To your wife and kids • Package includes: – Slides in various formats – Example code – Resources for presenters http://github.com/kwhinnery/MeetupPack 4 Today’s Agenda • Titanium Mobile Overview • Hello World and Project Walkthrough • Building Titanium Apps: Fundamentals • Code By Numbers: Oh Snap! • Where To Go From Here • Questions and Answers • Independent Hacking 5 About Me Kevin Whinnery Engineer/Platform Evangelist http://kevinwhinnery.com Twitter: @kevinwhinnery Web developer by trade and training, lover of JavaScript and open web technologies in general 6 About Appcelerator • OpenSource Software Company based in Mountain View • ~25 employees and growing • Developing Titanium for about two years, with Mobile coming in the last year • 95% Developers 7 About You New To Mobile Development Mobile Dev Veteran 8 Either way, you’ve come to the right place. 9 Amazing Mobile Platforms 10 Which is great and exciting! [...]... Enter Titanium Titanium is an open source framework for building native mobile (or desktop) applications usingopen web technologies (JavaScript - optionally HTML and CSS) 17 Titanium Key Facts • Open Source (Apache 2.0) • Professional Services, SLA Support, Training, and Analytics available from Appcelerator Titanium Platforms • • 18 Desktop: Win32, OS X, Linux Mobile: iOS, Android, BlackBerry, webOS... faster and smoother on resource constrained devices Ideally, we build crossplatform native apps 14 .but we don’t want to “write once, suck everywhere”* *Loren Brichter, creator “Twitter for iPhone”/Tweetie 15 X-Platform Requirements • Target multiple platforms from a single codebase • Apps must feel like they belong on the platform • Apps need to perform like native • Bonus: Open source and extensible... only how do we target all these cool platforms? 11 Well, you could build native, but • • How many codebases do you want to (or even can you) support? • How long will it take to build native on N platforms? • How much effort will be duplicated? • What if you bet on the wrong platform? • 12 Which platforms do you choose? Who... separately, different release schedules • 19 Titanium Developer (1.2.1) We will focus on Developer and the Mobile SDK Titanium Features Native UI Real native tables, tabs, sliders, and views Location APIs Open Source and Extensible Native Maps, Compass, and Geolocation Extend Titanium with custom modules in native code Local and Remote Data Integrated Analytics Local SQL Database, Lightweight Key/Value Store,... that is interpreted at runtime on the device • app.js defines the root execution context of the app • Note that we are not running in a browser • We use the WebKit KJS JavaScript engine (iOS) or Rhino (Android/ BB) 31 Titanium JavaScript API • Organized into logical namespaces • “Titanium” (or just “Ti” for short) is the root namespace for all Titanium functionality • A few other odds and ends in the... a single context) Demo: Contexts • • Switch to contain urls and contexts • 35 New Project - Two Tabs with “Lightweight” windows Symbols not defined in other contexts • The View Hierarchy Views are the building blocks of Titanium UIs – Specialized views: table views, image views, map views, etc • • Layout Options: Absolute, vertical, or horizontal (currently iPhone only) • 36 Views can contain child . native • Bonus: Open source and extensible • Bonus: Use skills we already have Hmmm, I wonder if he has a specific technology in mind 17 Enter Titanium Titanium is an open source framework for building. Applications USING Open Source 3 Want to give this talk? • Your local user group • Your company • To your wife and kids • Package includes: – Slides in various formats – Example code – Resources. building native mobile (or desktop) applications using open web technologies (JavaScript - optionally HTML and CSS) 18 Titanium Key Facts • Open Source (Apache 2.0) • Professional Services, SLA