Aaron Blohowiak on 5 Sep 2007 03:37:03 -0000 |
It is becoming more clear to me that I was trying to push too much business/view logic into the client code, thinking of Ajax/_javascript_ as a way of interacting with raw model objects, rather than as a way to dynamically update the web UI.... This is an interesting way of doing it, and there are a few attempts. For instance, IIRC, this is basicly how openlaszlo (spelling) works.. the ui is essentially a gui toolkit that gets loaded and then the data is passed back and forth with the server. On the one hand, this sucks for all of the obvious reasons, but on the other it rocks cause you keep the data and the display seperate until it gets displayed. Anyone with more experience want to chime in here? IIRC, the google apps work similarly to how you proposed (at least gmail does.) But they are using Java to write out the _javascript_ that handles the JSON. As I get more experience, for nontrivial UIs, this method seems more appealing. -Aaron On 9/4/07, Brian Donahue <stuff@pigeonmoon.com> wrote: It is becoming more clear to me that I was trying to push too much business/view logic into the client code, thinking of Ajax/_javascript_ as a way of interacting with raw model objects, rather than as a way to dynamically update the web UI. I think for the browser, I should stick to passing back HTML/JS that updates the view (like everyone else, duh!), not raw data that is then handled by client code. Obviously, I can return raw JSON or XML for other types of requests should I choose to go that route later, but thinking about that first was causing me to forget how you build a web app :) _______________________________________________ To unsubscribe or change your settings, visit: http://lists.phillyonrails.org/mailman/listinfo/talk
|
|