Re: Datagrid class in PEAR?

From: Date: Sun, 21 Apr 2002 01:48:16 +0000
Subject: Re: Datagrid class in PEAR?
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-1231@lists.php.net to get a copy of this message
See Below... ----- Original Message ----- From: "Markus Wolff" <wolff@21st.de> > Guillaume JUSTIER said: > [Talking about the code example at > http://www.newbienetwork.net/class.report.php] > 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. There are default settings in place. For example, unless you specificy otherwise, it will show 20 records per page. > > 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. Yes, this was something I was planning to add. I hadn't added it though, as of yet, simply because I haven't had the time. > > 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. That could easily be done. All in all, I was creating this class for the place I work, where we do some many reports, with such complex queries, I wanted to create something that would speed that up. However, this project fell off the top of the todo list due to other things. I will however, start work on it again with it's renewed interest. Jason Lotito PHP Developer's Network Founder www.devnetwork.net www.newbienetwork.net

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