Overview of Quickform, Smarty templates & Overlib
Quick
- Quickform is a php package lets you generate a form entirely in php.
- Smarty is a templating engine that separates the style and logic, ie php and html, of a web page
- Overlib is a javascript library that lets you generate popups when the mouse is moved over part of a web page
Overview of Quickform
Quickform lets you create web forms in a simple way, for me it's important features are:
- Create a form without the need to write html. Supports text fields, drop down lists, ...
- The form looks good & clean. I am a programmer, not an arty designer type
- Input field validation - a must to stop you putting rubbish into the database
- Input field validation can additionally be done in the browser - making it nicer for the user
Quickform is part of Pear - the library written in php.
Overview of Smarty
Smarty is a templating engine that separates php code and the html template, ie you have the
logic (php code) and the presentation (html template) in separate files.
- Coder and Designer maintain separate files, you don't mess up each other's work
- Coder and Designer can concentrate on what they are good at
- Common logic can be reused unchanged but with different templates look different, eg login pages on different sites
- Generated php and/or html can be cached, flexibly - you have a lot of control
- Smarty templates can contain presentation logic, eg loops - so display multiple rows from a database search
- Use multiple templates in the construction of one web (.html) file - eg have standard header/footer files
Smarty does not have to be used with Quickform.
Overview of Overlib
Overlib is a javascript library that lets you easily produce popups that appear when the mouse is moved over part of the page.
There are many effects that you may choose from, including:
- A simple box
- The above popup appears to the right of the mouse, this one appears to the left
- Sticky popup
- You can have a box with a caption
- You don't have to have a border
- Overlib also has some extensions
But beware - the extensions (below) are not ''offical'' and, although fun, don't work in some old browsers.
- You can have popups is a variety of
bubble
shapes
- You can have popups that fade in and
out
Return to this tutorial index.