|
Posted by phpdevkit on 06/08/07 05:20
The PHP Web Developer's Kit 2.01 is now available. Please come see
whether its number 1 design goal -- Make The Complex Simple -- was
achieved...
http://www.fotocar.com.mx/kit
---- A horizontal, tabbed dialog combining HTML, CSS and Javascript...
$ct = new container_tabbed() ;
$ct->add( "Tabbed" , "The Tabbed Container has 4 sizes..." ) ;
$ct->add( "Container" , "Everything is customizable..." ) ;
$ct->add( "Objects" , $inner_tabbed_container ) ;
$ct->output() ;
---- A vertical, double-sided tabbed dialog...
$vt = new container_tabbed_vertical2() ;
$vt->add( "Vertical" , "This is a vertical tabbed..." ) ;
$vt->add( "Tabbed" , "There are classes for tabs..." ) ;
$vt->output() ;
---- A table with caption, collapsed borders, alternating row colors
and checkboxes...
$t = new table_usingcss( "Customers" ) ;
$t->usecheckboxes() ;
$t->headers( "Name" , "Address" , "City" ) ;
$t->cells( "P. Smith" , "1419 E. Oak" , "Mexico City" ) ;
$t->cells( "R. Estabar" , "SM 23" , "Los Angeles" ) ;
....
$t->output() ;
---- Stacked containers...
$cs = new container_stacked() ;
$cs->add( "Stacked Container" , "This is a Stacked Container..." ) ;
$cs->add( "Exposure Methods" , "The panes may be exposed by..." ) ;
$cs->output() ;
---- Display content along an arc...
$arc = new container_cycle_arc() ;
$arc->add( "Default" , "Default is to arrange in a circle..." ) ;
....
$arc->output() ;
---- Or along one of 360 vectors...
$t2 = new container_cycle_vector() ;
$t2->add( "demo_life" , new image( "demo_life.bmp" ) ) ;
....
$t2->output() ;
---- A menu bar with or without (slightly) transparent panes...
$m = new menubar() ;
$m->addmenu( "Search" ) ;
$m->additem( "Google" , "http://www.google.com" ) ;
$m->additem( "Yahoo" , "http://www.yahoo.com" ) ;
....
$m->output() ;
---- Bookmarks...
new bookmark( "Chapter 7" , OUTPUT_NOW ) ;
---- Horizontal menu of links...
$hm = new menu_horizontal() ;
$hm->add( "Google" , "http://www.google.com" ) ;
....
$hm->output() ;
---- Navigation bar...
$navbar = new navigationbar() ;
$navbar->add( "Entertainment" , "fun.php" ) ;
$navbar->addsublink( "Movie" , "fun.php#movie" ) ;
$navbar->addsublink( "Music" , "fun.php#music" ) ;
$navbar->output() ;
---- Transition effects...
$barn = new container_ie() ;
$barn->setsize( $width , $height ) ;
$barn->setbarn() ;
$barn->addpane( "Click me to see the barn effect..." ) ;
$barn->addpane( "Click again to repeat effect..." ) ;
$barn->output() ;
---- Expanding container...
$expand = new container_expand( "Links" , $width ) ;
$expand->addexpandable( "Search" , $search_links ) ;
$expand->addexpandable( "Buy" , $buy_links ) ;
$expand->addexpandable( "Info" , "Like all..." ) ;
$expand->output() ;
---- Navigation Xtabs...
$x = new xtabs() ;
$x->add( "Blue" , $xtabs_object_blue ) ;
$x->add( "Blue2" , $xtabs_object_blue2 ) ;
....
$x->output() ;
---- A gradient bar of links in a dozen available shades...
$lb = new link_bar() ;
$lb->add( "Politics" , "politics.php" ) ;
$lb->add( "SciTech" , "scitech.php" ) ;
....
$lb->output() ;
---- EVERYTHING is an object
$div = new div() ;
$css = new css_div() ;
$font = new font() ;
$select = new select() ;
$textarea = new textarea() ;
$list = new list_unordered() ;
$form = new form() ;
---- All content may be a string or Kit object
$div = new div( "A string for content" ) ;
$div = new div( $kit_object ) ;
$div->add( "A string" ) ;
$div->add( $kit_object ) ;
---- Built-In CSS this easy...
$h1 = new h1( "CSS This Easy" ) ;
$h1->usecss() ;
---- Customized CSS...
$h1 = new h1( "CSS This Easy" ) ;
$css =& $h1->usecss() ;
$css->setfontsize( "large" ) ;
---- Entirely consistent interface
$c = new container() ;
$c = new container( $content ) ;
$c = new container( $content , $width ) ;
$c = new container( $content , $width , OUTPUT_NOW ) ;
$div = new div() ;
$div = new div( $content ) ;
$div = new div( $content , OUTPUT_NOW ) ;
---- Popup tooltips
new tooltip( "This is a tooltip..." , $width , OUTPUT_NOW ) ;
---- Design Goals
Number 1: Make the complex simple. Every object is an answer to the
same question: what is the shortest and simplest syntax needed to
create a working object?
Rapid-Protyping-Friendly: Just get it working, then observe and
refine.
Maximize many-to-one relationships: Care was taken, when possible, to
share a single CSS object among many instances of HTML objects. You
can, for instance, create a single paragraph object, customize its CSS
then output many HTML paragraph elements each with their own content
but all sharing a single CSS.
Highly Object-Oriented design - abstraction, classes, encapsulation,
modularity, constructors, code-reuse, objects, inheritance,
overriding.
Robust but easy to use via default argument values
Consistent naming conventions
Predictable and consistent method parameters - (e.g., all of the Kit's
HTML objects and containers take optional content for the first
parameter)
Optional arguments where practical
A get...() method for every set...() method; a deceptively significant
feature as it permits all objects to more easily share settings and
data with each other.
Minimum method arguments
Many methods available for easy customization.
Specific, narrow-purpose classes and methods (the KISS principal)
Interchangable components - the container class, for instance, uses
the Kit's HTML <div> object to bookend its content. You may, with a
simple override, create a new container class that uses almost any
other tag; all of the Kit's HTML objects are derived ultimately from
the same parent so it's plug-n-play.
W3C Compliant
IE Support (filters, effects, marquee, etc...) and all very simple to
use.
Everything is an object: a class for every HTML and CSS element (over
300 classes). Actually, there are a few Kit utility functions (not
within a class) to simplify development. One function, in particular,
called kitget(), takes an arbitrary number of strings and Kit objects
as parameters and combines everything into a single string; handy for
nesting and creating strings with lots of mixed decoration (i.e.,
bold, italic, code...)
Many table-driven constants to control default behavior
Lots of examples including an entire sample project.
----
http://www.fotocar.com.mx/kit
Navigation:
[Reply to this message]
|