-
7 Feb 2013 9:33 AM #1
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
-
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,
John
-
7 Feb 2013 10:09 AM #3
If you're in the architect early access program you can view another thread discussing the topic here.
-
7 Feb 2013 10:18 AM #4
-
7 Feb 2013 11:23 AM #5
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 2.x / ExtJS 4 MVC
Server side: EJB 3.1 / CDI / JPA 2 / JAX-RS / JasperReports
Application Server: Glassfish 3.1.x
Databases: Oracle 10g & 11g / DB2 9 & 10 / Firebird 2.5
If you like my answer please vote!


Reply With Quote