31

I found a great tutorial on creating an MVC App from Scratch using Sencha Touch V1.1 but unfortunately it isn't all that applicable to Sencha Touch V2. I want to learn the new/right way to build an MVC app moving forward with their latest framework.

Any good tutorial for building an MVC App using Sencha Touch V2?

Here's a list of places I've already looked.

  • Official Docs
    • Videos are outdated
    • Examples don't show source snippets, you have to "View Source" and try to wade through the compressed/minified versions of the library.
    • Documentation doesn't describe MVC at all (just try searching for "mvc" in their search field... you'll come up empty handed)
  • Google Advanced Search
    • I tried narrowing down the results by looking for "Sencha Touch" "mvc" where the articles were posted in the last week.
  • And of course right here on StackOverflow.
    • looks like as of this post, I'm the only person posting with that tag
Cœur
  • 37,241
  • 25
  • 195
  • 267
Chase Florell
  • 46,378
  • 57
  • 186
  • 376
  • Introduction to Sencha Touch: http://blog.chariotsolutions.com/2012/01/introduction-to-sencha-touch.html This example uses the Developer Preview of Sencha Touch 2.0. – larswittenberg Jan 27 '12 at 09:56
  • Here's my MVC tutorial in another SO thread: http://stackoverflow.com/questions/9229849/sencha-touch-2-0-mvc-tutorial/9247251#9247251 – Grgur Feb 12 '12 at 07:54
  • 9
    Funny, this question was closed as not constructive yet it's the highest voted sencha-touch-2 question. –  Apr 16 '12 at 16:25
  • Some rules on stack are pretty bad,closing questions just because they don't have codes.. – Nevin Madhukar K Apr 28 '14 at 08:49

5 Answers5

12

I have a complete starter-project for Touch 2 using the MVC pattern on github here:

https://github.com/FrancisShanahan/SenchaTouch2MVCHelloworld

You can read my blog post about it here:

http://francisshanahan.com/index.php/2011/sencha-touch-2-0-mvc-in-5-minutes-or-less/

Hope this helps you get started, -fs

Francis Shanahan
  • 2,043
  • 19
  • 21
  • 1
    If you're having trouble getting that example working move the view definition (views: ['Home', 'SimpleList'],) from the controller to the app.js. – SteveCav Mar 09 '12 at 03:17
6

I found this link and site very useful - http://miamicoder.com/category/tutorials/sencha-touch-tutorials/

Updated for V2 as well - http://miamicoder.com/2012/how-to-create-a-sencha-touch-2-app-part-1/

Austin
  • 3,556
  • 2
  • 16
  • 16
bchesley
  • 151
  • 1
  • 3
  • 8
4

I was also looking for such kind of a tutorial and I found this example to be very helpful for kickstarting my own senchatouch 2.0 app: https://github.com/kawanoshinobu/SenchaTouch2-simple-CRUD-sample

It's in python and the author uses google app engine to run it, but it's pretty self-explanatory how you can run a copy locally using any other backend :) Hope this helps

muxcmux
  • 237
  • 4
  • 9
1

All Sencha products (Sencha Touch, Ext JS) are expected to follow the new MVC architecture. You should start with understand it. Here is my resource list:

  1. MVC Application Architecture
  2. Getting Started with Touch
  3. Class System, Components etc..
  4. Examples.. but I don't think there are MVC examples for now...
Abdel Raoof Olakara
  • 19,223
  • 11
  • 88
  • 133
  • Yes that's exactly it. In my question I stated that I've already looked through the Getting Started with Touch docs, but there is nothing with MVC, and unfortunately a lot of the examples are still on 1.1 (which is odd that they're in the 2.0 documentation) – Chase Florell Oct 19 '11 at 15:33
  • its still in developer preview.. I think we will see more documentation and examples by the time of release.. :) – Abdel Raoof Olakara Oct 19 '11 at 15:50
  • Yep, I absolutely get that... just thought there might be someone out there already developing tutorials. I'll roll with what I can find for now. Thanks. – Chase Florell Oct 19 '11 at 16:31
  • the Ext JS stuff is good for me to look at. Didn't know they were moving towards unifying the frameworks. – Chase Florell Oct 19 '11 at 16:32
0

Start with http://docs.sencha.com/touch/2-0/#!/guide/getting_started and examples/getting_started folder of the Sencha Touch 2.0 SDK download

tomaszbak
  • 8,247
  • 4
  • 44
  • 37
  • Not sure if you noticed, but I already looked through there. Doing a search brings up nothing "MVC" related, and lots of the examples in there are still on 1.1 – Chase Florell Oct 19 '11 at 15:33