Jorge Vargas wrote:
> On Fri, Jan 16, 2009 at 9:58 AM, Mark Ramm <[email protected]> 
> wrote:
>   
>> 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....
>>
>>     
> am I the only one concern by the fact that this will require JS on ALL
> TG2 apps to be enable?
I think that nowadays all *webapps* (as opposed to *webpages*) require 
JavaScript anyway. Flash is mostly used in the former so I think that 
the advantages (cacheability, making servers state-less (or avoid having 
to sign marshalled sessions in cookie)) fairly outweight the minor 
disadvantages that requiring JS imposes.
>
> How about make it a "second implementation" in a configurable way? so
> you could either use the session or js thing, kind of like how beaker
> swaps backends?
That is easier said than done ;). Anyway, the interface I've implemented 
[1] can be extended to support fetching the cookie from the request 
(please keep it a simple cookie so no sessions are needed) so... I'd 
happily accept a patch to add a ServerFlash subclass to add that 
functionality. But please: don't add new dependencies (currently only 
the stdlib is required if python 2.6 is used + a response object that 
has a set_cookie(name, value) method (eg: webob's)) and keep it portable 
across any WSGI framework.

Alberto

[1] http://hg.python-rum.org/WebFlash


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to