View Full Version : More comprehensive MVC demo or tutorial anywhere?

25 Apr 2011, 7:19 AM
Is there a comprehensive MVC tutorial anywhere yet? I have been using it on my last 3 projects but there is a lot that I have not been able to use as there is no tutorial to demo the use of the intricacies of the process...such as historyUrl, routes.js, the map parameter, defaultUrl. etc.

Twitter example has a very simple controller that gets into some of this, but not really enough to understand the best practices. I have seen several requests for the same thing from others on the forum, but have yet to see anything concrete. I have also seen one brief article on the topic, but nothing special.

Since the new Sencha Command tool is going to be pumping out MVC objects for use, shouldn't there be a pretty decent breakdown out by now that really delves into the processes and best practices, before we start using "wizards" to generate our applications?

Does anything more comprehensive exist?


P.S. Jay, I hope your new book can touch on this...maybe a whole chapter :)

25 Apr 2011, 10:30 AM
Besides the more wiedely know tutorials, I found this open source project on GitHub:

I'm not sure if this is the way to do it today, since the project was created 5 months ago.

25 Apr 2011, 10:54 AM
Thanks @preyz, but unfortunately theres not much in the way of explanations in regards to some of the concepts that I am trying to get a handle on, like deep-linking and history. He has the useHistory property set to no right off the bat so I doubt he is concerned with that aspect.

Thanks for the link though!

26 Apr 2011, 3:16 AM
Correction to my original post: I was able to figure out how to implement history and deep linking support in MVC apps by reviewing the Twitter application. This is a HUGE benefit to mobile web sites....thank you Sencha!

The keys are Controller organization, using the historyUrl on the Dispatch commands, and the routes.js table. Do not forget to include a link to this file like someone I know did...that's cost you a few hours. :">

I would still love to see a comprehensive tutorial on MVC though. I'm sure there are other hidden gems in there that I don't know about.