1. #1
    Sencha Premium Member intellix's Avatar
    Join Date
    Mar 2012
    Location
    UK + Malta
    Posts
    263
    Vote Rating
    18
    intellix will become famous soon enough

      0  

    Default Variables inside Proxy URLs - Another issue with escaped values within Architect

    Variables inside Proxy URLs - Another issue with escaped values within Architect


    Hey, got an API with multiple languages to translate the content coming through on the server side (smaller locale files and different set of data etc).

    So my URL would be something like:

    api.mobile.com/en/events/1
    api.mobile.com/de/events/1
    api.mobile.com/es/events/1

    The thing is..... you can't put variables inside a Proxy URL because values are escaped as String.

    What I would like to do is something along the lines of:

    Code:
    api.mobile.com/' + Ux.locale.manager.getLanguage() + '/events
    But as you know this transforms into:
    Code:
    api.mobile.com/\' + Ux.locale.manager.getLanguage() + \'/events
    Sorry if I come across a little frustrated about this sort of thing but I'm constantly hitting walls with what's possible in Architect. I think it's a little crazy that my company spent $399 on an application with so many limitations and bugs.

    I think I've had these errors opening Architect for about a month now:
    Code:
    TypeError: 'undefined' is not an object
    
    Source Class: undefined Line 0
    I've had many times where it's not cascaded changes (had to delete and recreate parts and even spent a day once trying to fix when I couldn't save my project)
    My project looks crazy since about a month ago when having to use my own Resources (CSS/JS)
    Alot of the times my Views are just blank screens.

    At the moment it's not possible for someone to create an entire application using Architect. At some point towards the end of my project I'm going to have to abandon it so I can get around what's not possible.

  2. #2
    Sencha User
    Join Date
    Jul 2010
    Posts
    12
    Vote Rating
    2
    marsking is on a distinguished road

      0  

    Default Cannot agree more

    Cannot agree more


    Lacking of flexibility is the most pain when you are trying to develop the whole app using Architect. I think it should give people more freedom and creativity not too much constraints and limitations.

  3. #3
    Sencha User filippo.ferrari's Avatar
    Join Date
    Apr 2010
    Location
    Sanremo - Italy
    Posts
    126
    Vote Rating
    1
    filippo.ferrari has a reputation beyond repute filippo.ferrari has a reputation beyond repute filippo.ferrari has a reputation beyond repute filippo.ferrari has a reputation beyond repute filippo.ferrari has a reputation beyond repute filippo.ferrari has a reputation beyond repute filippo.ferrari has a reputation beyond repute filippo.ferrari has a reputation beyond repute filippo.ferrari has a reputation beyond repute filippo.ferrari has a reputation beyond repute filippo.ferrari has a reputation beyond repute

      0  

  4. #4
    Sencha Premium Member intellix's Avatar
    Join Date
    Mar 2012
    Location
    UK + Malta
    Posts
    263
    Vote Rating
    18
    intellix will become famous soon enough

      0  

    Default


    I've made a little hack (atm I'm using it for locale changing) and it might be helpful:

    http://www.sencha.com/forum/showthre...l=1#post863022

  5. #5
    Ext JS Premium Member
    Join Date
    Jun 2010
    Posts
    100
    Vote Rating
    14
    h.wagner@telekom.de will become famous soon enough

      0  

    Default


    Quote Originally Posted by intellix View Post
    I've made a little hack (atm I'm using it for locale changing) and it might be helpful:

    http://www.sencha.com/forum/showthre...l=1#post863022
    Nice, but the problem is with the general missing of custom variables support in Architect (not just in the proxy, but in other parts too).
    This was a big disadvantage of ExtDesigner too, and Sencha promised that it will implement it almost 2 years ago .

  6. #6
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,329
    Vote Rating
    212
    ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold

      0  

    Default


    Quote Originally Posted by intellix View Post
    So my URL would be something like:

    api.mobile.com/en/events/1
    api.mobile.com/de/events/1
    api.mobile.com/es/events/1
    If your server code is solely for your application, why just don't change a little?

    api.mobile.com/events/1?lang=en

    Use REST proxy and send the lang parameter via extraParams. As matter of fact IMHO that that's the correct "precedence" events > event > event content in some lang.

    When you use tools like SA there are some scenarios in which with you must do small changes to overcome tool's limitations.

    Regards.
    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!