Re: DB_DataObject and Structures_DataGrid integration
| From: | Olivier Guilyardi | Date: | Tue, 10 Aug 2004 11:41:00 +0000 |
| Subject: | Re: DB_DataObject and Structures_DataGrid integration | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-32526@lists.php.net to get a copy of this message | ||
Hi Justin,
Justin Patrin wrote:
On Mon, 09 Aug 2004 18:12:59 +0200, Olivier Guilyardi <ml@xung.org> wrote:According to WordNet : constatationI want to bind Structures_DataGrid to DB_DataObject in a more integrated manner than Structures_DataGrid_Record_DataObject. My constatation is :...I don't understand the word you used here.
n : an assumption that is basic to an argument
I've been experimenting with frontend, it's nice but too intrusive to me. I want to set up my own HTML_menu, and use the smart templating features of DataGrid. I thought about a driver for FormBuilder because I need fields names to labels translation. But, reading the good docs :) I just realized this is encapsulated in the DataObject with the fieldLabels property. This is elegant. So you're right, a Formbuilder driver is irrelevant, although I don't see the point with forcing your forms to act on single records : think of a spreadsheet-like form...- DataObject can sort and limit the data - Datagrid knows how the user wants her data sorted and limited Given that, I believe DataGrid and DataObject can interact in a bilateral way : - DataObject providing data to DataGrid (which DataGrid_Record_DataObject implements for a single record) - DataGrid telling DataObject what data to retrieve according to the user wish. While implementing this for my own needs, I may turn it into reusable code. How do you think I should go : - improving DataGrid_Record_DataObject ? - creating DB_DataObject_DataGrid (my current favourite) ? - creating a driver for DB_DataObject_FormBuilder ("FormBuilder_DataGrid") ? - something else ?Given that I know nothing about DataGrid, I can't really answer your question, but I doubt a display driver for FormBuilder would do what you want. FormBuilder is about showing a form for a *single* record. Of course, you could us eit to format your data and then output it...as I do in the frontend I wrote.
Sounds like you should be adding a driver to DataGrid to me. Perhaps you could add a FormBuilder renderer as well so that you can use FormBuilder's link displaying capabilities.Structures_DataGrid is .NET'ish. And browsing the related .NET documentation, I can see there are many data providers, but it always end up with a : datagrid->datasource = someDataProvider. According to this, you definitely are right about adding a driver to DataGrid. Do you think I can do this by creating a new package ? Or should I modify DataGrid ? -- og