Results 1 to 3 of 3

Thread: Deployment of app assets to an absolute/fixed path

  1. #1
    Sencha User
    Join Date
    May 2010
    Posts
    4
    Vote Rating
    0
      0  

    Default Deployment of app assets to an absolute/fixed path

    I'm using the "sencha" build tool to build/minify my final sencha touch 2 application but have a somewhat unique challenge.

    I'm hosting the app in a Sitecore CMS such that pages returned will all have different paths and depths of paths. Every request will return the single same app just with a different context variable set to let it know the path of the item it should display. Our sencha 2 app is built to handle that. For example:

    visiting www.website.com/ProductsList.aspx yields:
    var path='/ProductsList';

    or

    visiting www.website.com/Products/SpecificProduct1.aspx
    var path='/Products/SpecificProduct1';

    The app then uses the path variable to get the context it needs.

    The challenge is that the resources (including the app.js itself) are, I think, assumed to be relative to the html page's path, such that in the first scenario the microloader will be looking for app.js at /app.js while in the second scenario it will be looking for it at /Products/app.js .

    I thought perhaps the app.config would allow resource specification with absolute paths, but it mentions right in there to use relative paths.

    I know I can manually load the sencha js files but I want to benefit from the build process to lighten the load of the resources. I've also managed to mangle the post-build app.json and index.html generated javascript to hardcode the absolute path, but this seems cumbersome. It would be nice if the absolute deployed path for the app.js, resources etc could be specified in the app.json and handled nicely at build time.

    Any help would be much appreciated. Thanks!

  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

    Agreed, in the meantime I have set symbolic links and it builds just fine for me.
    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
    May 2010
    Posts
    4
    Vote Rating
    0
      0  

    Default Follow up...

    Mitchell, it seems like you are talking about build time which is not really my issue. The issue is run time resolution of the paths to the app.js, app.json and other assets. Also I imagine if folks were to try to host an app in sharepoint (yes another MS monster) or on a CDN they might have a similar challenge.

    There are clear workarounds for example using mod_rewrite (isapi_rewrite for IIS) for each of the assets or folders, but clearly it would be more direct, simple and maintainable to have this be a deployment parameter that gets baked into the production deployment.

    Is there a place I can directly post feature requests for the "sencha" packaging tool?

    Thanks.

Tags for this Thread

Posting Permissions

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