1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    24
    Answers
    1
    Vote Rating
    0
    the_skua is on a distinguished road

      0  

    Default Unanswered: Deploying MVC App

    Unanswered: Deploying MVC App


    I'm using Sencha Tools in attempting to deploy my application to the web. The problem is that the application is still loading libraries from the src folder of extjs. Is there a way to code so that these get built in? I feel like I'm doing something wrong.

    Here's the head of my app.js file:
    Code:
    Ext.Loader.setConfig({
        enabled: true
    });
    
    
    
    Ext.application({    name: 'RiskMap',
        appFolder: 'app',
        layout: 'ux.center',
        
        controllers: ["OpenLayersMap", "Models", "Forecast", "Legend"],
        stores: ['StateCenters'],
        
        launch: function() {
    Do I need a Ext. require list? If I add this with some of the files, then the app doesn't load. Also, it's not including my classes from the appFolder. Help?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,754
    Answers
    3462
    Vote Rating
    827
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    What classes are being dynamically loaded? Each of your application classes needs to have every class it requires in the requires config. Int he case of the controller and application, you can use the stores, views, etc.

    Also, when you do the build, you should be using ext-debug.js, not ext-all-debug.js
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    24
    Answers
    1
    Vote Rating
    0
    the_skua is on a distinguished road

      0  

    Default


    I am using ext-debug.js.

    So let me get this right...for the Application and each Controller, I need to set the requires config to contain each class declared within? By dynamic, what do you mean? Not declared by xtype?

    Do you have an example?

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,754
    Answers
    3462
    Vote Rating
    827
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    No! For application and controllers you can use the separate controllers, stores etc. For your classes that are in there and for views and stores you should use requires. All the classes that are still being loaded, this is because you haven't required it or you haven't switch the script tag to load app.js to app-all.js
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha User
    Join Date
    Feb 2012
    Posts
    24
    Answers
    1
    Vote Rating
    0
    the_skua is on a distinguished road

      0  

    Default


    Does anyone have an example...I'm still really confused about where and how often I need to use requires: [].

  6. #6
    Sencha User
    Join Date
    Feb 2012
    Posts
    24
    Answers
    1
    Vote Rating
    0
    the_skua is on a distinguished road

      0  

    Default


    So here's an example of what's not working for me. I use Ext.data.JsonP in one of my controllers functions. Here's the function:

    Code:
    retrieveStations: function() {        //will end up wanting to config this
            var j = Ext.data.JsonP.request({
                url: 'http://XXXXX/proxy/wfs.ashx?request=GetFeature&typename=bms:users_loc_arch&request=GetMap&version=1.1.1&layers=&outputformat=json&maxfeatures=20',
                //url: 'stations.txt',
                callbackKey: 'this.parseResponse'
            });
        }
    Where would I put the
    Code:
    requires: ['Ext.data.JsonP']
    config so that Ext.data.JsonP got built into my app-all.js instead of being dynamically loaded from src? I've tried the controller, the view, and the app and everytime, it's loading it dynamically from src and it's not being include in the build.

  7. #7
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,754
    Answers
    3462
    Vote Rating
    827
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    There should be no reason why it isn't included as long as you switch from using app.js to app-all.js
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  8. #8
    Sencha User
    Join Date
    Feb 2012
    Posts
    24
    Answers
    1
    Vote Rating
    0
    the_skua is on a distinguished road

      0  

    Default


    Definitely have switched. It's not in jsb3 file either. Okay, I managed to get it added by putting:

    Code:
    Ext.require('Ext.data.JsonP');
    before my Ext.application declaration.

    Is there a way to get my appFolder classes built in too?

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."