logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: Datagrid class in PEAR?: msg#00177

Subject: Re: Datagrid class in PEAR?
Has anyone looked at dataminer yet ?

http://www.greenhell.com/projects/

Markus Wolff wrote:

Am Fri, 19 Apr 2002 14:01:41 +0200 schrieb Bertrand Mansion 
<bmansion@xxxxxxxxxxx>:


I have looked at the tutorial.
My first impression is that with ITX, HTML_Table, DB and possibly QuickForm,
we've got all the tools to make something at least as good and easier to
use. The idea of passing templates to the cells is nice and wouldn't require
so many lines of code if done with PHP and PEAR. For instance:

$colHeader = 'Picture';
boundColumnName($DBField, $colHeader);

$template = '<img src="{'.$DBField.'}">';
setColTemplate($colHeader, $template);

// Sorting

$sortQuery = 'select * from authors order by name';
setSortCol($colHeader, $sortQuery);
or :
$sortField = 'author';
setSortCol($colHeader, $sortField);
or :
$sort = array( $field1 => 'DESC', $field2 => 'ASC');
setSortCol($colHeader, $sort);

or we could even use an object to set the sort parameters.


Hm, if we should start from my code, I´d have to add quite a bit of
stuff to do it this way - but hey, if it leads to a better
implementation I´m even willing to throw away everything I´ve written
so far (and thinking of that, it doesn´t sound like a too bad idea
considering how the code looks right now ;-)).

However, what you are proposing looks quite good. My primary concern is
that instead of having to define everything in code, I´d always wish to
have the ability to put all grid properties in a configuration file (or
even a number of files) so that I can have my favourite grid
configuration up and running with only two or three lines in my
application code, which makes everything easier to read.

Also, this allows for building a visual grid editor later.

Regards,
  Markus




--
PEAR General Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>