alloy - codestrong 2012
TRANSCRIPT
![Page 1: Alloy - Codestrong 2012](https://reader036.vdocuments.mx/reader036/viewer/2022062300/5581c53dd8b42ae06c8b4720/html5/thumbnails/1.jpg)
Alloy App Framework Overview
Tony LukasavageLead Alloy Engineer
Appcelerator@tonylukasavage
![Page 2: Alloy - Codestrong 2012](https://reader036.vdocuments.mx/reader036/viewer/2022062300/5581c53dd8b42ae06c8b4720/html5/thumbnails/2.jpg)
• MVC Framework
• Declarative UI
• Free and open source
• Highly customizable
• Awesome. Yes, awesome.
What is Alloy?
![Page 3: Alloy - Codestrong 2012](https://reader036.vdocuments.mx/reader036/viewer/2022062300/5581c53dd8b42ae06c8b4720/html5/thumbnails/3.jpg)
Titanium App
![Page 4: Alloy - Codestrong 2012](https://reader036.vdocuments.mx/reader036/viewer/2022062300/5581c53dd8b42ae06c8b4720/html5/thumbnails/4.jpg)
Alloy App
index.tss
index.xml
![Page 5: Alloy - Codestrong 2012](https://reader036.vdocuments.mx/reader036/viewer/2022062300/5581c53dd8b42ae06c8b4720/html5/thumbnails/5.jpg)
$.index.open()
index.js
![Page 6: Alloy - Codestrong 2012](https://reader036.vdocuments.mx/reader036/viewer/2022062300/5581c53dd8b42ae06c8b4720/html5/thumbnails/6.jpg)
• Primary• views• controllers• styles• models• assets
• Optional• lib• migrations• widgets
• Platform-specific folders
Structure
![Page 7: Alloy - Codestrong 2012](https://reader036.vdocuments.mx/reader036/viewer/2022062300/5581c53dd8b42ae06c8b4720/html5/thumbnails/7.jpg)
• IDs and classes
• Platform and form factor specific markup
• Inline events
• API parsers
Views
![Page 8: Alloy - Codestrong 2012](https://reader036.vdocuments.mx/reader036/viewer/2022062300/5581c53dd8b42ae06c8b4720/html5/thumbnails/8.jpg)
• TSS format• Titanium constants• Localization• Alloy configuration items
• Group by ID, class, or Ti API
• Device queries
• Global style
Styles
![Page 9: Alloy - Codestrong 2012](https://reader036.vdocuments.mx/reader036/viewer/2022062300/5581c53dd8b42ae06c8b4720/html5/thumbnails/9.jpg)
• Element access via $
• Public interface via exports
• Compiler directives
• Backbone eventing
• Underscore and builtins
• Anything Titanium can do
Controllers
![Page 10: Alloy - Codestrong 2012](https://reader036.vdocuments.mx/reader036/viewer/2022062300/5581c53dd8b42ae06c8b4720/html5/thumbnails/10.jpg)
• Backbone Models & Collections
• Persistence adapters
• Migration support
Models
![Page 11: Alloy - Codestrong 2012](https://reader036.vdocuments.mx/reader036/viewer/2022062300/5581c53dd8b42ae06c8b4720/html5/thumbnails/11.jpg)
• Self-contained UI and logic
• Work in any Alloy app
• Cross-platform
• Simple to complex
Widgets
![Page 12: Alloy - Codestrong 2012](https://reader036.vdocuments.mx/reader036/viewer/2022062300/5581c53dd8b42ae06c8b4720/html5/thumbnails/12.jpg)
Traditional
Library
300 lines of code
![Page 13: Alloy - Codestrong 2012](https://reader036.vdocuments.mx/reader036/viewer/2022062300/5581c53dd8b42ae06c8b4720/html5/thumbnails/13.jpg)
• Generates CommonJS controller modules
• builtins
• Optimizations
• Catch errors before runtime
Compilation
![Page 14: Alloy - Codestrong 2012](https://reader036.vdocuments.mx/reader036/viewer/2022062300/5581c53dd8b42ae06c8b4720/html5/thumbnails/14.jpg)
Error output
• Faster development iterations
• Surfaces potential errors
![Page 15: Alloy - Codestrong 2012](https://reader036.vdocuments.mx/reader036/viewer/2022062300/5581c53dd8b42ae06c8b4720/html5/thumbnails/15.jpg)
• Quick Start: bit.ly/alloyqs
• [sudo] npm install –g alloy
• TiStudio/TiSDK 3.0
• More Information• Wiki docs: bit.ly/alloy_docs• Google Groups: bit.ly/alloy_group• Github: github.com/appcelerator/alloy
Getting Started
![Page 16: Alloy - Codestrong 2012](https://reader036.vdocuments.mx/reader036/viewer/2022062300/5581c53dd8b42ae06c8b4720/html5/thumbnails/16.jpg)
github.com/appcelerator/Codestrong
![Page 18: Alloy - Codestrong 2012](https://reader036.vdocuments.mx/reader036/viewer/2022062300/5581c53dd8b42ae06c8b4720/html5/thumbnails/18.jpg)
Scaffolding