SlideShare a Scribd company logo
Fokke Zandbergen
app imagineer
im·ag·i·neer “to both
imagine and create
something that is new”
ALLOY
28 januari 2012
Where’s alloy?
JavaScript
Native
Titanium
Alloy
“An alloy is a mixture or metallic solid
solution composed of two or more
elements”
“Alloys usually have different properties
from those of the component elements.”
What’s an alloy?
What’s in Alloy?
TSS
XML
Views
+
=
Libs
Widgets
JS definition
=
Models Controllers
Alloy.CFGconfig.json
How does Alloy work?
Views
Libs
Widgets
JS definition
=
Models Controllers
Alloy.CFGconfig.json
How does Alloy work?
Libs
Widgets
JS definition
=
Models ControllersCommonJS
Alloy.CFGconfig.json
How does Alloy work?
Libs
Widgets
JS definition
=
Models ControllersCommonJS
Alloy.CFG
How does Alloy work?
Collections
syncs
Stores
Libs
Widgets
Models ControllersCommonJS
Alloy.CFG
How does Alloy work?
optimization
Collections
syncs
Stores
Libs
Widgets
Models ControllersCommonJS
Alloy.CFG
How does Alloy work?
Alloy Views · Markup
• XML elements corresponds to Ti.UI objects
• Require other views and widgets
• id for access from controller
• platform and formFactor conditions
• platform specific folders
• bind events to controller methods
• bind markup to models via generated controller code
DEMO
Alloy Controllers
• $.someID to access view elements
• exports.baseController to inherit a parent controller
• platform (OS_) and environment (ENV_) constants
• Passing arguments: var args = arguments[0] || {};
• Alloy.Globals namespace
• Require libraries from ‘lib’ folder
DEMO
Alloy Models
• Abstracted BackboneJS, but still a must-read
• “Collections keep models in memory & synced to a store”
• Database > Connection > Result > Row
• Easily extend BackboneJS classes
• SQL, properties and localStorage sync adapters
• Migrations
• Model-View binding
DEMO
Alloy Views · Styles
• CSS like JSON style
• #ID over .class over element
• Titanium constants like Ti.UI.TEXT_ALIGNMENT_LEFT
• Alloy.Globals and Alloy.CFG for expressions etc.
• platform and formFactor conditions
• platform specific folders
DEMO
Alloy Views · Themes
• Overwrite assets
• Overrule styles
• Global app.tss
• platform and density specific (asset) folders
• config.json environment/platform dependent selection
DEMO
Alloy Widgets
• Self-contained Alloy components almost like mini-apps
• controllers, views, styles, assets, libs
• models and theming coming
• Require like views or use <Widget>
• Use widgets in widgets
• Marketplace and NPM-like distribution coming
DEMO
Alloy Optimization
• From app to Resources folder
• Platform specific folders, conditional styles, conditional JS
unused libraries and builtins all stripped out!
• UglifyJS for optimal speed and compactness
• Build configuration file for pre and post compile tasks
DEMO
How to get started with Alloy?
• Get Titanium Studio 3.x from www.appcelerator.com
• Follow me @FokkeZB or fokkezb.nl for upcoming:
• Slides
• Code shown today
• Alloy Quick Start and links to various resources
Q&A
Fokke Zandbergen
app imagineer
www.fokkezb.nl
mail@fokkezb.nl
@fokkezb

More Related Content

What's hot

Sitecore MVC Forms Localization
Sitecore MVC Forms LocalizationSitecore MVC Forms Localization
Sitecore MVC Forms Localization
Tobias Studer
 
Graphql
GraphqlGraphql
A Persistence Service for the OSGi Framework - Carl Rosenberger, Chief Softwa...
A Persistence Service for the OSGi Framework - Carl Rosenberger, Chief Softwa...A Persistence Service for the OSGi Framework - Carl Rosenberger, Chief Softwa...
A Persistence Service for the OSGi Framework - Carl Rosenberger, Chief Softwa...
mfrancis
 
Persistence Smoothie
Persistence SmoothiePersistence Smoothie
Persistence SmoothieFlip Sasser
 
Angular 2 with typescript
Angular 2 with typescriptAngular 2 with typescript
Angular 2 with typescript
Tayseer_Emam
 
