1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    117
    Vote Rating
    11
    Sottilde will become famous soon enough

      4  

    Default Sencha SDK Tools 2.0 and ExtJS4: The Missing Docs

    Sencha SDK Tools 2.0 and ExtJS4: The Missing Docs


    Hello everyone,

    I just completed a very frustrating few days of work with the Sencha SDK Tools in order to get it to work in a consistent and reliable way for my medium-sized ExtJS4 project.

    My requirements were:
    1. The build must be 100% reliable. It cannot fail 25% of the time like the current SDK Tools do.
    2. It must minify all javascript into one single app-all.js.
    3. It must run on a build server.
    4. It must update automatically - adding components to my application must not break the build.
    5. The build must include the smallest working subset of ExtJS.
    Unfortunately the SDK Tools in their current state will not do this reliably.

    I have modified some of the SDK Tools source to make this happen. I created a comprehensive guide on how to use the SDK Tools including this modified source. Please take a look if your project is anything like mine.

    Please post any thoughts/problems/ideas/code.

    https://docs.google.com/document/d/1_yrwYiRTeExJiSYDhhPV75UEo8HUyl_RDq0JzxIRwwk/edit

  2. #2
    Sencha User
    Join Date
    Feb 2012
    Posts
    117
    Vote Rating
    11
    Sottilde will become famous soon enough

      0  

    Default


    I've been seeing a lot of views on the doc, but no comments. Please let me know how it has been going!

  3. #3
    Sencha Premium Member TDroenner's Avatar
    Join Date
    Nov 2010
    Location
    Homburg/Saar, Germany
    Posts
    86
    Vote Rating
    3
    TDroenner is on a distinguished road

      0  

    Default


    Hi Sottilde,

    it's working very well now. Your fix to phantom.js did the trick. Now it's useable. At least for me.
    Thank you very much.

    Thorsten

  4. #4
    Sencha User
    Join Date
    Feb 2012
    Posts
    117
    Vote Rating
    11
    Sottilde will become famous soon enough

      0  

    Default


    Thanks, Thorsten. I've been discussing the possibility of including these changes in Beta4 with Sencha. Stay tuned.

  5. #5
    Ext JS Premium Member
    Join Date
    Sep 2010
    Posts
    390
    Vote Rating
    6
    stewardsencha is on a distinguished road

      0  

    Default


    I cried when I found this. Thank you. I had given up with sencha and was trolling for tools...

    Smart boy you. Wish I could have figured that out.

    index-build is required to have the .html extension
    Experimentally, I find it requires the ending slash if you don't have html.

    my.site.com fails but mysite.com/ produces a jsb3

    After two days of terror I can back to working out a deployment cycle. Yes!

    * * *

    There's one other area sencha has assumed everyone knows and understands, and that is the project directory structure. A real one, not a demo. Languages, sites, subdomains, projects, components, apps, sub-apps, builds, themes, libs, ux...

    I developed something I thought was following their pattern, but the build tools and SA are proving me wrong.

    Looks like maybe you have that one nailed too.

  6. #6
    Sencha User
    Join Date
    Feb 2012
    Posts
    117
    Vote Rating
    11
    Sottilde will become famous soon enough

      0  

    Default


    Thanks for the warm words, stewardsencha.

    As for directory structure, I have been making it up as I go, starting from the default directory structure given by Architect.

    My ExtJS4 project structure:

    Code:
    /app - all app files (e.g. '/app/controller', '/app/model', etc.)
    /build - all build files, such as app-all.js, all-classes.js, etc.
    /lib - all third party files, some in subfolders for organization
        /extensions - all extjs overrides or extensions
        /extjs - extjs builds
            /src - extjs source files 
    /metadata - created by Architect
    /resources
        /fonts - web fonts
        /images 
        /sass - I use compass, so all .scss files and builds go here.
    /statics - static html files for my project
    /support - Jenkins(Continuous Integration) files
    /tests

    All index-(build | test | dev | prod) files are in root, along with my-project.jsb3 and some Architect files.

    That's been working out well for me for now.

  7. #7
    Touch Premium Member
    Join Date
    Aug 2011
    Posts
    96
    Vote Rating
    6
    abcoa is on a distinguished road

      0  

    Default


    This is great! You should add the dir structure you use to your document...
    Also, can you comment on your experience with resources in JSB3 file...When I do a build I cannot get the resources to be copied and there is no output of any kind....

  8. #8
    Sencha - Architect Dev Team Phil.Strong's Avatar
    Join Date
    Mar 2007
    Location
    Olney, MD
    Posts
    1,953
    Vote Rating
    65
    Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice

      0  

    Default


    comments on the gdoc itself don't seem to stick
    Phil Strong
    @philstrong
    #SenchaArchitect
    Sencha Architect Development Team

  9. #9
    Sencha User
    Join Date
    Apr 2012
    Posts
    5
    Vote Rating
    1
    shadowfax is on a distinguished road

      0  

    Default


    This is amazing. Thank you!

  10. #10
    Sencha User
    Join Date
    Feb 2012
    Posts
    117
    Vote Rating
    11
    Sottilde will become famous soon enough

      0  

    Default


    Hey Phil - comments seem to stick in incognito for me. Maybe try again?

    Abcoa - by 'resources', you mean JS files, right? Make sure you're running the updated phantom-jsb.js from the top of the doc. I had some problems with the actual building of the JSB3. However, if you mean that your JSB3 is built and you are not getting any output, I would triple-check your paths and run sencha build with the -v parameter.

    Paths in a JSB3 require a tailing '/' which trips some people up. Running in verbose mode should tell you which paths have failed.