Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: [PEAR] Re: template, not template that is the problem.
Hi,

Lukas Smith wrote:
> this has severe divantage however since it does incurr a performance
> overhead that can be countered by caching. another divantage 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.

Report this thread to moderator Post Follow-up to this message
Old Post
Alexey Borzov
03-26-05 01:57 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Pear archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 06:55 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.