On Jan 18, 2007, at 11:32 AM, Alberto Valverde wrote:

>
> On Jan 17, 2007, at 5:10 PM, [EMAIL PROTECTED] wrote:
>
>>
>> Hi:
>>
>> Recently I was thinking that DataController needs some refresh air, I
>> prefer the explicit code for edit rather than the DataController,   
>> which
>> works like the magic :-)
>>
>> For example, Identity framework give us some explicit code in
>> controllers.py, so we could customize our identity requirement if the
>> default way is not exactly what we need. We should do more of this.
>
> (snippet removed)
>
> +1
>
> I'd like to see TG  2.0 do more code-generation in general. Pylons  
> is  already doing it and I love that idea because it you can  
> easily  modify the created structure if you need to tweak or add  
> new behavior.
>
> However, a good balance between generated code and support  
> libraries  should be reached or else generated code will be harder  
> to maintain  if the template that generated it is updated with bug- 
> fixes or new  functionallity.

Exactly.

There are tradeoffs to everything in software. Just for historical  
perspective: DataController headed down this path for specifically  
this reason... ongoing maintenance.

There's an important difference between the identity classes and  
DataController. identity classes define database tables...  
DataController doesn't have that external tie. It's just standard OO  
technique: need to change the behavior? Just override the appropriate  
method.

Personally, I don't think DataController needs code generation. It  
needs a good split of methods so that you can easily override the  
various bits of behavior. And, importantly, it needs Genshi so that  
there's a mechanism to manipulate things and add your styles to it.

Code generation has its plusses... but I think those plusses are  
often outweighed by the minuses, particularly in a fast growing area...

Kevin



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