Re: Structures_DataGrid Data Sources

From: Date: Mon, 23 Aug 2004 22:27:23 +0000
Subject: Re: Structures_DataGrid Data Sources
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-32862@lists.php.net to get a copy of this message
Andrew Nagy wrote:
Well considering the goal of the data driver is to remove the actual data source layer. Once you have binded your data source, we no longer know what type of data source you used. At this point we need to have a formbuilder that will build forms for any data source type, not just DOs. But don't worry, thanks to Olivier, we are loading all of the fb options from a DO into the datagrid, so we won't loose that functionality.
Some additional informations : The current interface definition requires a driver to expose the following methods : - bind($source) : establish the connection - count() : count rows (for ex, with DO, that calls $do->count() - fetch($offset,$length,$sortField,$sortDirection) : fetch rows - getColumns() : get information about columns (labels mainly) Although this interface provide some interactivity (limiting, sorting, etc...), it obviously is read-only. In a second time, this driver interface could also provide methods like : - insert() - update() The datagrid, as a data renderer, wouldn't use these, but a "dataform" would. Additionally, some drivers, according to the limitations that are inherent to the type of source they handle, would remain read-only. You may want to look at the following graph which illustrates how this new datasource layer could become a package of its own, providing its features to a whole new range of renderers : http://xung.org/misc/dgdo/adaptor_datasource.gif -- og

« previous php.pear.dev (#32862) next »