Location: PHPKode > projects > Pieforms > pieforms-php5-0.2.2/doc/html/user/features.html
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns=http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.4.1: http://docutils.sourceforge.net/" />
<title>Pieforms Features</title>

<link rel="stylesheet" type="text/css" href="../style.css" />
<div class="document" id="pieforms-features">
<h1 class="title">Pieforms Features</h1>
<p><div id="breadcrumbs"><a href="http://pieforms.sourceforge.net/">Pieforms Home</a> &raquo; <a href="../">Documentation Home</a> &raquo; <a href="">Pieforms Features</a></div></p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field"><th class="field-name">Author:</th><td class="field-body">Nigel McNie</td>
<tr class="field"><th class="field-name">Contact:</th><td class="field-body"><a class="reference" href="mailto:nigel&#64;catalyst.net.nz">nigel&#64;catalyst.net.nz</a></td>
<tr class="field"><th class="field-name">Copyright:</th><td class="field-body">This document has been placed in the public domain</td>
<div class="contents topic">
<p class="topic-title first"><a id="contents" name="contents">Contents</a></p>
<ul class="simple">
<li><a class="reference" href="#simple-to-use-api" id="id1" name="id1">Simple To Use API</a></li>
<li><a class="reference" href="#pluggable-and-extensable" id="id2" name="id2">Pluggable and Extensable</a></li>
<li><a class="reference" href="#asynchronous-forms" id="id3" name="id3">Asynchronous Forms</a></li>
<li><a class="reference" href="#full-internationalisation-i18n" id="id4" name="id4">Full Internationalisation (i18n)</a></li>
<li><a class="reference" href="#html-4-01-compliance" id="id5" name="id5">HTML 4.01 Compliance</a></li>
<p>This document outlines the major features that Pieforms has, with a brief
description of each one and links to more information for them.</p>
<div class="section">
<h1><a class="toc-backref" href="#id1" id="simple-to-use-api" name="simple-to-use-api">Simple To Use API</a></h1>
<p>For the vast majority of cases, all you ever see of the Pieforms API is the
<tt class="docutils literal"><span class="pre">pieform($form)</span></tt> function call. Most of the work is specific to your
application - the definition of the form, and the function to handle successful
submission. This means you can concentrate your efforts on the important parts
- how your form is defined, and what to do when the user submits it properly.</p>
<p>Practically, this means that:</p>
<ul class="simple">
<li>Prototyping is really easy - if you need to prototype a page, it won't take
you very long to hack up a display-only form</li>
<li>The submit function can follow the so-called &quot;happy path&quot; - because you know
that all the data is validated, your function can concern itself entirely with
the job of writing information to the database, sending e-mail, logging a user
in, or anything else you need.</li>
<p>The form definition itself is intuitive, making it really easy to add, remove
and re-order the elements in your form in about a minute of work - which is how
long it <strong>should</strong> take. And with all the available elements, renderers and
rules pre-made for your convenience, form building will often just be a case of
selecting the parts you require.</p>
<p>And if you find you need something that isn't available, the APIs for making
new plugins are simple and consistent, making this job easy as well. Combined
with <a class="reference" href="http://mochikit.com/">MochiKit</a> on the client side, you will find
making new plugins dead easy!</p>
<div class="section">
<h1><a class="toc-backref" href="#id2" id="pluggable-and-extensable" name="pluggable-and-extensable">Pluggable and Extensable</a></h1>
<p>Each of the three main components to a Pieform - elements, renderers and rules
- are pluggable. This means if Pieforms doesn't provide something you require,
you can just write it yourself. Pieforms provides a method for you to list
directories where plugins are located, meaning you can keep your creations
separate from the core Pieforms plugins if you like. And if you think your
plugin is neat and could be used by others, you could submit it to Pieforms as
a <a class="reference" href="http://sourceforge.net/tracker/?group_id=182497&amp;atid=901456">feature request</a>, and it could
be included in the next release for everyone to enjoy.</p>
<div class="section">
<h1><a class="toc-backref" href="#id3" id="asynchronous-forms" name="asynchronous-forms">Asynchronous Forms</a></h1>
<p>By simply flipping a switch, you can turn your forms from being standard
<tt class="docutils literal"><span class="pre">POST</span></tt> forms into snappy, responsive &quot;Javascript Forms&quot; (or JSForms as
Pieforms knows them). Rather than doing a full <tt class="docutils literal"><span class="pre">POST</span></tt> every time the form is
submitted, the form data is submitted to a hidden iframe, and the result
returned as JSON. This makes the form &quot;feel&quot; much faster and responsive,
especially when the validation may be complex and the user may have to have
several goes at submitting a form before they get it right.</p>
<p>This also frees your page to perform actions using javascript during and after
the form submission. For example, you could place a spinner on the page
somewhere or disable the submit button and replace the text with 'processing
form...' when the form is submitted, and then display a message when the form
is successfully submitted.</p>
<div class="section">
<h1><a class="toc-backref" href="#id4" id="full-internationalisation-i18n" name="full-internationalisation-i18n">Full Internationalisation (i18n)</a></h1>
<p>Though there is not a lot to translate, Pieforms has i18n support, so the rule
messages can be in your native language if you need. Elements also support i18n
where required - for example, the calendar element supports different
languages. Although the only supported language at the moment is &quot;en.utf8&quot;, it
will take only around 10 minutes to add new languages. Ask on the mailing list
or in the forums!</p>
<div class="section">
<h1><a class="toc-backref" href="#id5" id="html-4-01-compliance" name="html-4-01-compliance">HTML 4.01 Compliance</a></h1>
<p>Pieforms generates HTML 4.01 compatible output. It does not support XHTML at
the moment, but the author reckons this will only take an hour of work, if you
ask nicely :).</p>
<p>Pieforms uses the <tt class="docutils literal"><span class="pre">tabindex</span></tt> attribute for form elements, meaning that
keyboard users are not forgotten. Pieforms also supports auto-focusing the
first field of a form on page load, and auto-focusing the first field with an
error on it if there is one.</p>
<p><div id="breadcrumbs"><a href="http://pieforms.sourceforge.net/">Pieforms Home</a> &raquo; <a href="../">Documentation Home</a> &raquo; <a href="">Pieforms Features</a></div></p>

<div id="footer">Pieforms by <a href="http://nigel.mcnie.name/">Nigel McNie</a> and <a href="http://pieforms.sourceforge.net/about#authors">others</a>,
&copy; 2006 Catalyst IT Ltd. Pieforms is released under the <a href="http://gnu.org/licences/gpl.html">GNU GPL</a></div>
Return current item: Pieforms