Titanium Alloy Framework
description
Transcript of Titanium Alloy Framework
![Page 1: Titanium Alloy Framework](https://reader034.fdocuments.in/reader034/viewer/2022052222/554d2d57b4c905c5208b533a/html5/thumbnails/1.jpg)
AlloyMVC Framework for Titanium mobile
![Page 2: Titanium Alloy Framework](https://reader034.fdocuments.in/reader034/viewer/2022052222/554d2d57b4c905c5208b533a/html5/thumbnails/2.jpg)
About Me
• Karthi Ponnusamy
• Mobile Developer @anubavam
• Titanium Certified Mobile Developer(TCMD)
• Twitter @karthi_nkl
• Blog http://www.titaniumtutorial.com/
![Page 3: Titanium Alloy Framework](https://reader034.fdocuments.in/reader034/viewer/2022052222/554d2d57b4c905c5208b533a/html5/thumbnails/3.jpg)
Agenda
Appcelerator Titanium Mobile - Intro
CodeStrong 2012
Alloy
![Page 4: Titanium Alloy Framework](https://reader034.fdocuments.in/reader034/viewer/2022052222/554d2d57b4c905c5208b533a/html5/thumbnails/4.jpg)
Appcelerator Titanium Mobile
Framework for build native mobile, desktop and web apps
Support multiple platform in single code base
Develop native mobile apps using your web skills
Open source
Extend Titanium
Tons of Features
![Page 5: Titanium Alloy Framework](https://reader034.fdocuments.in/reader034/viewer/2022052222/554d2d57b4c905c5208b533a/html5/thumbnails/5.jpg)
CodeStrong
Mobile developer conference
Meet other mobile developers and companies
Meet Appcelerator executives and engineers
Boot camp for mobile developers
![Page 6: Titanium Alloy Framework](https://reader034.fdocuments.in/reader034/viewer/2022052222/554d2d57b4c905c5208b533a/html5/thumbnails/6.jpg)
Moments of CodeStrong 2012
Windows 8 Platform support
Appc Partnership with DENSO Corporation and AT&T
One-year anniversary of Open Marketplace
Titanium SDK 3.0
Alloy MVC framework
Lanica Platino - Game engine for Titanium
![Page 7: Titanium Alloy Framework](https://reader034.fdocuments.in/reader034/viewer/2022052222/554d2d57b4c905c5208b533a/html5/thumbnails/7.jpg)
What is Alloy?
Model-View-Controller (MVC) pattern Model - Database interface View - User interface - Presentation Layer Controller - Interacts with data and updates the view
- Respond to user interaction
Component-oriented application framework Create reusable components Open source
![Page 8: Titanium Alloy Framework](https://reader034.fdocuments.in/reader034/viewer/2022052222/554d2d57b4c905c5208b533a/html5/thumbnails/8.jpg)
Why Alloy?
Structure your Titanium applications
Separates presentation layer
Speed up development
Code organization - Easy to maintain
Code re-use
![Page 9: Titanium Alloy Framework](https://reader034.fdocuments.in/reader034/viewer/2022052222/554d2d57b4c905c5208b533a/html5/thumbnails/9.jpg)
Requirements & Supported Platform
Titanium SDK 2.1 or greater Node.js 0.6.3 or greater
Development support - OSX and Windows (Linux support in progress)
Android - 2.2 (API8) or greater iPad - 4.2 or greater iPhone - 4.2 or greater
![Page 10: Titanium Alloy Framework](https://reader034.fdocuments.in/reader034/viewer/2022052222/554d2d57b4c905c5208b533a/html5/thumbnails/10.jpg)
Getting Start
Alloy Quick start Guide - http://bit.ly/alloyqs
Alloy Google Group - http://bit.ly/alloy_group
Alloy on Github - https://github.com/appcelerator/alloy
Wiki Docs - http://bit.ly/alloy_docs
![Page 11: Titanium Alloy Framework](https://reader034.fdocuments.in/reader034/viewer/2022052222/554d2d57b4c905c5208b533a/html5/thumbnails/11.jpg)
Install Alloy
Download or update Titanium Studio to V3.0http://bit.ly/alloy_development
Install from terminal$sudo npm install alloy -g
![Page 12: Titanium Alloy Framework](https://reader034.fdocuments.in/reader034/viewer/2022052222/554d2d57b4c905c5208b533a/html5/thumbnails/12.jpg)
New Alloy Project
In Ti Studio File > New > Titanium Project > Alloy
In TerminalCreate new Titanium Project > open the project in Terminal
$alloy new
![Page 13: Titanium Alloy Framework](https://reader034.fdocuments.in/reader034/viewer/2022052222/554d2d57b4c905c5208b533a/html5/thumbnails/13.jpg)
Directory Structure
![Page 14: Titanium Alloy Framework](https://reader034.fdocuments.in/reader034/viewer/2022052222/554d2d57b4c905c5208b533a/html5/thumbnails/14.jpg)
Output Screen
![Page 15: Titanium Alloy Framework](https://reader034.fdocuments.in/reader034/viewer/2022052222/554d2d57b4c905c5208b533a/html5/thumbnails/15.jpg)
views/index.xml
![Page 16: Titanium Alloy Framework](https://reader034.fdocuments.in/reader034/viewer/2022052222/554d2d57b4c905c5208b533a/html5/thumbnails/16.jpg)
styles/index.tss
![Page 17: Titanium Alloy Framework](https://reader034.fdocuments.in/reader034/viewer/2022052222/554d2d57b4c905c5208b533a/html5/thumbnails/17.jpg)
controller/index.js
![Page 18: Titanium Alloy Framework](https://reader034.fdocuments.in/reader034/viewer/2022052222/554d2d57b4c905c5208b533a/html5/thumbnails/18.jpg)
Create Controller
In Ti Studio(Right-click on a your project > New > Alloy Controller )
In Terminal$alloy generate controller [controller name]
![Page 19: Titanium Alloy Framework](https://reader034.fdocuments.in/reader034/viewer/2022052222/554d2d57b4c905c5208b533a/html5/thumbnails/19.jpg)
Create Model
In Ti Studio(Right-click on a your project > New > Alloy Model)
In Terminal$alloy generate model todo name:string active:boolean
![Page 20: Titanium Alloy Framework](https://reader034.fdocuments.in/reader034/viewer/2022052222/554d2d57b4c905c5208b533a/html5/thumbnails/20.jpg)
Platform Specific UI
Use platform property , which can be ios, android, or mobileweb
![Page 21: Titanium Alloy Framework](https://reader034.fdocuments.in/reader034/viewer/2022052222/554d2d57b4c905c5208b533a/html5/thumbnails/21.jpg)
require components
Break up your application into smaller components
![Page 22: Titanium Alloy Framework](https://reader034.fdocuments.in/reader034/viewer/2022052222/554d2d57b4c905c5208b533a/html5/thumbnails/22.jpg)
Shared TSS and Global function
Declare your styles at [project root]/app/styles/app.tss
Declare your global functions/variables at[project root]/app/alloy.js
![Page 23: Titanium Alloy Framework](https://reader034.fdocuments.in/reader034/viewer/2022052222/554d2d57b4c905c5208b533a/html5/thumbnails/23.jpg)
Demo
Android
iPhone
Source Code:
https://github.com/appcelerator/alloy/tree/master/test/apps/models/todo