-
21 Mar 2012 1:53 AM #1
Proxy URL suggestion
Proxy URL suggestion
Hi,
I have a lot of Stores with JsonPProxys. They all have the same "start" URL and then a different ending and different params.
But it would be awesome if it was possible to give som kind of "global" start. Because when I have to change from test to live and live to test there are many places I have to change the same thing. Would be nice if I just could change it one place.
In ST1 I did something like:
Code:url: glabalURL + 'special ending';
-
21 Mar 2012 11:45 AM #2
Mmmm...
Project's url prefix is not enough?
Your URL should be relative to it, for example: "./rest/customers"
Regards.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!
-
21 Mar 2012 11:54 AM #3
No, the code is "localhost" while developing and points to a development server where the development api is running.
When the code is tested it is deployed on a test server and uses the test api.
And at last it is "live", so the code is deployed live and points to the live api.
The API are always on another domain then where the code is. So it can't be relative.
-
21 Mar 2012 12:03 PM #4
I really dont understand your scenario.
Why you dont have full API in your development environment relative to the projects' url?
Or that API is 3r party? I mean, facebook or alike.
What about override and global url prefix variable?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!
-
22 Mar 2012 10:09 AM #5
I understand your environment and we can make some considerations for this workflow in the future. This is not our current focus though.
The situation is this:
The client side application is running on a development web server locally (localhost).
The applications API is running on a staging/development web server on another server.
Right now we make the assumption that where you are developing the application will have those APIs availableAaron Conran
@aconran
Sencha Architect Development Team
-
22 Mar 2012 10:15 AM #6
Yeah this can be considered when we expand upon the deployment functionality. In that you could define a url prefix for different environments.
Phil Strong
@philstrong
#SenchaArchitect
Sencha Architect Development Team
-
22 Mar 2012 10:15 AM #7
Correct.
And the problem is that when developing I have to change on many stores/proxys and many places in the code. It's easy to forget one place.
If I could use the trick from ST1 I would be happy.
-
22 Mar 2012 10:17 AM #8
-
22 Mar 2012 10:23 AM #9
I still dont understand why you need that (may be because I always have a development environment like production one) but you could use an automated task (make, ant, shell script, etc.) before deploy which change the development prefix with production prefix in the exported JS sources.
Regards.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!
-
17 May 2012 2:10 AM #10
I think it will be very useful feature for Sencha Touch apps wrapped in Phonegap.


Reply With Quote