1. #1
    Sencha User
    Join Date
    Nov 2009
    Location
    Uruguay
    Posts
    49
    Vote Rating
    1
    milton9480 is on a distinguished road

      0  

    Default Unanswered: When Sencha build process is not the best approach

    Unanswered: When Sencha build process is not the best approach


    Hi guys,


    When ST2 beta was released, we migrated our solution to use that version.
    At the end, we got a migrated application that runs in the browser, but fails with time-out when the app request the local index.html.
    Using ST1, we have made a lot of improvements to our application, by adding an on-demand script loader, and lately, a programatic load with timeout (loads a js file each 2 seconds). By this way we got a faster startup, and each page is loaded on-demand, if it isn't already loaded.
    In ST2 we saw that files are loaded on-demand also, but when build process minify all in a single app.js, the file size is too big, losing the advantage of that load. In the other hand, if we don't use the build process, the sdk files are huge also, and most of it isn't required .


    So, I'd like to know if any of you can suggest a better way to build and get a ST2 (even ST 2.1) compiled.
    Also, please suggest if it could be good to keep this kind of on-demand load, and also add all required components at app.js file, in order to minify and take only required SDK files. This is an idea that I will be trying soon

    Regards,
    Milton

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,525
    Vote Rating
    872
    Answers
    3564
    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


    With the way it happens in ST2, the first load will take longer but that app.js is saved in localstorage so any subsequent loads are lightening fast.
    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
    Nov 2009
    Location
    Uruguay
    Posts
    49
    Vote Rating
    1
    milton9480 is on a distinguished road

      0  

    Default


    Hi Mitchell, tks for your reply.
    I see, but what if the request failed because timeout ?
    My application is quite big, with several js files. I guessed that wouldn't be an issue, but in fact it was when we migrated the app to 2.0. Also I think that the approach that we are using to load js files at demand (similar to the dynamic load of ST2.0) is working fine, and I'd like to keep it working as it, no matter the build process of ST2.
    So, is it fine to take the advantage of build process, in order to minimize the sdk size, but keep my js files apart, and load it dinamically ?
    What are your feelings with big applications ? (FYI, our app has 118 js files, weighing 1MB approx, including sdk's, plugins, fwk's, etc.)

    Thanks,
    Milton