I think this is a good idea. It adds a little bit of complexity to the template side of things, but we can use a widget in the master.html to do the flash message via javascript so things can just work out of the box.
If it's done right away, it can go into tg 2.0, if it takes a bit I'd support a switch from the current flash implementation to this in 2.1. I wonder if it could be put into webhelpers rather than into a seprate library, since its a generally useful pattern.... On Fri, Jan 16, 2009 at 4:55 AM, Alberto Valverde <[email protected]> wrote: > > Hi, > > I'd like to propose (and I'm volunteering to do it) to re-implement TG's > "flash" using the transport mechanism it used before: a POC (plain old > cookie). This would be implemented as a stand-alone egg with no other > dependence apart from webob (perhaps not even webob, a Request/Reponse > object that implements a sub-set of webob's interface could be duck-typed). > > The main reason is selfish: I'd like to use this in Rum and would like > it to inter-operate in the best possible way with TG. Sharing the same > code would be ideal. > > The other reasons (which are more important ;) are that: > > 1) Flash messages are easier (possible) for a rich client ui to read > since JS can read the cookie directly. > 2) Flash messages can be displayed by JS code in non-dynamic pages > without needing to put them in the template. This makes pages easier to > cache. > 3) Apps can be session-less > > All these advantages are explained much better than here in this post: > http://blog.ianbicking.org/2008/12/17/javascript-status-message-display/ > > I'm probably going to implement it for Rum anyway but if TG is > interested I can take it into account from the beginning and make sure > it integrates well. > > Alberto > > P.S. Cross posting to rum-discuss since this also involves Rum but it is > already being discussed in a ticket there > (http://python-rum.org/ticket/62), please reply only to turbogears-trunk. > > > > -- Mark Ramm-Christensen email: mark at compoundthinking dot com blog: www.compoundthinking.com/blog --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears Trunk" 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-trunk?hl=en -~----------~----~----~----~------~----~------~--~---
