> Thanks a lot to all for the suggestions. I got diverted to some other > job in the middle and could not focus much on this. However, for last > two days I am doing some experiments on this. > > Following Matt's experience, I thought that it would be safe to go for > server side templating. But before that, I thought to give some try to > client-side templating and face it first-hand. I used > http://blog.markturansky.com/BetterJavascriptTemplates.html. > > My experience till now is okay with client-side templating, for small > portions of the page. To avoid repeating the same code in server-side > and client-side templates, I have removed the server side portion and > calling the client-side rendering in the "onload" event of the page. > > Let me see what happens when I render bigger portions. > > On another note, I discovered http://mjtemplate.org/ which is just > like Genshi. Would be interesting to dig further, whenever I will have > time. Any comment on this would be helpful.
I also prefer client side rendering because it makes the server side code much simpler I only need to return data in JSON format and not worrying about rendering details. This is useful because if in the future the application grows complex enough so that a public API is needed the JSON returning server side functions are good for that. Once I have the data in JSON I use the really brilliant extjs javascript library to render the actual html. They have lots of support for this, mostly it boils down to stuffing data into already defined javascript widgets and the result will be perfect without much tweaking. And it's easy to switch to other widgets, from a table to a list for example you just replace one function call with another and the whole setup is the same: call server side function, get the JSON, stuff it into a widget. And extjs includes a template system that you can use if you are not happy with the default layouts and general appearance of things. See extjs.com Cheers, Daniel -- Psss, psss, put it down! - http://www.cafepress.com/putitdown --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

