cvs: peardoc /en/package/html/html-template-flexy intro.xml

From: Date: Fri, 04 Jun 2004 06:25:44 +0000
Subject: cvs: peardoc /en/package/html/html-template-flexy intro.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-4195@lists.php.net to get a copy of this message
alan_k Fri Jun 4 02:25:44 2004 EDT Modified files: /peardoc/en/package/html/html-template-flexy intro.xml Log: update introduction to tie in more with current status and direction http://cvs.php.net/diff.php/peardoc/en/package/html/html-template-flexy/intro.xml?r1=1.6&r2=1.7&ty=u Index: peardoc/en/package/html/html-template-flexy/intro.xml diff -u peardoc/en/package/html/html-template-flexy/intro.xml:1.6 peardoc/en/package/html/html-template-flexy/intro.xml:1.7 --- peardoc/en/package/html/html-template-flexy/intro.xml:1.6 Tue Aug 12 22:31:29 2003 +++ peardoc/en/package/html/html-template-flexy/intro.xml Fri Jun 4 02:25:44 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <refentry id="package.html.html-template-flexy.intro"> <refnamediv> <refname>Introduction</refname> @@ -11,30 +11,79 @@ <title>Introduction</title> <para> HTML_Template_Flexy started it's life as a simplification of HTML_Template_Xipe, - however in Version 0.2, It became one of the first template engines to use a real - Lexer, rather than regex'es, making it possible to do things like ASP.net or Cold - Fusion tags. However, it still has a very simple set of goals. - + The long term aim of Flexy is to provide a universal Template Engine API for Compiling, + and native PHP type templates. + </para> + <para> + Flexy Supports a number of Backends (Template Formats), and is designed to be extended to + support more, The Key Formats are: </para> <para> <itemizedlist> <listitem> - <simpara>Very Simple API, easy to learn...</simpara> + <simpara>Standard - A rich Tokenizer driven engine, that uses {variable_placeholders}, + attribute based (flexy:foreach=&quot;....&quot;), and custom tag &gt;flexy:tojavascript ... + To rapidly create PHP code from simple markup. + These templates are designed to be editable in WYSIWYG HTML editors, + without breaking the tags</simpara> + </listitem> + + + <listitem> + <simpara>Regex - A classic templating backend, for supporting Smarty, Xipe, or Email + type convertion to PHP code. + </simpara> + </listitem> + + + <listitem> + <simpara>Raw - A non compiling backend, that enables you to create templates using PHP, + Useful if you intend to redistribute your application and are concerned about compilation + </simpara> </listitem> + + </itemizedlist> + </para> + <para> + Data can be assigned in two ways with flexy, depending on your prefered style of working. + </para> + + + <para> + <itemizedlist> + <listitem> - <simpara>Targeted at Object based systems - default behavior is to display object variables</simpara> + <simpara>Push - you put data into the template engine, using $flexy-&gt;setData(), + and $flexy-&gt;setDataByRef(), this is similar to the way Smarty and other templates + work. + </simpara> </listitem> <listitem> - <para>Designed to allow the documentation of available variables using - <link linkend="standards">PEAR standards</link>, eg. <link - linkend="package.php.phpdoc">PHPDoc</link> comments around object variables</para> + <simpara>Push/Pull - You provide the outputer with a Data Provider Object, (either a Data Object, or a Controller) + that contains the data to display. (This has the added benefit of making the Variables in the + template documentable, using <link linkend="standards">PEAR standards</link>, + eg. <link linkend="package.php.phpdoc">PHPDoc</link> comments) + </simpara> </listitem> + + </itemizedlist> + </para> + <para> + With all this Flexibility, it still manages to achieve + + + + + </para> + <para> + <itemizedlist> <listitem> - <simpara>Ability to edit the templates in WYSIWYG HTML editors, without breaking the tags</simpara> + <simpara>Very Lightweight Simple API, which easy to learn</simpara> </listitem> <listitem> - <simpara>Fast and Easy to do looping (or blocks), both for designing and runtime</simpara> - </listitem> + <simpara>In Normal operation very little code is actually loaded (so it's fast)</simpara> + </listitem> + </itemizedlist> </para> @@ -53,13 +102,15 @@ </para> <para> Php Code builders like Flexy, Smarty, SimpleTemplate (now HTML_Template_Xipe) tend - better at more complex templates, and can offer a better approach - to extendability. + to be better at more complex templates, and can offer a better approach to extendability. + (the long term aim of Flexy is to integrate support for all of these PHP Generator + templates into a simple package) </para> <para> - With Version 0.2, and the introduction of a full Lexer, Flexy offers unique HTML integration with - it's foreach,if attributes - and the ability to replace HTML Forms with standard PHP code. + The Standard Compiling Backend uses a Tokenizer, which offers the possiblities of + using HTML tags and attributes to provide looping and conditionals, and + make dynamic XML_Tree like elements of HTML Forms that can be manipulated + in your code. (This conversion is only done once when the template compiles) </para> </refsect1> <refsect1>

« previous php.pear.doc (#4195) next »