Jeff Watkins, el miƩrcoles 26 de octubre a las 12:59 me escribiste:
> Leandro Lucarella wrote:
> >That would be great, this way you don't have to make a method for exposing
> >JSON and another for exposing a template (I think one of the most amazing
> >things about TG is this abstraction).
> 
> Just a note from someone who's doing a *lot* of JSON work: You probably 
> should differentiate between returning JSON formatted data and a template.
> 
> Most likely the logic is different. There really aren't that many times 
> when I want to either get a template with the data or the JSON data 
> itself. I usually want one or the other for each request.

I'm just playing with TG for now, but what I want to do (or experiment
with) is use TG as some sort of application server, which serves meny
views. My idea is to have a view (almost) completely written in javascript
with AJAX and another one with just plain HTML (for text browsers and
such). So ideally, I just want exactly the same methods to output either
json or HTML.

Again, is just a wild idea wich I'm experimenting with. I don't know is
this is really doable or not. I even have the crazy idea of doing a GTK+
view using the json output.

-- 
 LUCA - Leandro Lucarella - JID: luca(en)lugmen.org.ar - Debian GNU/Linux
.------------------------------------------------------------------------,
 \  GPG: 5F5A8D05 // F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05 /
  '--------------------------------------------------------------------'
Ambition makes you look pretty ugly

Reply via email to