Re: [ANNOUNCEMENT] DataGrid-0.4 (alpha) Released.
| From: | Andre Temme | Date: | Wed, 17 Mar 2004 07:13:52 +0000 |
| Subject: | Re: [ANNOUNCEMENT] DataGrid-0.4 (alpha) Released. | ||
| References: | 1 2 3 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-11346@lists.php.net to get a copy of this message | ||
Andrew S. Nagy schrieb:
Andre Temme wrote: (...)
could you be a little bit more specific about this package? Maybe you could offer an use case where DataGrid might be helpful? (...)
Andre, Yes, it can be looked at as an abstraction layer between your datasource and your output. Basically it generates a table of data that can be sorted and paged. It can also be printed as an HTML table, a Smarty Template, an XML document or an Excel Spreadsheet ... hopefully more to come. It is mocked up from the .NET Framework DataGrid control.Ah, I don't know that .NET-control, maybe I should look it up :-)
Here is the short answer: have you ever looped through a records set from a database and then printed each record as a row in a table (im sure you have)? This will do all the outputting (ie. HTML), sorting (if you are not using a database, ie. XML document), and paging (ie. showing 20 records per page like google).Sure, plus filtering. I'm processing data like this in a middle sized application (online reporting to databased statistical data), it would have been less afford with your class, I suppose :-)
take a look at my example page: http://www.webitecture.org/HTMLDataGrid/docs/examples/example.phpNice example, thanks so far - examples like this would be helpful to many of the packages here ;-) One question left: In my application, in some cases I run into memory problems because of the data-objects getting to big. Looking at your debug-example, I would fear the same, your main array looks pretty big for five rows of data. Have you thought about that or is there even a generall approach to solve such problems? The only solution that come to my mind would be to use more logic within the database, but this would mean to loose control in the controller layer :( Regards, André