|
|
| Perl-Sensitive Sunglasses | |
| PerlMonks |
Re: Re: Short Refactoring Tip: let the object do it for youby Ovid (Cardinal) |
| on May 21, 2003 at 23:28 UTC ( #259939=note: print w/ replies, xml ) | Need Help?? |
|
That's a very interesting observation. Given what you've written, how would you handle this?
In the above case, I am querying whether or not an item can accept a value for given attribute (those are Template Toolkit directives). If so, an input box is presented to the end user, with the current value filled in. If not, they only see the value. As this data can be represented in many other ways (and not just on HTML forms), it doesn't seem to make sense to have the object present HTML code to the end user. I like the idea of moving the conditional logic into the object, but I don't see a clean way of doing that. Cheers, New address of my CGI Course.
In Section
Meditations
|
|
||||||||||||||||||||||