I very much liked Andrei's implementation of Smary templates. It uses the
Zend (PHP) scripting language and caches templated scripts without messing
with the core of PHP.
I haven't used it but from reading the specs it looks like Andrei & his
guys did a great job.
Andi
At 11:10 AM 4/1/2001 +0300, Alexander Bokovoy wrote:
>On Sun, Apr 01, 2001 at 09:07:44AM +0200, Sebastian Bergmann wrote:
> > Alexander Bokovoy wrote:
> > > Ask Zend folks, they have our proposals, even C code to Zend engine
> > > to implement native templating with no connection to Midgard at all -
> > > this system was designed to be generic for any template providers.
> >
> > Does this have to be implemented in the ZendEngine or would a
> > ext/template extension (for instance) be possible, also? This would be
> > great, though Template Engines are a dying species with the advent of
> > XSLT, IMHO.
>Not so simple because XSLT is far than complex for lot of applications and
>especially when you are trying to provide content edit capabilities for
>non-techies. This is huge nische.
>
>It most effective at ZendEngine level but actually task is two-tiered. Let
>me describe:
>1. Templating require additional syntax which is better handled by ZendEngine
>2. Syntax provides access to collection of template elements and manipulation
> of them. It's up to template provider to collect template elements from
> some source(s) before actual template building. This is better handled by
> extensions.
>
>This separation also allows to make complex transitions like
>'document with template markup' -> XML-based source + XSLT -> output
>In this case second step is done by Template Provider which provides
>template elements + hooks to translate them to XML + output callbacks.
>Zend Engine dispatches these calls via easy user-oriented syntax.
>
>For example, in Midgard we have two kinds of template calls:
><[template element]> -- just insert content of template element here and
>evaluate it as PHP code.
> It looks like hidden functional call to include()
> but the difference
> is that 'template element' actually can come from
> completely
> different place than file system (in Midgard it
> comes from Database
> or FileTemplates).
>&(variable:formatter); -- pass $variable throught existing formatter and
>insert
> output into output stream. Different formatters allow
> to convert plain text to HTML with different
> levels of
> formatting, execute PHP code, execute
> user-defined formatter
> against $variable. Variable could be any PHP
> structure
> (scalar, object, array, etc)
>
>These are very simple constucts, but they are greatly reduce build-up for
>non-technical
>interfaces.
>--
>Sincerely yours, Alexander Bokovoy
> The Midgard Project | ALT Linux Team | Minsk Linux Users Group
> www.midgard-project.org | www.altlinux.ru | www.minsk-lug.net
>-- Success is in the minds of Fools.
> -- William Wrenshaw, 1578
>
>--
>PHP Development Mailing List <http://www.php.net/>
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]