On Tue, May 3, 2011 at 3:24 PM, Daniel Moisset <[email protected]> wrote:
> On Tue, May 3, 2011 at 9:19 AM, Tom Evans <[email protected]> wrote:
>>
>> From another POV, there is no chance for the designer to screw the
>> template up and calculate the wrong value, if he is only allowed to
>> output data.
>>
>
> And the view writer can screw it too, using that logic...
>
> Saying "separating logic from data display enhances the design" is a
> good argument for a simpler template language. "Template writers are
> dumb" isn't
>
> Regards,
>   D.
>

Bit of a leap there, that is not what I said. Designers and developers
have different skill-sets, it is nonsense to pretend otherwise.

Designers typically do not have the programming skills of a developer,
so expecting them to edit templates containing business logic is error
prone, and difficult to apply unit tests to. This is precisely why the
MVC pattern is so persistently popular, by separating business logic
from presentation.

Unit tests can be easily applied to view logic, where as template
output is more nebulous to test. I'm not saying designers screw up
more than developers, but developers are more attuned to producing
business logic than designers, since that is their job.

Django itself has a similar position, forbidding (or making no-ops)
things like {{ User.objects.all.delete }} in templates, to avoid
unintentional data loss by the designer.

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" 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/django-developers?hl=en.

Reply via email to