SlideShare una empresa de Scribd logo
1 de 9
Descargar para leer sin conexión
Quick	
  Method	
  for	
  working	
  with	
  
Models	
  in	
  Alloy	
  
Aaron	
  K.	
  Saunders	
  
CEO	
  Clearly	
  Innova?ve	
  Inc	
  
June	
  2013	
  
About	
  Alloy	
  
Alloy	
  is	
  a	
  new	
  applica?on	
  framework	
  by	
  
Appcelerator	
  for	
  Titanium.	
  It	
  provides	
  a	
  MVC	
  
framework	
  for	
  developers	
  that	
  are	
  building	
  
Titanium	
  apps.	
  
hJp://docs.appcelerator.com/?tanium/latest/#!/guide/Alloy_Framework	
  
	
  
Appcelerator	
  Alloy	
  &	
  Models	
  
•  What	
  is	
  Appcelerator	
  Alloy,	
  See	
  link	
  below	
  for	
  
slide	
  deck	
  with	
  overview.	
  
– hJp://www.slideshare.net/aaronksaunders/
modev-­‐east2012	
  
•  Who	
  is	
  This	
  For	
  
– This	
  deck	
  assumes	
  you	
  have	
  a	
  basic	
  understanding	
  
of	
  Alloy	
  and	
  Backbone	
  Models	
  
– Have	
  created	
  Alloy	
  Models	
  in	
  your	
  app	
  and	
  are	
  
looking	
  for	
  an	
  easier	
  integra?on	
  
Quick	
  Way	
  to	
  Integrate	
  Models	
  
When	
  I	
  am	
  working	
  and	
  want	
  to	
  get	
  something	
  going	
  quickly	
  with	
  models,	
  I	
  hate	
  to	
  
create	
  the	
  addi?onal	
  files	
  to	
  just	
  get	
  access	
  to	
  a	
  model	
  so	
  I	
  use	
  this	
  simple	
  hack	
  below.	
  
	
  
This	
  allows	
  me	
  to	
  save	
  my	
  models	
  to	
  an	
  Appcelerator	
  Titanium	
  Property	
  
	
  
Crea?ng	
  the	
  Module	
  Object	
  
We	
  need	
  to	
  also	
  set	
  the	
  collec?on_name	
  property	
  on	
  the	
  model	
  so	
  Alloy	
  and	
  the	
  
proper?es	
  sync	
  module	
  knows	
  how	
  to	
  persist	
  the	
  object	
  
	
  
Cleaning	
  Up	
  the	
  Model	
  Object(s)	
  
To	
  clean	
  up	
  the	
  objects,	
  we	
  will	
  extend	
  the	
  Collec?on	
  object	
  to	
  have	
  a	
  cleanup	
  
method.	
  This	
  method	
  will	
  use	
  the	
  collec?on_name	
  to	
  find	
  the	
  models	
  that	
  were	
  saved	
  
as	
  Appcelerator	
  Titanium	
  Proper?es	
  
	
  
Crea?ng	
  a	
  Collec?on	
  Object	
  and	
  
Cleaning	
  Up	
  
Here	
  we	
  create	
  a	
  UserCollec?on	
  from	
  the	
  Collec?on	
  Object	
  we	
  extended	
  on	
  the	
  
previous	
  slide.	
  We	
  take	
  this	
  approach	
  so	
  that	
  all	
  Collec?ons	
  created	
  will	
  now	
  be	
  able	
  
to	
  call	
  the	
  cleanup	
  func?on	
  to	
  purge	
  any	
  associated	
  models.	
  
	
  
The	
  Source	
  Code	
  
•  Gists	
  
–  hJps://gist.github.com/aaronksaunders/
75a3e23cda8a830d31fc	
  
•  Blog	
  Post	
  
–  hJp://www.clearlyinnova?ve.com/blog/post/
34758524608/quick-­‐way-­‐to-­‐work-­‐with-­‐models-­‐and-­‐
alloy-­‐in-­‐appcelerator-­‐?tanium	
  
•  Alloy	
  Proper?es	
  Async	
  Adapter	
  
–  hJps://github.com/appcelerator/alloy/blob/master/
Alloy/lib/alloy/sync/proper?es.js	
  
