workshop on sencha touch - part 3 - mvc in sencha touch

Post on 28-Nov-2014

127 Views

Category:

Mobile

3 Downloads

Preview:

Click to see full reader

DESCRIPTION

MVC in sencha touch

TRANSCRIPT

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

top related