On Jan 25, 2007, at 12:42 PM, Ksenia wrote:

>
>
>
> On Jan 25, 11:31 am, "Ksenia" <[EMAIL PROTECTED]> wrote:
>> Thanks for feedback! New google groups interface seems not to have
>> accepted my reaction from yesterday :(
>> Just testing now...
>
> (Ok, seems to work :)
>
> After reading al your helpfull reactions I see that my confusion with
> TG/TW widgets is more about it's implementation:
> - "general" widgets like TinyMCE, grids, js trees, select shuttle,  
> etc.
> belong to the concept of "helpers". I dont care how they made, where
> they are installed on the system - I just want to use them. So the egg
> system and TW are great for that.
> - domain-specific widgets, like product info, is something that I see
> as a template that should be in the products view directory.  It makes
> more sense to me to see those widgets as "clever" templates with some
> extra python code in it. TW/TG widgets feels "upside down" for this
> use.
>
> Just the matter of taste I guess.

Of course. It's up to you to decide which "views" are general enough  
to deserve encapsulation in a reusable component or could benefit  
from being "clever" templates (being clever meaning they know what  
static resources (js, css, images...) they need for rendering and  
pull them automatically when they're used in a page).

But keep in mind, TW widgets are a superset of form widgets. Depends  
on your taste and style but widgets can be used for other things  
apart from validation (a js drop-down menu, for example). From a  
user's perspective they're just objects you can instantiate setting  
some initial state that affects how they behave and then be call them  
in a template to generate a chunk of markup. To sum up: they are  
equivalent of a template function but that can take care pulling  
static files and be encapsulated with all it's baggage into a  
reusable component. TW is just an API to create them, in fact,  
twForms ATM is more of a proof of concept which provides *very* basic  
widgets,  they could be much enhanced with client-side scripting,  
styling, etc...

Alberto



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" 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/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to