1. #1
    Ext JS Premium Member
    Join Date
    May 2008
    Posts
    141
    Vote Rating
    0
    sg707 is on a distinguished road

      0  

    Default ExtJS 4 + Sencha Touch

    ExtJS 4 + Sencha Touch


    Hi Guys,

    In a about a month after ExtJS4 comes out, I will "again" strike for the gold by creating a new Web Application. At that time, I may also consider using Sencha Touch for mobile access as well.

    So!! The question comes to mind on how to modularize the code so that Sencha Touch and ExtJS 4 can be easily be reusable and maintained.

    I'm sure writing 2 complete separate code base would be the "worst" case scenario. The part I'm most puzzled is the ExtJS 4 MVC capability. If ExtJS 4 stays true to MVC philosophy then "Control" and "Model" should be exactly same for Sencha Touch and ExtJS 4. The only extra part would ExtJS 4 View and Sencha Touch View. Am I wrong? I guess to summarize my question would be

    Can I use the same MVC API for ExtJS 4 and Sencha Touch?

    If not, how would you architect a web application that uses both ExtJS 4 and Sencha Touch?

  2. #2
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,167
    Vote Rating
    28
    jay@moduscreate.com is a jewel in the rough jay@moduscreate.com is a jewel in the rough jay@moduscreate.com is a jewel in the rough jay@moduscreate.com is a jewel in the rough

      0  

    Default


    The MVC for Ext 4 will most likely be improved upon.

    That said, the most that can be reused at this point is models and possibly controllers. Views will be different.

    Jay Garcia @ModusJesus || Modus Create co-founder
    Ext JS in Action author
    Sencha Touch in Action author

    Get in touch for Ext JS & Sencha Touch Touch Training

    We are also working on Video-based Sencha Touch training: Check it out here.

  3. #3
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,251
    Vote Rating
    40
    Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold Condor is a splendid one to behold

      0  

    Default


    Controllers are only reusable if you make them independent of the view.

    This was one of the things that bothered me about the quick MVC example shown at the conference. The controller contained event handlers from components in the view. These events should be generalized and not be directly fired from the components.

  4. #4
    Sencha - Community Support Team jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,167
    Vote Rating
    28
    jay@moduscreate.com is a jewel in the rough jay@moduscreate.com is a jewel in the rough jay@moduscreate.com is a jewel in the rough jay@moduscreate.com is a jewel in the rough

      0  

    Default


    Quote Originally Posted by Condor View Post
    Controllers are only reusable if you make them independent of the view.

    This was one of the things that bothered me about the quick MVC example shown at the conference. The controller contained event handlers from components in the view. These events should be generalized and not be directly fired from the components.
    Agreed. The only problem with that is you add overhead to dispatch to a controller for every event you want fired, adding more to the method stack.

    Jay Garcia @ModusJesus || Modus Create co-founder
    Ext JS in Action author
    Sencha Touch in Action author

    Get in touch for Ext JS & Sencha Touch Touch Training

    We are also working on Video-based Sencha Touch training: Check it out here.

  5. #5
    Ext JS Premium Member
    Join Date
    May 2008
    Posts
    141
    Vote Rating
    0
    sg707 is on a distinguished road

      0  

    Default


    Thanks for the response!

    I really can't wait to see the MVC stuff..wasn't able to find that demo through the conference videos. I'm not too surprise that Controller has direct tied to specific View classes at this point. It's probably missing the "configuration" layer which makes the Controller and View layer independent... ah well.. Maybe later version will improve upon on this.

Similar Threads

  1. How to covert a working ExtJS datastore to Sencha Touch model?
    By locutusUT in forum Sencha Touch 1.x: Discussion
    Replies: 3
    Last Post: 29 Sep 2011, 11:05 PM
  2. ExtJS 4 and Sencha Touch API resemblance
    By gevik in forum Community Discussion
    Replies: 1
    Last Post: 19 Dec 2010, 12:45 AM
  3. Sencha Touch + ExtJs component ?
    By liquidsnake in forum Sencha Touch 1.x: Discussion
    Replies: 2
    Last Post: 25 Oct 2010, 5:52 PM
  4. Rendering Sencha Touch Mobile App within ExtJS 3.2.1 Environment
    By yuhimfresh in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 25 Oct 2010, 4:59 PM