mvc in sencha touch
DESCRIPTION
This ppt gives a breif description about how MVC is done in Sencha Touch Mobile ApplicationsTRANSCRIPT
![Page 1: MVC In Sencha Touch](https://reader038.vdocument.in/reader038/viewer/2022100500/5472f5c5b4af9fcd0a8b5117/html5/thumbnails/1.jpg)
MVC IN SENCHA TOUCH
By,Amith
![Page 2: MVC In Sencha Touch](https://reader038.vdocument.in/reader038/viewer/2022100500/5472f5c5b4af9fcd0a8b5117/html5/thumbnails/2.jpg)
Why MVC?
![Page 3: MVC In Sencha Touch](https://reader038.vdocument.in/reader038/viewer/2022100500/5472f5c5b4af9fcd0a8b5117/html5/thumbnails/3.jpg)
What’s MVC?
![Page 4: MVC In Sencha Touch](https://reader038.vdocument.in/reader038/viewer/2022100500/5472f5c5b4af9fcd0a8b5117/html5/thumbnails/4.jpg)
Small Talk 80 introduces MVC
Model View Controller
![Page 5: MVC In Sencha Touch](https://reader038.vdocument.in/reader038/viewer/2022100500/5472f5c5b4af9fcd0a8b5117/html5/thumbnails/5.jpg)
Model
Loads and manages the application data
Usually in response to request from the View
![Page 6: MVC In Sencha Touch](https://reader038.vdocument.in/reader038/viewer/2022100500/5472f5c5b4af9fcd0a8b5117/html5/thumbnails/6.jpg)
View
Manages the display of information and UI controls
![Page 7: MVC In Sencha Touch](https://reader038.vdocument.in/reader038/viewer/2022100500/5472f5c5b4af9fcd0a8b5117/html5/thumbnails/7.jpg)
Controller
Listens for input from the user , updates Model and View
![Page 8: MVC In Sencha Touch](https://reader038.vdocument.in/reader038/viewer/2022100500/5472f5c5b4af9fcd0a8b5117/html5/thumbnails/8.jpg)
Model
Table
+Insert()
+update()
+delete()
![Page 9: MVC In Sencha Touch](https://reader038.vdocument.in/reader038/viewer/2022100500/5472f5c5b4af9fcd0a8b5117/html5/thumbnails/9.jpg)
View
![Page 10: MVC In Sencha Touch](https://reader038.vdocument.in/reader038/viewer/2022100500/5472f5c5b4af9fcd0a8b5117/html5/thumbnails/10.jpg)
Controller
![Page 11: MVC In Sencha Touch](https://reader038.vdocument.in/reader038/viewer/2022100500/5472f5c5b4af9fcd0a8b5117/html5/thumbnails/11.jpg)
Model
Ext.define(‘MyApp.model.User’,{extend:’ext.data.model’,
fields:[‘name’,‘email’,‘password’
]});
![Page 12: MVC In Sencha Touch](https://reader038.vdocument.in/reader038/viewer/2022100500/5472f5c5b4af9fcd0a8b5117/html5/thumbnails/12.jpg)
View
Ext.define(‘MyApp.view.Info’,{extend:’Ext.Panel’,config:{
html:’this is such a good example’}
});
![Page 13: MVC In Sencha Touch](https://reader038.vdocument.in/reader038/viewer/2022100500/5472f5c5b4af9fcd0a8b5117/html5/thumbnails/13.jpg)
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](https://reader038.vdocument.in/reader038/viewer/2022100500/5472f5c5b4af9fcd0a8b5117/html5/thumbnails/14.jpg)
File Structure
![Page 15: MVC In Sencha Touch](https://reader038.vdocument.in/reader038/viewer/2022100500/5472f5c5b4af9fcd0a8b5117/html5/thumbnails/15.jpg)
Live Code*
*Might end in a disaster..!!!
![Page 16: MVC In Sencha Touch](https://reader038.vdocument.in/reader038/viewer/2022100500/5472f5c5b4af9fcd0a8b5117/html5/thumbnails/16.jpg)
Questions…?
![Page 17: MVC In Sencha Touch](https://reader038.vdocument.in/reader038/viewer/2022100500/5472f5c5b4af9fcd0a8b5117/html5/thumbnails/17.jpg)
Thank you..!