RE: [PEAR] Datagrid class in PEAR?

From: Date: Sat, 20 Apr 2002 13:21:31 +0000
Subject: RE: [PEAR] Datagrid class in PEAR?
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-1230@lists.php.net to get a copy of this message
Guillaume JUSTIER said: [Talking about the code example at http://www.newbienetwork.net/class.report.php? order_by=secname&order_by_desc=1] > Yes it is exactly this approach I was thinking about. > I think it makes it : > - clearer > - easier afterwards to write something like : > $Grid->SaveSettings (be it ini, xml, db,etc...) [...] > I quite like it, what do the other people involved in this > discussion think ? I think the approach to the API is good, although I´d like the class to have a lot of default settings, so as long as you don´t want anything fancy, you only have to write two or three lines of code to get a basic grid. Also, I like to have full control on the SQL queries that are being used. The mentioned example looks like the SQL is being abstracted by the class methods. While this is okay for most basic queries, one might run into problems when trying more complex things like excessive multi-table queries that also need to be updateable by the grid class when in edit mode. Speaking of edit mode, I think the editing capabilities should be in a seperate class that extends a base class that only contains the viewing functionality. This allows for using a more lightweight approach when all you want to do is visualizing data, not editing it. Regards, Markus -- *21st Media* | Consulting, Konzeption, Produktion für die Bereiche: Markus Wolff | Internet, Intranet, eCommerce, Content Management, Hamburg,Germany | Softwareentwicklung, 3D-Animation, Videostreaming http://21st.de | Tel. [+49](0)40/6887949-0, Fax: [+49](0)40/6887949-1

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