PDA

View Full Version : Good examples of barebones ST2 MVC application



abws
2 Dec 2011, 1:32 PM
I've been going through the ST2 tutorials so far and have understood everything pretty well.
I'm getting ready to build my first playground app on my own and was noticing that MVC differs greatly in ST2 from ST1.

Is there a guide that somebody could recommend? I am looking for best practices and also a little help getting the app setup.

Would you consider these to be sufficient?
http://docs.sencha.com/touch/2-0/#!/api/Ext.app.Application
http://docs.sencha.com/touch/2-0/#!/api/Ext.app.Controller

I (http://docs.sencha.com/touch/2-0/#!/api/Ext.app.Controller) have also tried using this out: https://github.com/kostysh/Sencha-Touch-2.0-MVC-test-application-with-NestedList

rdougan
3 Dec 2011, 3:37 PM
Unfortunately, right now, none of the guides have been updated to Touch 2.0.

If you really want to get stuck in before those guides are updated, I suggest you look at both the Twitter example in the Touch SDK, and the Ext JS 4 MVC guide, which is very similar to the ST MVC architecture.

http://docs.sencha.com/touch/2-0/#!/example/twitter/index.html
http://docs.sencha.com/ext-js/4-0/#!/guide/application_architecture

abws
4 Dec 2011, 11:42 AM
Thanks Robert! I'll give those both a read and see what I can put together!

Edit: I read through the MVC docs for ExtJS4 like you suggested and things finally started to "click" in my head. I'll give ST2 another try as I'd rather learn the new technology than have to relearn once it is officially released.

Simon.liu
6 Dec 2011, 8:16 AM
I used this as a MVC example https://github.com/FrancisShanahan/SenchaTouch2MVCHelloworld, a further reading at http://francisshanahan.com/index.php/2011/sencha-touch-2-0-mvc-in-5-minutes-or-less/.

and this one:http://www.sencha.com/learn/upgrading-to-sencha-touch-2-pr2?mkt_tok=3RkMMJWWfF9wsRonv6TMZKXonjHpfsX57eQlXaag38431UFwdcjKPmjr1YEDRdQhcOuuEwcWGog80wlWGeiU.

I just combined these two examples as a guide to my app.... it works so far.