7 Feb 2013 9:33 AM #1
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?
7 Feb 2013 10:06 AM #2
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,
7 Feb 2013 10:09 AM #3
7 Feb 2013 10:18 AM #4
7 Feb 2013 11:23 AM #5
- Join Date
- May 2010
- Guatemala, Central America
- Vote Rating
I use another approach:
Simply include the ExtJS application inside development/testing environment from the beginning and set URLs relative, for example:
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!