> Yeah, I'm trying that aproach now. I had thought about this, but don't
> like the runtime performance hit of creating the widgets for each
> request. It does give the maximum flxibility at runtime though.
>
> I think I'll still persue the approach of statically creating the
> widget list, but somehow taking a copy of the widgets at runtime as a
> mutable set of widgets, it should be a fair bit faster then
> contstructing them each time. I think that most of the hit in
> constructing a widget is in the kid template compilation anyway.

But the template will be compiled and cached. Not much of a penalty there.

> This is why I'm asking more TG experienced people like yourself for
> better ways of doing things :) I know I also must sound a bit stupid
> sometimes, but I'm just trying to explore all the possiblities and
> make the right choices early in the project. I think that most people
> would agree that the TG docs are not what they could be so the only
> real way to find some of this out is read the code, try things and ask
> people. I value your answers. Hopefully, when I find the "right"
> answer I will update the docs.

You are right regarding the docs, but then - I always only trust the code...

>  I've done very large projects in ASP.NET, but this concept of one
> static class shared between threads just takes some mind bending. I'm
> still surprised that widgets (or more directly forms) work (or at
> least are recommended to be used) this way. It seems that many people
> are getting tripped up by this and each one has their own way of
> working around the same limitation. Kind of begs for a more general
> solution in the widgets architecture (by somewone cleverer than me for
> sure!).

You always have to make a choice what to keep static and what dynamic. It 
might be that there could be workarounds that allow for what you ache for, 
but then that would come with another burden - even more metaclass and 
descriptor magic.

Diez

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

Reply via email to