Aaron	
  K	
  Saunders	
  
Twi$er:	
  @aaronksaunders	
  
blog:	
  hJp://blog.clearlyinnova?ve.com	
  
Facebook:	
  hJps://www.facebook.com/ClearlyInnova?veInc	
  
Github	
  :	
  hJps://github.com/aaronksaunders/	
  
SlideShare:	
  hJp://www.slideshare.net/aaronksaunders/	
  
	
  
1706	
  R	
  Street,	
  NW	
  
Washington,	
  DC	
  20009	
  
www.clearlyinnova?ve.com	
  
	
  

Más contenido relacionado

La actualidad más candente

Java spring mysql without hibernate(2) (1)
Java spring mysql without hibernate(2) (1)Java spring mysql without hibernate(2) (1)
Java spring mysql without hibernate(2) (1)
AmedJacobReza
 
SharePoint Saturday Lisbon 2017 - SharePoint Framework, Angular & Azure Funct...
SharePoint Saturday Lisbon 2017 - SharePoint Framework, Angular & Azure Funct...SharePoint Saturday Lisbon 2017 - SharePoint Framework, Angular & Azure Funct...
SharePoint Saturday Lisbon 2017 - SharePoint Framework, Angular & Azure Funct...
Sébastien Levert
 

La actualidad más candente (20)

Alloy Simple App Demonstration
Alloy Simple App DemonstrationAlloy Simple App Demonstration
Alloy Simple App Demonstration
 
Appcelerator Titanium Alloy
Appcelerator Titanium Alloy Appcelerator Titanium Alloy
Appcelerator Titanium Alloy
 
Story ofcorespring infodeck
Story ofcorespring infodeckStory ofcorespring infodeck
Story ofcorespring infodeck
 
Angular2 + Ng-Lightning + Lightning Design System = Great Apps
Angular2 + Ng-Lightning + Lightning Design System = Great AppsAngular2 + Ng-Lightning + Lightning Design System = Great Apps
Angular2 + Ng-Lightning + Lightning Design System = Great Apps
 
Angular elements - embed your angular components EVERYWHERE
Angular elements - embed your angular components EVERYWHEREAngular elements - embed your angular components EVERYWHERE
Angular elements - embed your angular components EVERYWHERE
 
Testing AngularJS
Testing AngularJSTesting AngularJS
Testing AngularJS
 
Getting Started with the Angular 2 CLI
Getting Started with the Angular 2 CLIGetting Started with the Angular 2 CLI
Getting Started with the Angular 2 CLI
 
Angular2 + New Firebase in Action
Angular2 + New Firebase in ActionAngular2 + New Firebase in Action
Angular2 + New Firebase in Action
 
Creating BananaJS with Angular 2, Angular CLI, and Material Design
Creating BananaJS with Angular 2, Angular CLI, and Material DesignCreating BananaJS with Angular 2, Angular CLI, and Material Design
Creating BananaJS with Angular 2, Angular CLI, and Material Design
 
Rails for Django developers
Rails for Django developersRails for Django developers
Rails for Django developers
 
The Ultimate Getting Started with Angular Workshop - Devoxx UK 2017
The Ultimate Getting Started with Angular Workshop - Devoxx UK 2017The Ultimate Getting Started with Angular Workshop - Devoxx UK 2017
The Ultimate Getting Started with Angular Workshop - Devoxx UK 2017
 
Titanium Alloy Framework
Titanium Alloy FrameworkTitanium Alloy Framework
Titanium Alloy Framework
 
The Tale of 2 CLIs - Ember-cli and Angular-cli
The Tale of 2 CLIs - Ember-cli and Angular-cliThe Tale of 2 CLIs - Ember-cli and Angular-cli
The Tale of 2 CLIs - Ember-cli and Angular-cli
 
How to create an angular 2.0 application in liferay dxp to fetch the ootb adv...
How to create an angular 2.0 application in liferay dxp to fetch the ootb adv...How to create an angular 2.0 application in liferay dxp to fetch the ootb adv...
How to create an angular 2.0 application in liferay dxp to fetch the ootb adv...
 
