Re: Datagrid class in PEAR?

From: Date: Tue, 23 Apr 2002 19:17:14 +0000
Subject: Re: Datagrid class in PEAR?
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-1257@lists.php.net to get a copy of this message
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@mamasam.com>:
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


« previous php.pear.general (#1257) next »