but now we've made the code layer manipulate the presentation layer. I think this is worse than having control flow in the template. I've found that Template::Toolkit syntax and particularly Template::Alloy (which I authored) if used properly are the perfect separation between model and view. And it is the perfect separation from both directions.If you would like to come up with an empirical measure of "perfect" or give examples which show how Alloy is better than Seamstress, I will be more than happy to provide fully working Seamstress counterparts.
You chief expressed concern is:
but now we've made the code layer manipulate the presentation layer.I dont know what a "code layer" is... please tell me what a code layer is, preferably with an example showing how horrible it makes the seamstress experience.
my $records = Data::Object->load(welcome_data => $cookie->user) ;
my $tree = html::welcome->new;
That is clear, clean and simple and allows maximum independence of HTML developer and Perl programmer... I have zero need to touch the HTML. and complete ability to swap model loading and presentation logic using any of a number of object oriented techniques...$tree->replace_content(user_name => $records->[0]{user_name});
| I have beheld the tarball of 22.1 on ftp.gnu.org with my own eyes. How can you say that there is no God in the Church of Emacs? -- David Kastrup |
|
| Enforce strict model-view separation in template engines via HTML::Seamstress | The car is in the cdr, not the cdr in the car |
In reply to object-oriented composition of model-view with HTML::Seamstress
by metaperl
in thread RFC - Template::Empty
by redhotpenguin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |