Upload
nithya-sivakumar
View
128
Download
3
Embed Size (px)
DESCRIPTION
MVC in sencha touch
Citation preview
MVC IN SENCHA TOUCH - NITHYA
1
Why MVC?
Teamwork
Apps often need teams
Different people work different ways
We need standards
Code needs to be organized
Best practices followed
© 2010, Cognizant Technology Solutions. Confidential 2
What is MVC?
View
Model
Controller
© 2010, Cognizant Technology Solutions. Confidential 3
Model
Loads and manages the application data.
Usually in response to requests from the View
© 2010, Cognizant Technology Solutions. Confidential 4
Manages the display of information and UI controls
© 2010, Cognizant Technology Solutions. Confidential 5
View
Listens for inputs from the user, updates Model and View
© 2010, Cognizant Technology Solutions. Confidential 6
Controller
MVC Standards
Common Usage Patterns – Application namespace
Common File Structure – Strict MVC structure
© 2010, Cognizant Technology Solutions. Confidential 7
Model
A Model represents some object that your application manages
© 2010, Cognizant Technology Solutions. Confidential 8
View
© 2010, Cognizant Technology Solutions. Confidential 9
Controller
© 2010, Cognizant Technology Solutions. Confidential 10
File Structure
© 2010, Cognizant Technology Solutions. Confidential 11
Benefits of MVC
Scalability
Maintainability
Flexibility
© 2010, Cognizant Technology Solutions. Confidential 12
© 2010, Cognizant Technology Solutions. Confidential 13