Re: New Package: HTML_DB

From: Date: Thu, 24 Apr 2003 17:35:00 +0000
Subject: Re: New Package: HTML_DB
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-15477@lists.php.net to get a copy of this message
echo15@delirium.ch wrote:
Don't know whether it's functionality crosses OOH_Form, though (and I can't tell because OOH isn't documented, either, and it's code is thoroughly opaque).
I don't know OOH_Form. Where can it be downloaded? It's not really a concurrence to other form packages already on PEAR as it's strictly for editing SQL data, forms are not rendered from previously built form-objects, and built in protection against form and SQL hacks as well as a simple, expandable and very useful syntax check. And it's quite small - not much space for nasty bugs. Furthermore, all functionality is in one single page, so you only have to create one page (or form so to speak) to perform inserts/updates/deletes.
The package HTML_OOH_Form can be obtained from PEAR CVS only at the moment. It is in fact very well documented, but only in German (http://www.ulf-wendel.de/). There should indeed be no direct crossover in package functionality, as OOH only allows for manual form definitions either via creating form objects in PHP or by using an XML definition file. Basically OOH_Form is very much the same as Quickform, but a lot more OOP oriented (some would even mumble terms like "overkill" :-)). What would make a lot of sense to me is if a DB_Form package would be able to read a form definition from a database, and then return a fitting form object - which may very well be either a OOH_Form or Quickform object. [About DB_List]
It's a SQL table to HTML list renderer. You create a list object from an SQL table and add columns to it. There are properties to tweak the way the content is displayed, you can add action buttons to each row etc. Finally you call the render method and get a HTML table displayed based on the list object you've just created. This HTML table (the list) has built-in core functionalities such as sorting (little arrows in the column header), pageing (like search engines split results on several pages) and search. The idea is to use DB_List to Browse DB content and then link with action buttons to link to a second page with DB_Form to insert/update/delete content. Together with DB_Form you have to create only two simple pages to have a complete frontend for an SQL table.
Hmm... that sounds awfully familiar, I´ve written my own DataGrid class that does mostly the same. Can your class use templates for the output? If yes, what template engine(s) do you support?
Hope this helps to get an idea of what I'm cooking here. Again, my aim to submit this at this quite early stage is to figure out if it's good for PEAR, as I wouldn't implement some useful features that I'm not gonna use myself at this point.
Sounds swell to me ;-) Regards, Markus

« previous php.pear.dev (#15477) next »