Apache-PageKit

 view release on metacpan or  search on metacpan

docsrc/features.xml  view on Meta::CPAN

<chapter><?dbhtml filename="features.html"?>
<chapterinfo>
<releaseinfo role="meta">
$Id: features.xml,v 1.21 2003/11/25 10:20:24 borisz Exp $
</releaseinfo>
</chapterinfo>
<title>Overview of Features</title>
 <sect1><?dbhtml filename="mvcc.html"?>
  <title>Model/View/Content/Controller approach to design</title>
  <para>
   PageKit follows a Model/View/Content/Controller design pattern, which
   is an adaption of the Model/View/Controller pattern used in many other
   web frameworks, including Java's Webmacro and Struts.
  </para>
  <itemizedlist>
   <listitem>
    <para>
     The Model is the user provided classes, which encapsulate the
     business logic behind the web site
    </para>
   </listitem>
   <listitem>
    <para>
     View is set of PageKit Templates, or XSLT files that generate
     PageKit Templates
    </para>
   </listitem>
   <listitem>
    <para>
     Content is set of XML Files
    </para>
   </listitem>
   <listitem>
    <para>
     Controller is PageKit
    </para>
   </listitem>
  </itemizedlist>
  <para>
This approach parallels the division of the job responsibilities of a large web development team.
The programmers can focus on the Model, the designers on the View, and the content
administrators on the (you guessed it!) Content. PageKit provides the Controller which glues
everything together. 
  </para>
  <para>
This way everybody can focus on what they do best, whether it is programming, design, or
content. Since the interfaces are simple and well-defined they can easily work together without
interfering with each other. 
  </para>
  <sect2>
   <title>Model</title>
   <para>
    The Model is provided by Perl classes which implement the business logic that is custom to the
    site.  These class files should be located in the <filename>Model/</filename> directory.  Each URL is translated into a class and method automatically. 
   </para>
   <para>
It includes support for <ulink url="http://search.cpan.org/doc/MARKSTOS/Data-FormValidator-1.6/lib/Data/FormValidator.pm">Data::FormValidator</ulink>, making the tedious task of input validation easier.
To validate a form, you simply specify required fields and constraints. If there is an error, you
can return to the input form, and the invalid fields automatically get highlighted in red.
   </para>
  </sect2>
  <sect2>
   <title>View</title>
   <para>
    The View is defined by a set of PageKit Templates making up pages and their
    components located in the <filename>View/</filename> directory. These
    templates can be in HTML, WML, XML, or any text based format.
   </para>
   <para>
    Alternatively, you can provide a set of XSLT files that will generate PageKit Templates.
   </para>
   <para>
    PageKit Template is based on <ulink url="http://kobesearch.cpan.org/search?dist=HTML-Template">HTML::Template</ulink>.
There are different sets of tags, depending on
where the data is being pulled from.
   </para>
   <para>
The <link linkend="model.tags">Model Tags</link>,
&lt;MODEL_VAR&gt;, &lt;MODEL_LOOP&gt;, and &lt;MODEL_IF&gt;,
are filled with data by the Model.
   </para>
   <para>
The <link linkend="content.tags">Content Tags</link>,
&lt;CONTENT_VAR&gt; and &lt;CONTENT_LOOP&gt;, contain
XPath queries to the Content XML data.
   </para>
   <para>
The <link linkend="pagekit.tags">PageKit Tags</link> are set internally by the Controller.
   </para>
   <para>
It is easy to implement <link linkend="features.multiple.views">multiple views</link>, such as a printable version of a web page or a
co-branded site. To create a new view, simply create a directory containing template files for
the view. You only have to create templates for pages and components that you wish to
override. That is all views inherit from the default set of templates.
   </para>
  </sect2>
  <sect2>
   <title>Content</title>
   <para>
Content is stored in an XML files.  It is accessed either through XPath queries from
PageKit Template using <ulink url="http://kobesearch.cpan.org/search?dist=HTML-Template-XPath">HTML::Template::XPath</ulink> or by applying XSLT stylesheets to transform the XML into a
PageKit Template.



( run in 1.098 second using v1.01-cache-2.11-cpan-39bf76dae61 )