On Mon, Apr 02, 2001 at 12:21:07AM +0200, Andi Gutmans wrote:
> 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.
Yes, I know about Smarty. Most important problems with it are:

1. It is file-oriented and does not respect templates from different
    non-filebased sources (RDMBS, inter-webserver module information exchange)

2. It does not support template overriding or hierarcies (i.e. subclassing of
   already existing style)

These two problems render it unusable for RDBMS-based applications. In Midgard,
for example, only bootstrap file with initial template is stored in filesystem
(only because PHP3 did not support execution of non-filebased sources -- not
so much changes in PHP4 too). All other information (pages, templates, template
elements, content and so on) are in RDBMS.

Andrei didn't use C coding in Smarty simply because his team failed to produce
effective solution in reasonable time, but it does not mean that such solution
impossible (no offense for IPSI at all, just facts from Smarty documentation).
We have spent about three years for it and did such C-based template engine
which proven to be fast and effective.

> 
> 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]

-- 
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 
-- If practice makes perfect, and nobody's perfect, why practice?

-- 
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]

Reply via email to