Micro frontend
Micro frontendMicro frontend
Micro frontend
 
Java spring mysql without hibernate(2) (1)
Java spring mysql without hibernate(2) (1)Java spring mysql without hibernate(2) (1)
Java spring mysql without hibernate(2) (1)
 
Creating an Angular 2 Angular CLI app in 15 Minutes Using MaterializeCSS & Fi...
Creating an Angular 2 Angular CLI app in 15 Minutes Using MaterializeCSS & Fi...Creating an Angular 2 Angular CLI app in 15 Minutes Using MaterializeCSS & Fi...
Creating an Angular 2 Angular CLI app in 15 Minutes Using MaterializeCSS & Fi...
 
Using Angular-CLI to Deploy an Angular 2 App Using Firebase in 30 Minutes
Using Angular-CLI to Deploy an Angular 2 App Using Firebase in 30 MinutesUsing Angular-CLI to Deploy an Angular 2 App Using Firebase in 30 Minutes
Using Angular-CLI to Deploy an Angular 2 App Using Firebase in 30 Minutes
 
Why you should add React to your Rails application now!
Why you should add React to your Rails application now!Why you should add React to your Rails application now!
Why you should add React to your Rails application now!
 
SharePoint Saturday Lisbon 2017 - SharePoint Framework, Angular & Azure Funct...
SharePoint Saturday Lisbon 2017 - SharePoint Framework, Angular & Azure Funct...SharePoint Saturday Lisbon 2017 - SharePoint Framework, Angular & Azure Funct...
SharePoint Saturday Lisbon 2017 - SharePoint Framework, Angular & Azure Funct...
 

Similar a Quick Way to work with Models and Alloy in Appcelerator Titanium

Unlimited training using Angular p_p_t
Unlimited training  using Angular   p_p_tUnlimited training  using Angular   p_p_t
Unlimited training using Angular p_p_t
NeelaSaiKiran
 
Appcelerator Alloy Deep Dive - tiTokyo 2013
Appcelerator Alloy Deep Dive - tiTokyo 2013Appcelerator Alloy Deep Dive - tiTokyo 2013
Appcelerator Alloy Deep Dive - tiTokyo 2013
Ricardo Alcocer
 
Session 3 - Object oriented programming with Objective-C (part 1)
Session 3 - Object oriented programming with Objective-C (part 1)Session 3 - Object oriented programming with Objective-C (part 1)
Session 3 - Object oriented programming with Objective-C (part 1)
Vu Tran Lam
 

Similar a Quick Way to work with Models and Alloy in Appcelerator Titanium (20)

Angular.ppt
Angular.pptAngular.ppt
Angular.ppt
 
Angular 6 Training with project in hyderabad india
Angular 6 Training with project in hyderabad indiaAngular 6 Training with project in hyderabad india
Angular 6 Training with project in hyderabad india
 
How to start SPEAK3 development
How to start SPEAK3 developmentHow to start SPEAK3 development
How to start SPEAK3 development
 
Sitecore SPEAK3 presentation
Sitecore SPEAK3 presentationSitecore SPEAK3 presentation
Sitecore SPEAK3 presentation
 
Angular Live training basic to Advance
Angular Live training basic to Advance Angular Live training basic to Advance
Angular Live training basic to Advance
 
Best Angular Training Online: Angular tutorial | Learn Angular 2 to 10 |
Best Angular Training Online: Angular tutorial | Learn Angular 2 to 10 | Best Angular Training Online: Angular tutorial | Learn Angular 2 to 10 |
Best Angular Training Online: Angular tutorial | Learn Angular 2 to 10 |
 
Angular Universal How to Build Angular SEO Friendly App.pdf
Angular Universal How to Build Angular SEO Friendly App.pdfAngular Universal How to Build Angular SEO Friendly App.pdf
Angular Universal How to Build Angular SEO Friendly App.pdf
 
Angularjs2 presentation
Angularjs2 presentationAngularjs2 presentation
Angularjs2 presentation
 
Unlimited training using Angular p_p_t
Unlimited training  using Angular   p_p_tUnlimited training  using Angular   p_p_t
Unlimited training using Angular p_p_t
 
