Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: Problem with taking app with mvc structure offline

  1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    86
    Answers
    2
    Vote Rating
    0
      0  

    Default Problem with taking app with mvc structure offline

    Hi,
    I am trying to to take my application(mvc structure) offline. But the problem is when server is not connected page is blank, and I checked in developer tool and there was an error as
    http://ipaddress/AppName/app/view/LoginViewport.js?_dc=1334316337812 Failed to load resource

    Also I observed that, there is some data appended to "LoginViewPort.js", and that might be the problem.
    Please help.

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Answers
    3931
    Vote Rating
    1272
      0  

    Default

    In production you will have a built version that combines your classes and the Sencha Touch classes not in the core into one JavaScript and then also saved to localstorage. So loading classes will not be an issue in production.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    86
    Answers
    2
    Vote Rating
    0
      0  

    Default Production?

    As I am new to sencha and developing app in very less time, so sorry to ask but "how do we do production of application?". and it stores to local storage means we wont be needing chache.manifest file..?

  4. #4
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Answers
    3931
    Vote Rating
    1272
      0  

    Default

    If your app was created with Sencha Command (which we recommend) then you can follow this guide:

    http://docs.sencha.com/touch/2-0/#!/guide/command
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  5. #5
    Sencha User
    Join Date
    Feb 2012
    Posts
    86
    Answers
    2
    Vote Rating
    0
      0  

    Default

    No, I have not created app using sencha command. I used sample applications available and then modified it. So what I can do now?

  6. #6
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Answers
    3931
    Vote Rating
    1272
      0  

    Default

    You can try to use the regular SDK Tools to create a JSB file and to create a build.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  7. #7
    Sencha User
    Join Date
    Feb 2012
    Posts
    86
    Answers
    2
    Vote Rating
    0
      0  

    Default

    I want to clearify some thing. I have one doubt, is it compulsory to have only one html page(i.e index.htm) and only on app.js(which has Ext.application)? And we can have multiple views and controller right?

  8. #8
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Answers
    3931
    Vote Rating
    1272
      0  

    Default

    that is correct, one index.html, one app.js, multiple views/controllers/model/stores
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  9. #9
    Sencha User
    Join Date
    Feb 2012
    Posts
    86
    Answers
    2
    Vote Rating
    0
      0  

    Default

    Hi,
    I am using following code to show different pages in my application,

    Code:
    var samplePage = Ext.create('MyApp.view.SamplePage');
            Ext.Viewport.add(samplePage);
            SamplePage.show();
    It shows the page, but when I refresh the page, its gone. I want page to persist at refresh of the page.

  10. #10
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,553
    Answers
    3931
    Vote Rating
    1272
      0  

    Default

    Then you need to use routes
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •