HTMLView - For creating web userinterfaces to DBI databases.
(c) Copyright 1998 Hakan Ardo
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
Description
-----------
HTMLView is a set of modules to handle relational SQL databases
through a DBI interface and create web userinterfaces to them. Among
it's features are the possibility to handle relations in the same
manner as fields and it is easily extended with additional field or
relation specifications as well as custom editors and viewers.
Build and Install
-----------------
All you have to do to build, test and install this stuff, if your
connected to the Internet, is:
perl Makefile.pl
make
make test
make install
This will run the tests on a remote server so if you're not connected
they will fail. Se the config.pm file on how to set up a local db in
that case.
Usage Overview
--------------
This system is based on a central DBIx::HTMLView::DB object, $db,
that contains the definition of the database and it's tables. It is
constructed with the shortcuts in the DBIx::HTMLView package (se it's
manpage for details). This object is defined in config.pm for the test
database and then that file used by both the test.pl script and the
example cgi scripts.
Each table inside the database class is defined with a
DBIx::HTMLView::Table object $tab which you'll get hold of with
$db->tab('table name'). This object can then be used the list the
posts in that table using $tab->list. That will return a
DBIx::HTMLView::PostSet object with the posts in form of
DBIx::HTMLView::Post objects.
Post and Table object are in build up of several DBIx::HTMLView::Fld
objects describing the fields and relations. For Posts this object
contains both the structure of it and the data contained in them. In
the case of the Table it's of course only the structure. Those Fld
objects are returned by the fld('fld name') method that is defined
both for Table and Post objects.
To then view your data there is the method view_html that is defined
for the PostSet, Post, and Fld objects allowing you to build your
viewers at any level.
To build you're html editors there are the edit_html method of the Fld
objects that will return an string to be placed in a html