Uniqueness of java
Uniqueness of javaUniqueness of java
Uniqueness of java
Sandeep Pandey
 
Prezentare Razvan Antonescu
Prezentare Razvan Antonescu Prezentare Razvan Antonescu
Prezentare Razvan Antonescu
IMTO
 
Rails 3.1 Asset pipeline
Rails 3.1 Asset pipelineRails 3.1 Asset pipeline
Rails 3.1 Asset pipeline
jeremyolliver
 
Rishabh Technology and Tools Overview (1)
Rishabh Technology and Tools Overview (1)Rishabh Technology and Tools Overview (1)
Rishabh Technology and Tools Overview (1)D Trivedi
 
Swagger: Restful documentation that won't put you to sleep
Swagger: Restful documentation that won't put you to sleepSwagger: Restful documentation that won't put you to sleep
Swagger: Restful documentation that won't put you to sleep
Tobias Coetzee
 
Introduction to the SharePoint Client Object Model
Introduction to the SharePoint Client Object ModelIntroduction to the SharePoint Client Object Model
Introduction to the SharePoint Client Object Model
Ben Robb
 
Software testing course content,advanto software
Software testing course content,advanto softwareSoftware testing course content,advanto software
Software testing course content,advanto software
Advanto Software
 
Angular js training in pune course content By Advanto Software
Angular js training in pune course  content By Advanto SoftwareAngular js training in pune course  content By Advanto Software
Angular js training in pune course content By Advanto Software
Advanto Software
 
