Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Rich,	  Database-­‐Driven	  Mobile	  Apps	                    Pra7k	  Patel	  
Mobile App Architecture:Platformization
The  Ghost  in theMachine
MOBILE APP ARCHITECTUREThe next step after you’ve hackedtogether your first app!                             PRATIK PATEL ...
“We can only see a shortdistance ahead, but we cansee plenty there that needs       to be done.”       -Alan Turing       ...
5 quick guidingpriciples for MAX1.  Refactor fearlessly2.  Let architecture emerge3.  Be careful of the LCD4.  Keep it in ...
EVOLVE•  TripLingo started as a single App•  We knew we’d have 50+ of the same “app”•  Also variants for each platform•  B...
IMPLEMENT•  DB Driven content•  Cross-platform.js to abstract nuances•  Border-flex layout for screen sizes•  Migrate data...
Example: DB DRIVEN    	    	Ti.App.Properties.setString(language_set, YES);	    	    	Ti.App.Properties.setString(current_...
Example: X-Platformvar fontMap = {"Aller" : "Aller_Std_Bd",	    	    	    	    	"Trade Gothic LT Std" : "TradeGothicLTStd"...
Example: B - F Layoutvar topLeftButtonImg = imgs/nook/db_btn_golearn.png;	var topRightButtonImg = imgs/nook/db_btn_wordban...
Example: DB Migration// version your database as it is NOT overwritten on install(necessarily)	old_db = Titanium.Database....
AUTOMATE•  Scripts to reduce the mundane stuff•  Hand off to non-tech people•  Allows time for new features               ...
Example: Automate	   	builder.copyTemplateProject()		   	// TODO		   	builder.processPhraseList(lang, "ISRAEL", 1050-1)		 ...
Example: Automate    	def tmpProjectDirBase = 	/Users/prpatel/dev/TripLingo/MobileWorkspace/	    	def tmpProjectDir = "${t...
sourcethecode
AUREVOIR   PRATIK PATEL        @PRPATEL      PRPATEL@TRIPLINGO.COM
Pratik Patel: Titanium as Platform: Feature-Rich, Database-Driven Mobile Apps
Pratik Patel: Titanium as Platform: Feature-Rich, Database-Driven Mobile Apps
Pratik Patel: Titanium as Platform: Feature-Rich, Database-Driven Mobile Apps
Upcoming SlideShare
Loading in …5
×

Pratik Patel: Titanium as Platform: Feature-Rich, Database-Driven Mobile Apps

1,754 views

Published on

You've developed your Titanium application, published to the app store, and started thinking about doing more. In this session, you'll learn some of the architectural and code related tips for using Titanium as a platform for building a suite of similar products for your venture. Perhaps you want to make that extra feature available as an in-app upgrade, or provide HD sound as an option to your users. Whether it's for the enterprise or for the consumer, we'll look at tips n' tricks for extending and evolving your app.
In this session, we'll cover databases, switching user-content based on data, doing upgrades over the air, building an "app suite platform" using Titanium, managing upgrades, migrating data between versions and more. Strap yourself in for a fast-paced session!

Published in: Technology, Business
  • Be the first to comment

Pratik Patel: Titanium as Platform: Feature-Rich, Database-Driven Mobile Apps

  1. 1. Rich,  Database-­‐Driven  Mobile  Apps   Pra7k  Patel  
  2. 2. Mobile App Architecture:Platformization
  3. 3. The Ghost in theMachine
  4. 4. MOBILE APP ARCHITECTUREThe next step after you’ve hackedtogether your first app! PRATIK PATEL | CTO
  5. 5. “We can only see a shortdistance ahead, but we cansee plenty there that needs to be done.” -Alan Turing PRATIK PATEL | CTO
  6. 6. 5 quick guidingpriciples for MAX1.  Refactor fearlessly2.  Let architecture emerge3.  Be careful of the LCD4.  Keep it in sync5.  Make it work, make it right, make it fast(then go back to #1 and #2) PRATIK PATEL | CTO
  7. 7. EVOLVE•  TripLingo started as a single App•  We knew we’d have 50+ of the same “app”•  Also variants for each platform•  But we didn’t engineer for it upfront•  We waited till it was needed to do this PRATIK PATEL | CTO
  8. 8. IMPLEMENT•  DB Driven content•  Cross-platform.js to abstract nuances•  Border-flex layout for screen sizes•  Migrate data between app versions PRATIK PATEL | CTO
  9. 9. Example: DB DRIVEN Ti.App.Properties.setString(language_set, YES); Ti.App.Properties.setString(current_language, langName); tlmaindb = Titanium.Database.install( langName+/pl.db, langName); $LANG/ FRENFRA/ SPANMEX/ GERMGER/ audio/ icons/ cultural/ pl.db dictionary.db PRATIK PATEL | CTO
  10. 10. Example: X-Platformvar fontMap = {"Aller" : "Aller_Std_Bd", "Trade Gothic LT Std" : "TradeGothicLTStd" } function resolveFontName(fontName) { if(Titanium.Platform.name == iPhone OS) { return fontName; } else { return fontMap[fontName]; } } PRATIK PATEL | CTO
  11. 11. Example: B - F Layoutvar topLeftButtonImg = imgs/nook/db_btn_golearn.png; var topRightButtonImg = imgs/nook/db_btn_wordbank.png; var mainButtonsTop = 550; var middleRightButton = triplingo.ui.createButton({ ... right:10, ... }); var middleLeftButton = triplingo.ui.createButton({ ... left:10, ... }); PRATIK PATEL | CTO
  12. 12. Example: DB Migration// version your database as it is NOT overwritten on install(necessarily) old_db = Titanium.Database.install(currentLanguage + /pl.db, oldDB); new_db = Titanium.Database.install(currentLanguage + /pl.db, currentDB); migrate (old_db, new_db); PRATIK PATEL | CTO
  13. 13. AUTOMATE•  Scripts to reduce the mundane stuff•  Hand off to non-tech people•  Allows time for new features PRATIK PATEL | CTO
  14. 14. Example: Automate builder.copyTemplateProject() // TODO builder.processPhraseList(lang, "ISRAEL", 1050-1) builder.copyAudioAndZipSlow() builder.processWordBank(lang, 647-1) PRATIK PATEL | CTO
  15. 15. Example: Automate def tmpProjectDirBase = /Users/prpatel/dev/TripLingo/MobileWorkspace/ def tmpProjectDir = "${tmpProjectDirBase}/TL${lang}" def assetsFolder = "${tmpProjectDir}/Resources/${lang}" def contentDir = "/Users/prpatel/dev/TripLingo/MobileWorkspace/content/${lang}" PRATIK PATEL | CTO
  16. 16. sourcethecode
  17. 17. AUREVOIR PRATIK PATEL @PRPATEL PRPATEL@TRIPLINGO.COM

×