structuring your sencha touch application

29

Upload: sencha

Post on 21-Nov-2014

33.323 views

Category:

Business


1 download

DESCRIPTION

In this session you'll learn about the recommended application structure for Sencha Touch (or Ext JS) applications. The new application structure enables any Sencha developer to quickly understand any Sencha application using the new Sencha MVC package.

TRANSCRIPT

Page 1: Structuring Your Sencha Touch Application
Page 2: Structuring Your Sencha Touch Application

Structuring your Sencha Touch application

by Tommy Maintz@tommymaintz

Page 3: Structuring Your Sencha Touch Application

Session GoalsUnderstand MVCMVC in Sencha TouchCommon file structureGenerators & Build Tools

Page 4: Structuring Your Sencha Touch Application
Page 5: Structuring Your Sencha Touch Application

MVCModels, Views & Controllers

Page 6: Structuring Your Sencha Touch Application

BenefitsReduce architectural complexityFlexibility and maintainability.

Page 7: Structuring Your Sencha Touch Application

ModelsManages the data of the applicationProvide data in its current stateAllows you to change state

Page 8: Structuring Your Sencha Touch Application

ViewsRenders the model into a form suitable for interactionMultiple views can exist for a single model

Page 9: Structuring Your Sencha Touch Application

ControllersReceives inputInstructs the model and views

Page 10: Structuring Your Sencha Touch Application

ModelView

Controller

DIRECT CONNECTIONINDIRECT CONNECTION

Page 11: Structuring Your Sencha Touch Application

Sencha MVC

Page 12: Structuring Your Sencha Touch Application

PlatformSame MVC codebase

Share Models, Stores, Controllers

Page 13: Structuring Your Sencha Touch Application

Ext.regApplication()Ext.regModel()Ext.regStore()Ext.regController()Ext.reg()

Managers

Page 14: Structuring Your Sencha Touch Application

Application

Page 15: Structuring Your Sencha Touch Application

Model

Page 16: Structuring Your Sencha Touch Application

Store

Really, that’s it...

Page 17: Structuring Your Sencha Touch Application

View

Looks familiar?

Views are UI components

Page 18: Structuring Your Sencha Touch Application

Controller

Page 19: Structuring Your Sencha Touch Application

Common file structure

Page 20: Structuring Your Sencha Touch Application

BenefitsLearn it onceEasier supportSharing between projectsEnables use of Sencha Command

Page 21: Structuring Your Sencha Touch Application
Page 22: Structuring Your Sencha Touch Application
Page 23: Structuring Your Sencha Touch Application
Page 24: Structuring Your Sencha Touch Application
Page 25: Structuring Your Sencha Touch Application
Page 26: Structuring Your Sencha Touch Application
Page 27: Structuring Your Sencha Touch Application

Sencha CommandGenerate projects, controllers, models and stores

Cross-OS

Page 28: Structuring Your Sencha Touch Application

Let’s build an app!

Page 29: Structuring Your Sencha Touch Application

Questions?