Code Comments
Programming Forum and web based access to our favorite programming groups.Hi, Lukas Smith wrote: > this has severe divantage however since it does incurr a performance > overhead that can be countered by caching. another di
vantage is that > it doesnt allow any loayout relevant logic. meaning you need to add > another layer to truly separate business from layout. > > for example its not easily possible to give the designer the choice to > use alternating row colors without using another layer or embedding the > necessary logic in your business logic. In fact ITX and Sigma allow one to embed callback functions into the templat e (the callbacks in ITX are limited and not documented, though). The usage exa mple from Sigma docs shows how that can be used for doing the alternating row col ours trick you mentioned: [url]http://pear.php.net/manual/en/package.html.html-template-sigma.intro-syntax.php[/u rl] Of course the programmer has to write functions to process these callbacks, but after that the designer can do everything himself. And all presentation logi c like the fact that row colours are changing and the colours themselves are k ept in the template. The same technique can be used to embed e.g. gettext() calls directly into t he template.
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.