1. #1
    Sencha User
    Join Date
    Jan 2013
    Posts
    21
    Vote Rating
    1
    brian.scott@talgov.com is an unknown quantity at this point

      0  

    Default Common Json/PJson Storage Parameter - Moving from dev/test/production

    Common Json/PJson Storage Parameter - Moving from dev/test/production


    Hello friends -

    I'm starting to not break enough things to consider moving a pre-alpha release to a machine that isn't my local development environment to make sure things work out the same in a JsonPStore as a JsonStore. It occurs to me, however, that what this really means for me is going into my project and tweaking the URL for all of my stores. I can see this being somewhat of a problem for a complicated application that wants to goto the server many times during operating lifecycle.

    So, what solutions does SA2 have for allocation of a common URL base path that could be set a config time that can be incorporated into a JSONStore/JSONPstore Url?

    Thanks!

    brian

  2. #2
    Touch Premium Member BostonMerlin's Avatar
    Join Date
    Aug 2010
    Location
    Boston
    Posts
    522
    Vote Rating
    41
    BostonMerlin has a spectacular aura about BostonMerlin has a spectacular aura about BostonMerlin has a spectacular aura about

      0  

    Default


    At the moment, there is no built-in way to do this within architect. What I'm doing is setting a server variable when the app starts to indicate my base url prefix for all server calls then setting the proxy url within the init of each store to use the base + the rest of the url (i.e. var path = $BASE_URL + '/order/get').

    In my case, the server sends the base_url value (i.e. https://www.DevServer.com/apps/ or https://localhost/projects/') up to the app and sets the variable when the app loads. All proxy calls pickup on the dev/qa/prod variable.

    There's another thread floating around that discusses this. I suggested a way of defining these values within architect for a given project.

    Hope that helps,
    John

  3. #3
    Touch Premium Member BostonMerlin's Avatar
    Join Date
    Aug 2010
    Location
    Boston
    Posts
    522
    Vote Rating
    41
    BostonMerlin has a spectacular aura about BostonMerlin has a spectacular aura about BostonMerlin has a spectacular aura about

      0  

    Default


    If you're in the architect early access program you can view another thread discussing the topic here.

  4. #4
    Sencha User
    Join Date
    Jan 2013
    Posts
    21
    Vote Rating
    1
    brian.scott@talgov.com is an unknown quantity at this point

      0  

    Default


    Thanks John, I'll try your approach.

  5. #5
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,305
    Vote Rating
    106
    ssamayoa is just really nice ssamayoa is just really nice ssamayoa is just really nice ssamayoa is just really nice

      0  

    Default


    I use another approach:

    Simply include the ExtJS application inside development/testing environment from the beginning and set URLs relative, for example:

    ./rest/customers

    So there is no need to use JsonP nor change at deploy time.

    Note that I deploy complete applications to JEE container as WAR or as EAR so this may not be suitable for you.
    UI: Sencha Architect 3.x / ExtJS 4 & 5
    Server side: JEE / EJB 3.x / CDI / JPA 2.x/ JAX-RS / JasperReports
    Application Server: Glassfish / WildFly
    Databases: Oracle / DB2 / MySQL / Firebird

    If you like my answer please vote!

Thread Participants: 2

Tags for this Thread