Chris O'Brien - Customizing the SharePoint/Office 365 UI with JavaScript (ESP...
Chris O'Brien - Customizing the SharePoint/Office 365 UI with JavaScript (ESP...Chris O'Brien - Customizing the SharePoint/Office 365 UI with JavaScript (ESP...
Chris O'Brien - Customizing the SharePoint/Office 365 UI with JavaScript (ESP...
Chris O'Brien
 
Angular patterns
Angular patternsAngular patterns
Angular patterns
Premkumar M
 
Azure App Configuration with .NET applications
Azure App Configuration with .NET applicationsAzure App Configuration with .NET applications
Azure App Configuration with .NET applications
Christian Nagel
 
2017.09.09 Orbit - Seattle Code Camp
2017.09.09 Orbit - Seattle Code Camp2017.09.09 Orbit - Seattle Code Camp
2017.09.09 Orbit - Seattle Code Camp
Victor Hurdugaci
 
HAL APIs and Ember Data
HAL APIs and Ember DataHAL APIs and Ember Data
HAL APIs and Ember Data
Cory Forsyth
 

What's hot (20)

Sitecore MVC Forms Localization
Sitecore MVC Forms LocalizationSitecore MVC Forms Localization
Sitecore MVC Forms Localization
 
Graphql
GraphqlGraphql
Graphql
 
A Persistence Service for the OSGi Framework - Carl Rosenberger, Chief Softwa...
A Persistence Service for the OSGi Framework - Carl Rosenberger, Chief Softwa...A Persistence Service for the OSGi Framework - Carl Rosenberger, Chief Softwa...
A Persistence Service for the OSGi Framework - Carl Rosenberger, Chief Softwa...
 
Persistence Smoothie
Persistence SmoothiePersistence Smoothie
Persistence Smoothie
 
OAF Syllabus
OAF SyllabusOAF Syllabus
OAF Syllabus
 
Angular 2 with typescript
Angular 2 with typescriptAngular 2 with typescript
Angular 2 with typescript
 
Uniqueness of java
Uniqueness of javaUniqueness of java
Uniqueness of java
 
Prezentare Razvan Antonescu
Prezentare Razvan Antonescu Prezentare Razvan Antonescu
Prezentare Razvan Antonescu
 
Rails 3.1 Asset pipeline
Rails 3.1 Asset pipelineRails 3.1 Asset pipeline
Rails 3.1 Asset pipeline
 
Rishabh Technology and Tools Overview (1)
Rishabh Technology and Tools Overview (1)Rishabh Technology and Tools Overview (1)
Rishabh Technology and Tools Overview (1)
 
Swagger: Restful documentation that won't put you to sleep
Swagger: Restful documentation that won't put you to sleepSwagger: Restful documentation that won't put you to sleep
Swagger: Restful documentation that won't put you to sleep
 
Introduction to the SharePoint Client Object Model
Introduction to the SharePoint Client Object ModelIntroduction to the SharePoint Client Object Model
Introduction to the SharePoint Client Object Model
 
Software testing course content,advanto software
Software testing course content,advanto softwareSoftware testing course content,advanto software
Software testing course content,advanto software
 
Mule 2.2.1-users-guide
Mule 2.2.1-users-guideMule 2.2.1-users-guide
Mule 2.2.1-users-guide
 
Angular js training in pune course content By Advanto Software
Angular js training in pune course  content By Advanto SoftwareAngular js training in pune course  content By Advanto Software
Angular js training in pune course content By Advanto Software
 
Chris O'Brien - Customizing the SharePoint/Office 365 UI with JavaScript (ESP...
Chris O'Brien - Customizing the SharePoint/Office 365 UI with JavaScript (ESP...Chris O'Brien - Customizing the SharePoint/Office 365 UI with JavaScript (ESP...
Chris O'Brien - Customizing the SharePoint/Office 365 UI with JavaScript (ESP...
 
Angular patterns
Angular patternsAngular patterns
Angular patterns
 
Azure App Configuration with .NET applications
Azure App Configuration with .NET applicationsAzure App Configuration with .NET applications
Azure App Configuration with .NET applications
 
2017.09.09 Orbit - Seattle Code Camp
2017.09.09 Orbit - Seattle Code Camp2017.09.09 Orbit - Seattle Code Camp
2017.09.09 Orbit - Seattle Code Camp
 
HAL APIs and Ember Data
HAL APIs and Ember DataHAL APIs and Ember Data
HAL APIs and Ember Data
 

Similar to Alloy

Alloy #DMC13
Alloy #DMC13Alloy #DMC13
Alloy #DMC13
Fokke Zandbergen
 
Appcelerator Alloy Deep Dive - tiTokyo 2013
Appcelerator Alloy Deep Dive - tiTokyo 2013Appcelerator Alloy Deep Dive - tiTokyo 2013
Appcelerator Alloy Deep Dive - tiTokyo 2013
ralcocer
 
Appcelerator Alloy Deep Dive - tiTokyo 2013
Appcelerator Alloy Deep Dive - tiTokyo 2013Appcelerator Alloy Deep Dive - tiTokyo 2013
Appcelerator Alloy Deep Dive - tiTokyo 2013Ricardo Alcocer
 
Codestrong 2012 breakout session alloy (mvc) app framework overview
Codestrong 2012 breakout session   alloy (mvc) app framework overviewCodestrong 2012 breakout session   alloy (mvc) app framework overview
Codestrong 2012 breakout session alloy (mvc) app framework overviewAxway Appcelerator
 
Alloy Framework
Alloy FrameworkAlloy Framework
Alloy Framework
Mads Møller
 
TypeScript and Angular2 (Love at first sight)
TypeScript and Angular2 (Love at first sight)TypeScript and Angular2 (Love at first sight)
TypeScript and Angular2 (Love at first sight)
Igor Talevski
 
AngularJS 1.x - your first application (problems and solutions)
AngularJS 1.x - your first application (problems and solutions)AngularJS 1.x - your first application (problems and solutions)
AngularJS 1.x - your first application (problems and solutions)
Igor Talevski
 
Agile sites311training
Agile sites311trainingAgile sites311training
Agile sites311training
Michele Sciabarrà
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to concepts
Abhishek Sur
 
SPSSTHLM - Using JSLink and Display Templates for ITPros
SPSSTHLM - Using JSLink and Display Templates for ITProsSPSSTHLM - Using JSLink and Display Templates for ITPros
SPSSTHLM - Using JSLink and Display Templates for ITPros
Paul Hunt
 
AngularJS Beginners Workshop
AngularJS Beginners WorkshopAngularJS Beginners Workshop
AngularJS Beginners Workshop
Sathish VJ
 
#SPSLondon - Session 2 JSLink for IT Pros
#SPSLondon - Session 2 JSLink for IT Pros#SPSLondon - Session 2 JSLink for IT Pros
#SPSLondon - Session 2 JSLink for IT Pros
Paul Hunt
 
modeveast 2012 Appcelerator Alloy & Cloud Services Presentation
modeveast 2012 Appcelerator Alloy & Cloud Services Presentationmodeveast 2012 Appcelerator Alloy & Cloud Services Presentation
modeveast 2012 Appcelerator Alloy & Cloud Services Presentation
Aaron Saunders
 
EmberCLI Rails: An Integration Love Story.
EmberCLI Rails: An Integration Love Story.EmberCLI Rails: An Integration Love Story.
EmberCLI Rails: An Integration Love Story.
Jonathan Jackson
 
Intro to SPA using JavaScript & ASP.NET
Intro to SPA using JavaScript & ASP.NETIntro to SPA using JavaScript & ASP.NET
Intro to SPA using JavaScript & ASP.NETAlan Hecht
 
Joomla Modules with Permissions and Front-End Editing
Joomla Modules with Permissions and Front-End EditingJoomla Modules with Permissions and Front-End Editing
Joomla Modules with Permissions and Front-End Editing
Randy Carey
 
Angular JS - Introduction
Angular JS - IntroductionAngular JS - Introduction
Angular JS - Introduction
Sagar Acharya
 
Titanium Alloy Tutorial
Titanium Alloy TutorialTitanium Alloy Tutorial
Titanium Alloy Tutorial
Fokke Zandbergen
 
React.js for Rails Developers
React.js for Rails DevelopersReact.js for Rails Developers
React.js for Rails Developers
Arkency
 

Similar to Alloy (20)

Alloy #DMC13
Alloy #DMC13Alloy #DMC13
Alloy #DMC13
 
Appcelerator Alloy Deep Dive - tiTokyo 2013
Appcelerator Alloy Deep Dive - tiTokyo 2013Appcelerator Alloy Deep Dive - tiTokyo 2013
Appcelerator Alloy Deep Dive - tiTokyo 2013
 
Appcelerator Alloy Deep Dive - tiTokyo 2013
Appcelerator Alloy Deep Dive - tiTokyo 2013Appcelerator Alloy Deep Dive - tiTokyo 2013
Appcelerator Alloy Deep Dive - tiTokyo 2013
 
Codestrong 2012 breakout session alloy (mvc) app framework overview
Codestrong 2012 breakout session   alloy (mvc) app framework overviewCodestrong 2012 breakout session   alloy (mvc) app framework overview
Codestrong 2012 breakout session alloy (mvc) app framework overview
 
Alloy - Codestrong 2012
Alloy - Codestrong 2012Alloy - Codestrong 2012
Alloy - Codestrong 2012
 
Alloy Framework
Alloy FrameworkAlloy Framework
Alloy Framework
 
TypeScript and Angular2 (Love at first sight)
TypeScript and Angular2 (Love at first sight)TypeScript and Angular2 (Love at first sight)
TypeScript and Angular2 (Love at first sight)
 
AngularJS 1.x - your first application (problems and solutions)
AngularJS 1.x - your first application (problems and solutions)AngularJS 1.x - your first application (problems and solutions)
AngularJS 1.x - your first application (problems and solutions)
 
Agile sites311training
Agile sites311trainingAgile sites311training
Agile sites311training
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to concepts
 
SPSSTHLM - Using JSLink and Display Templates for ITPros
SPSSTHLM - Using JSLink and Display Templates for ITProsSPSSTHLM - Using JSLink and Display Templates for ITPros
SPSSTHLM - Using JSLink and Display Templates for ITPros
 
AngularJS Beginners Workshop
AngularJS Beginners WorkshopAngularJS Beginners Workshop
AngularJS Beginners Workshop
 
#SPSLondon - Session 2 JSLink for IT Pros
#SPSLondon - Session 2 JSLink for IT Pros#SPSLondon - Session 2 JSLink for IT Pros
#SPSLondon - Session 2 JSLink for IT Pros
 
modeveast 2012 Appcelerator Alloy & Cloud Services Presentation
modeveast 2012 Appcelerator Alloy & Cloud Services Presentationmodeveast 2012 Appcelerator Alloy & Cloud Services Presentation
modeveast 2012 Appcelerator Alloy & Cloud Services Presentation
 
EmberCLI Rails: An Integration Love Story.
EmberCLI Rails: An Integration Love Story.EmberCLI Rails: An Integration Love Story.
EmberCLI Rails: An Integration Love Story.
 
Intro to SPA using JavaScript & ASP.NET
Intro to SPA using JavaScript & ASP.NETIntro to SPA using JavaScript & ASP.NET
Intro to SPA using JavaScript & ASP.NET
 
Joomla Modules with Permissions and Front-End Editing
Joomla Modules with Permissions and Front-End EditingJoomla Modules with Permissions and Front-End Editing
Joomla Modules with Permissions and Front-End Editing
 
Angular JS - Introduction
Angular JS - IntroductionAngular JS - Introduction
Angular JS - Introduction
 
Titanium Alloy Tutorial
Titanium Alloy TutorialTitanium Alloy Tutorial
Titanium Alloy Tutorial
 
React.js for Rails Developers
React.js for Rails DevelopersReact.js for Rails Developers
React.js for Rails Developers
 

More from Fokke Zandbergen

Building the (Support) Robot at Zapier
Building the (Support) Robot at ZapierBuilding the (Support) Robot at Zapier
Building the (Support) Robot at Zapier
Fokke Zandbergen
 
Lessons from helping developers integrate 1,000 APIs with Zapier
Lessons from helping developers integrate 1,000 APIs with ZapierLessons from helping developers integrate 1,000 APIs with Zapier
Lessons from helping developers integrate 1,000 APIs with Zapier
Fokke Zandbergen
 
We are all Remote Advocates
We are all Remote AdvocatesWe are all Remote Advocates
We are all Remote Advocates
Fokke Zandbergen
 
Cross-platform Native App ontwikkeling met Appcelerator
Cross-platform Native App ontwikkeling met AppceleratorCross-platform Native App ontwikkeling met Appcelerator
Cross-platform Native App ontwikkeling met Appcelerator
Fokke Zandbergen
 
Building Native Mobile Apps using Javascript with Titanium
Building Native Mobile Apps using Javascript with TitaniumBuilding Native Mobile Apps using Javascript with Titanium
Building Native Mobile Apps using Javascript with Titanium
Fokke Zandbergen
 
Getting Started with Titanium & Alloy
Getting Started with Titanium & AlloyGetting Started with Titanium & Alloy
Getting Started with Titanium & Alloy
Fokke Zandbergen
 
Cross-Platform Native Apps with JavaScript
Cross-Platform Native Apps with JavaScriptCross-Platform Native Apps with JavaScript
Cross-Platform Native Apps with JavaScript
Fokke Zandbergen
 
Titanium: Develop Native Mobile Apps with JavaScript
Titanium: Develop Native Mobile Apps with JavaScriptTitanium: Develop Native Mobile Apps with JavaScript
Titanium: Develop Native Mobile Apps with JavaScript
Fokke Zandbergen
 
Appcelerator OSS & Platform
Appcelerator OSS & PlatformAppcelerator OSS & Platform
Appcelerator OSS & Platform
Fokke Zandbergen
 
Platform 4.0 Meetup Launch Event
Platform 4.0 Meetup Launch EventPlatform 4.0 Meetup Launch Event
Platform 4.0 Meetup Launch Event
Fokke Zandbergen
 
Appcelerator Alloy MVC
Appcelerator Alloy MVCAppcelerator Alloy MVC
Appcelerator Alloy MVC
Fokke Zandbergen
 
The Ultimate Titanium CLI Toolchain
The Ultimate Titanium CLI ToolchainThe Ultimate Titanium CLI Toolchain
The Ultimate Titanium CLI Toolchain
Fokke Zandbergen
 
Getting ready for iOS 8 & iPhone 6
Getting ready for iOS 8 & iPhone 6Getting ready for iOS 8 & iPhone 6
Getting ready for iOS 8 & iPhone 6
Fokke Zandbergen
 
Titanium Community Toolkit Showcase
Titanium Community Toolkit ShowcaseTitanium Community Toolkit Showcase
Titanium Community Toolkit Showcase
Fokke Zandbergen
 
5 app alternatieven #AIB2013
5 app alternatieven #AIB20135 app alternatieven #AIB2013
5 app alternatieven #AIB2013
Fokke Zandbergen
 
Apps voor kerken #Kerk2013
Apps voor kerken #Kerk2013Apps voor kerken #Kerk2013
Apps voor kerken #Kerk2013
Fokke Zandbergen
 
TiNy #TiAppCamp
TiNy #TiAppCampTiNy #TiAppCamp
TiNy #TiAppCamp
Fokke Zandbergen
 
Internetmarketing
InternetmarketingInternetmarketing
Internetmarketing
Fokke Zandbergen
 
Alloy Tips & Tricks #TiLon
Alloy Tips & Tricks #TiLonAlloy Tips & Tricks #TiLon
Alloy Tips & Tricks #TiLon
Fokke Zandbergen
 
Titanium #MDS13
Titanium #MDS13Titanium #MDS13
Titanium #MDS13
Fokke Zandbergen
 

More from Fokke Zandbergen (20)

Building the (Support) Robot at Zapier
Building the (Support) Robot at ZapierBuilding the (Support) Robot at Zapier
Building the (Support) Robot at Zapier
 
Lessons from helping developers integrate 1,000 APIs with Zapier
Lessons from helping developers integrate 1,000 APIs with ZapierLessons from helping developers integrate 1,000 APIs with Zapier
Lessons from helping developers integrate 1,000 APIs with Zapier
 
We are all Remote Advocates
We are all Remote AdvocatesWe are all Remote Advocates
We are all Remote Advocates
 
Cross-platform Native App ontwikkeling met Appcelerator
Cross-platform Native App ontwikkeling met AppceleratorCross-platform Native App ontwikkeling met Appcelerator
Cross-platform Native App ontwikkeling met Appcelerator
 
Building Native Mobile Apps using Javascript with Titanium
Building Native Mobile Apps using Javascript with TitaniumBuilding Native Mobile Apps using Javascript with Titanium
Building Native Mobile Apps using Javascript with Titanium
 
Getting Started with Titanium & Alloy
Getting Started with Titanium & AlloyGetting Started with Titanium & Alloy
Getting Started with Titanium & Alloy
 
Cross-Platform Native Apps with JavaScript
Cross-Platform Native Apps with JavaScriptCross-Platform Native Apps with JavaScript
Cross-Platform Native Apps with JavaScript
 
Titanium: Develop Native Mobile Apps with JavaScript
Titanium: Develop Native Mobile Apps with JavaScriptTitanium: Develop Native Mobile Apps with JavaScript
Titanium: Develop Native Mobile Apps with JavaScript
 
Appcelerator OSS & Platform
Appcelerator OSS & PlatformAppcelerator OSS & Platform
Appcelerator OSS & Platform
 
Platform 4.0 Meetup Launch Event
Platform 4.0 Meetup Launch EventPlatform 4.0 Meetup Launch Event
Platform 4.0 Meetup Launch Event
 
Appcelerator Alloy MVC
Appcelerator Alloy MVCAppcelerator Alloy MVC
Appcelerator Alloy MVC
 
The Ultimate Titanium CLI Toolchain
The Ultimate Titanium CLI ToolchainThe Ultimate Titanium CLI Toolchain
The Ultimate Titanium CLI Toolchain
 
Getting ready for iOS 8 & iPhone 6
Getting ready for iOS 8 & iPhone 6Getting ready for iOS 8 & iPhone 6
Getting ready for iOS 8 & iPhone 6
 
Titanium Community Toolkit Showcase
Titanium Community Toolkit ShowcaseTitanium Community Toolkit Showcase
Titanium Community Toolkit Showcase
 
5 app alternatieven #AIB2013
5 app alternatieven #AIB20135 app alternatieven #AIB2013
5 app alternatieven #AIB2013
 
Apps voor kerken #Kerk2013
Apps voor kerken #Kerk2013Apps voor kerken #Kerk2013
Apps voor kerken #Kerk2013
 
TiNy #TiAppCamp
TiNy #TiAppCampTiNy #TiAppCamp
TiNy #TiAppCamp
 
Internetmarketing
InternetmarketingInternetmarketing
Internetmarketing
 
Alloy Tips & Tricks #TiLon
Alloy Tips & Tricks #TiLonAlloy Tips & Tricks #TiLon
Alloy Tips & Tricks #TiLon
 
Titanium #MDS13
Titanium #MDS13Titanium #MDS13
Titanium #MDS13
 

Alloy