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
4
  • Introduction to Sencha Touch: blog.chariotsolutions.com/2012/01/… This example uses the Developer Preview of Sencha Touch 2.0. Commented Jan 27, 2012 at 9:56
  • Here's my MVC tutorial in another SO thread: stackoverflow.com/questions/9229849/…
    – Grgur
    Commented Feb 12, 2012 at 7:54
  • 9
    Funny, this question was closed as not constructive yet it's the highest voted sencha-touch-2 question.
    – user568866
    Commented Apr 16, 2012 at 16:25
  • Some rules on stack are pretty bad,closing questions just because they don't have codes..
    – Nevin
    Commented Apr 28, 2014 at 8:49

5 Answers 5

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

1
  • 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
    Commented Mar 9, 2012 at 3: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/

2
  • Yes, very helpful for V1.1 information. Commented Oct 19, 2011 at 22:28
  • 1
    miamicoder tuts are damn good... i love his st2 tuts
    – 1Mayur
    Commented Oct 19, 2012 at 13:36
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

1
  • Great. First Sencha Touch 2 app I've seen running on Google Appengine.
    – Gareth
    Commented Jan 18, 2012 at 7:28
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...
4
  • 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) Commented Oct 19, 2011 at 15:33
  • its still in developer preview.. I think we will see more documentation and examples by the time of release.. :) Commented Oct 19, 2011 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. Commented Oct 19, 2011 at 16:31
  • the Ext JS stuff is good for me to look at. Didn't know they were moving towards unifying the frameworks. Commented Oct 19, 2011 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

1
  • 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 Commented Oct 19, 2011 at 15:33

Not the answer you're looking for? Browse other questions tagged or ask your own question.