Angular - Chapter 3 - Components
Angular - Chapter 3 - ComponentsAngular - Chapter 3 - Components
Angular - Chapter 3 - Components
 
Angular kickstart slideshare
Angular kickstart   slideshareAngular kickstart   slideshare
Angular kickstart slideshare
 
Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017
 
Angular js getting started
Angular js getting startedAngular js getting started
Angular js getting started
 
Introduction To Angular.js - SpringPeople
Introduction To Angular.js - SpringPeopleIntroduction To Angular.js - SpringPeople
Introduction To Angular.js - SpringPeople
 
Web Components: The Future of Web Development is Here
Web Components: The Future of Web Development is HereWeb Components: The Future of Web Development is Here
Web Components: The Future of Web Development is Here
 
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
 
AngularJS best-practices
AngularJS best-practicesAngularJS best-practices
AngularJS best-practices
 
Ng Sydney Dynamic Templates Talk - 18 April 2018
Ng Sydney Dynamic Templates Talk - 18 April 2018Ng Sydney Dynamic Templates Talk - 18 April 2018
Ng Sydney Dynamic Templates Talk - 18 April 2018
 
Session 3 - Object oriented programming with Objective-C (part 1)
Session 3 - Object oriented programming with Objective-C (part 1)Session 3 - Object oriented programming with Objective-C (part 1)
Session 3 - Object oriented programming with Objective-C (part 1)
 

Más de Aaron Saunders

Getting Started with Appcelerator Alloy - Cross Platform Mobile Development -...
Getting Started with Appcelerator Alloy - Cross Platform Mobile Development -...Getting Started with Appcelerator Alloy - Cross Platform Mobile Development -...
Getting Started with Appcelerator Alloy - Cross Platform Mobile Development -...
Aaron Saunders
 
Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013
Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013
Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013
Aaron Saunders
 
StackMob & Appcelerator Module Part One
StackMob & Appcelerator Module Part OneStackMob & Appcelerator Module Part One
StackMob & Appcelerator Module Part One
Aaron Saunders
 
Modeveast Appcelerator Presentation
Modeveast Appcelerator PresentationModeveast Appcelerator Presentation
Modeveast Appcelerator Presentation
Aaron Saunders
 

Más de Aaron Saunders (14)

Mobile Application Workshop - So You Want To Build a Mobile App?
Mobile Application Workshop - So You Want To Build a Mobile App?Mobile Application Workshop - So You Want To Build a Mobile App?
Mobile Application Workshop - So You Want To Build a Mobile App?
 
Getting Started with Appcelerator Alloy - Cross Platform Mobile Development -...
Getting Started with Appcelerator Alloy - Cross Platform Mobile Development -...Getting Started with Appcelerator Alloy - Cross Platform Mobile Development -...
Getting Started with Appcelerator Alloy - Cross Platform Mobile Development -...
 
Identify & Unlock Your Mobile Strategy
Identify & Unlock Your Mobile StrategyIdentify & Unlock Your Mobile Strategy
Identify & Unlock Your Mobile Strategy
 
SubAid User Guide - Overview
SubAid User Guide - OverviewSubAid User Guide - Overview
SubAid User Guide - Overview
 
DC Health Link New Mobile App 1.0 Brings Health Insurance Resources to Consum...
DC Health Link New Mobile App 1.0 Brings Health Insurance Resources to Consum...DC Health Link New Mobile App 1.0 Brings Health Insurance Resources to Consum...
DC Health Link New Mobile App 1.0 Brings Health Insurance Resources to Consum...
 
Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013
Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013
Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013
 
Simple Unit Testing in Appcelerator Titanium Alloy
Simple Unit Testing in Appcelerator Titanium AlloySimple Unit Testing in Appcelerator Titanium Alloy
Simple Unit Testing in Appcelerator Titanium Alloy
 
DC Titanium User Group Meetup: Appcelerator Titanium Alloy jan2013
DC Titanium User Group Meetup: Appcelerator Titanium Alloy jan2013DC Titanium User Group Meetup: Appcelerator Titanium Alloy jan2013
DC Titanium User Group Meetup: Appcelerator Titanium Alloy jan2013
 
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
 
