17

Click here to load reader

MVC In Sencha Touch

Embed Size (px)

DESCRIPTION

This ppt gives a breif description about how MVC is done in Sencha Touch Mobile Applications

Citation preview

Page 1: MVC In Sencha Touch

MVC IN SENCHA TOUCH

By,Amith

Page 2: MVC In Sencha Touch

Why MVC?

Page 3: MVC In Sencha Touch

What’s MVC?

Page 4: MVC In Sencha Touch

Small Talk 80 introduces MVC

Model View Controller

Page 5: MVC In Sencha Touch

Model

Loads and manages the application data

Usually in response to request from the View

Page 6: MVC In Sencha Touch

View

Manages the display of information and UI controls

Page 7: MVC In Sencha Touch

Controller

Listens for input from the user , updates Model and View

Page 8: MVC In Sencha Touch

Model

Table

+Insert()

+update()

+delete()

Page 9: MVC In Sencha Touch

View

Page 10: MVC In Sencha Touch

Controller

Page 11: MVC In Sencha Touch

Model

Ext.define(‘MyApp.model.User’,{extend:’ext.data.model’,

fields:[‘name’,‘email’,‘password’

]});

Page 12: MVC In Sencha Touch

View

Ext.define(‘MyApp.view.Info’,{extend:’Ext.Panel’,config:{

html:’this is such a good example’}

});

Page 13: MVC In Sencha Touch

Controller

Ext.define(‘MyApp.controller.Users’,{

extend:’ext.app.Controller’,

init:function(){

this.control({

‘button’:{

tap:function(){

alert(“you have tapped a button”);

}

}

});

},

});

Page 14: MVC In Sencha Touch

File Structure

Page 15: MVC In Sencha Touch

Live Code*

*Might end in a disaster..!!!

Page 16: MVC In Sencha Touch

Questions…?

Page 17: MVC In Sencha Touch

Thank you..!