On Tue, 2008-02-12 at 15:18 -0600, Greg Donald wrote: > On Feb 12, 2008 3:15 PM, Robert Cummings <robert@xxxxxxxxxxxxx> wrote: > > Custom tags (XML style ones anyways) provide support for arbitrary > > ordering and omission of optional attributes. They nest nicer than > > function calls, and they have the same general formatting as the HTML > > with which you are working. Additionally, they provide the opportunity > > to punt anything not necessary at run-time to pre-compiled HTML. > > Your solution to templating is XML? Not quite. My template engine allows arbitrary template types to be defined that are applied in a configured order. One such template type is similar to XML, but not quite. Specifically, the tags mostly conform to XML semantics, but they do not require a root nor do they require that the content in which they are embedded be well formed-- although they themselves must be well-formed. This allows the use of XML style custom tags to be used in any kind of document, whether it be HTML, XHTML, XML, plaintext, whatever. For most projects I work on the compiler is run to produce the documents requested. As such there is no cache overhead. In fact, if all you want is HTML, you can compile so that PHP is eliminated from the final result. I do this for CSS files (and others) that I have in multiple files that indicate specific CSS applicability. These are combined to a single CSS file by the template compiler and require no PHP overhead when requested. In cases of actual PHP empowered pages, in development I set a configuration variable to enable detection of changes to any of the dependency template files which invokes automatic recompilation. In production, auto recompilation is disabled for better performance. Cheers, Rob. -- .------------------------------------------------------------. | InterJinn Application Framework - http://www.interjinn.com | :------------------------------------------------------------: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `------------------------------------------------------------' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php