|
Hello Friends! I think I might need one of these fancy bespoke frameworks for my summer-scarf! I am writing a web page 'app' that does the following: - Uses GET/POST ajax calls to a crossdomain server. - The user can alter the json objects retrieved from the server. - The user's altered json values are then 'saved' to the server, via ajax POST calls. - The new state of the server's json object is retrieved via ajax GET. - The web page UI is redrawn to reflect the server json object state. I have this all working, but I am doing this all manually. For example, when I get a json object array from the server, via ajax/GET callback, I iterate through the json array using a for-loop. I then use something that looks really gross like: code:
I discovered Backbone and Agility yesterday, which seemed like exactly what I needed! If I could 'bind' json objects to HTML templates, and easily sync the html UI with the server's state, that would be awesome! However, it appears that it is impossible to use Backbone, because the HTML5 'History' object will not use crossdomain URLs. Is there something else I can use? I am fine using my manually-written ajax POST/GET calls if I have to, but I would at least like to 'bind' json objects to html templates. If I could use something to 'sync' with the server state, that would be great too! :3 Questions: - Is there an Ember/Backbone-y thing that works across domains? - If not, is there a good html template-y thing that simply 'binds' json objects to html forms/elements? Edit: Knockout.js appears to do exactly what I want! Yay! Captain Pike fucked around with this message at 20:41 on Aug 20, 2014 |
# ¿ Aug 20, 2014 16:59 |
|
|
# ¿ Apr 29, 2024 09:42 |