17 Jul 2012 11:38 AM #1
Unanswered: Sencha touch mvc flow
I'm new to sencha touch, and I'm trying to understand the flow in a MVC application.
Let's say an application that have a list and when I click in one of the items open another panel.
And I have a controller with routes, some views, a store + json proxy and a model.
When the application starts I'm creating a new view (the list), and at this point I need to load my store to populate my view. Then, my question is: Who loads the store? a controller or inside my view I load my store.
How should be the flow? my controller (when match a route) makes all the actions, like the controller talk to the the store (load the store) and create a view? or my controller creates a view and my view talk to the store to receive the data?
19 Jul 2012 4:09 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
How are you attaching the store to the list? Like what is the store config on the list look like?Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services firstname.lastname@example.org
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
19 Jul 2012 6:55 AM #3
My view is a Panel and inside I have a list, and I'm attaching the store using the store config field (using the storeId). and on my controller I'm doing:
Should I move this code (first 2 lines) from controller to the view ?