Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Metapundit.net:
Improvements to Structures_Datagrid
Mar 15, 2006 @ 13:26:33

metapundit has posted some of his experiences with the PEAR Structures_Datagrid package and some extensions he's made to the package to remedy some usability issues.

One of the PEAR packages I have a love/hate relationship with is Structures_Datagrid. Structures_Datagrid actually provides a lot of functionality; you can bind a data source (an array, a DB_result or DB_DataObject or even an xml, csv, or RSS file) and then use a renderer to output the data. Current renderers include HTML Tables, CSV, XUL, and so forth.

Unfortunately (here's where the hate part comes in) there are some very poor design choices in Structures_Datagrid that limit its utility. Consider doing something slightly more complicated than the default example.

He notes that there are methods for making more custom kinds of tables, but then what's the point of using the class if you're manually defining everything anyway. He confronts these issues and creates his own extensions to the package - Ext_Structures_Datagrid_Column and Ext_Structures_Datagrid - to allow for more control. There's also an update to the post that mentions a "refactoring" of the Structures_Datagrid package that's in progress to make things a bit more useful.

tagged: improvement structures_datagrid extension Ext_Structures_Datagrid_Column Ext_Structures_Datagrid improvement structures_datagrid extension Ext_Structures_Datagrid_Column Ext_Structures_Datagrid

Link:

Metapundit.net:
Improvements to Structures_Datagrid
Mar 15, 2006 @ 13:26:33

metapundit has posted some of his experiences with the PEAR Structures_Datagrid package and some extensions he's made to the package to remedy some usability issues.

One of the PEAR packages I have a love/hate relationship with is Structures_Datagrid. Structures_Datagrid actually provides a lot of functionality; you can bind a data source (an array, a DB_result or DB_DataObject or even an xml, csv, or RSS file) and then use a renderer to output the data. Current renderers include HTML Tables, CSV, XUL, and so forth.

Unfortunately (here's where the hate part comes in) there are some very poor design choices in Structures_Datagrid that limit its utility. Consider doing something slightly more complicated than the default example.

He notes that there are methods for making more custom kinds of tables, but then what's the point of using the class if you're manually defining everything anyway. He confronts these issues and creates his own extensions to the package - Ext_Structures_Datagrid_Column and Ext_Structures_Datagrid - to allow for more control. There's also an update to the post that mentions a "refactoring" of the Structures_Datagrid package that's in progress to make things a bit more useful.

tagged: improvement structures_datagrid extension Ext_Structures_Datagrid_Column Ext_Structures_Datagrid improvement structures_datagrid extension Ext_Structures_Datagrid_Column Ext_Structures_Datagrid

Link:


Trending Topics: