Before reading this article please goes through the following articles.
Controller
As all of you knows that when client initiate any request or action its first gets handled by controller. In sencha touch the same thing happens but remind that here controller is on client end not on server end. In sencha touch when client initiate any action then it’s first get handled by controller. In sencha touch application all the controllers, views, models are already loaded on client end hence when client initiate the action related controller will pick up the user request.
If request is for fetching the data from back-end server then controller initiate the store which is responsible to talk to server. Store will get the data and will fill into the model and then model is set to view and view is rendered back to user’s screen. If request is not for data then controller directly can return the view to user’s screen.
Store
Here in sencha touch we have an additional step called store. Store is responsible for talking to server. The store work can be handled by model itself but using store is the standard way in sencha touch application. Store is nothing but the traveler between model and back-end server. Once store get the data from server it sets the data in model.
Model
Here in sencha touch model is same as our data-model in server side MVC. Model contains fields/properties to hold the data. Once model has the data then we can set this model to view.
View
In sencha touch view is nothing but design of pages. Just a difference here view are created for mobile devices. Views contains a JavaScript code which renders the html5 dom element on client browsers. Here in sencha touch we have advantage of handling events in view itself.
Conclusion
Here we have seen MVC provided by sencha touch. In our next article we will see what are pre-requisite to generate sencha app? How to generate sencha touch application? So stay tuned.