Introduction to Module Development with Appcelerator Titanium
Introduction to Module Development with Appcelerator TitaniumIntroduction to Module Development with Appcelerator Titanium
Introduction to Module Development with Appcelerator Titanium
 
Clearly Innovative Inc Capabilities
Clearly Innovative Inc CapabilitiesClearly Innovative Inc Capabilities
Clearly Innovative Inc Capabilities
 
PaaS + Appcelerator = WIN
PaaS + Appcelerator = WINPaaS + Appcelerator = WIN
PaaS + Appcelerator = WIN
 
StackMob & Appcelerator Module Part One
StackMob & Appcelerator Module Part OneStackMob & Appcelerator Module Part One
StackMob & Appcelerator Module Part One
 
Modeveast Appcelerator Presentation
Modeveast Appcelerator PresentationModeveast Appcelerator Presentation
Modeveast Appcelerator Presentation
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

Quick Way to work with Models and Alloy in Appcelerator Titanium

  • 1. Quick  Method  for  working  with   Models  in  Alloy   Aaron  K.  Saunders   CEO  Clearly  Innova?ve  Inc   June  2013  
  • 2. About  Alloy   Alloy  is  a  new  applica?on  framework  by   Appcelerator  for  Titanium.  It  provides  a  MVC   framework  for  developers  that  are  building   Titanium  apps.   hJp://docs.appcelerator.com/?tanium/latest/#!/guide/Alloy_Framework    
  • 3. Appcelerator  Alloy  &  Models   •  What  is  Appcelerator  Alloy,  See  link  below  for   slide  deck  with  overview.   – hJp://www.slideshare.net/aaronksaunders/ modev-­‐east2012   •  Who  is  This  For   – This  deck  assumes  you  have  a  basic  understanding   of  Alloy  and  Backbone  Models   – Have  created  Alloy  Models  in  your  app  and  are   looking  for  an  easier  integra?on  
  • 4. Quick  Way  to  Integrate  Models   When  I  am  working  and  want  to  get  something  going  quickly  with  models,  I  hate  to   create  the  addi?onal  files  to  just  get  access  to  a  model  so  I  use  this  simple  hack  below.     This  allows  me  to  save  my  models  to  an  Appcelerator  Titanium  Property    
  • 5. Crea?ng  the  Module  Object   We  need  to  also  set  the  collec?on_name  property  on  the  model  so  Alloy  and  the   proper?es  sync  module  knows  how  to  persist  the  object    
  • 6. Cleaning  Up  the  Model  Object(s)   To  clean  up  the  objects,  we  will  extend  the  Collec?on  object  to  have  a  cleanup   method.  This  method  will  use  the  collec?on_name  to  find  the  models  that  were  saved   as  Appcelerator  Titanium  Proper?es    
  • 7. Crea?ng  a  Collec?on  Object  and   Cleaning  Up   Here  we  create  a  UserCollec?on  from  the  Collec?on  Object  we  extended  on  the   previous  slide.  We  take  this  approach  so  that  all  Collec?ons  created  will  now  be  able   to  call  the  cleanup  func?on  to  purge  any  associated  models.    
  • 8. The  Source  Code   •  Gists   –  hJps://gist.github.com/aaronksaunders/ 75a3e23cda8a830d31fc   •  Blog  Post   –  hJp://www.clearlyinnova?ve.com/blog/post/ 34758524608/quick-­‐way-­‐to-­‐work-­‐with-­‐models-­‐and-­‐ alloy-­‐in-­‐appcelerator-­‐?tanium   •  Alloy  Proper?es  Async  Adapter   –  hJps://github.com/appcelerator/alloy/blob/master/ Alloy/lib/alloy/sync/proper?es.js  
  • 9. Aaron  K  Saunders   Twi$er:  @aaronksaunders   blog:  hJp://blog.clearlyinnova?ve.com   Facebook:  hJps://www.facebook.com/ClearlyInnova?veInc   Github  :  hJps://github.com/aaronksaunders/   SlideShare:  hJp://www.slideshare.net/aaronksaunders/     1706  R  Street,  NW   Washington,  DC  20009   www.clearlyinnova?ve.com