Re: DB_DataObject and Structures_DataGrid integration

From: Date: Fri, 13 Aug 2004 15:18:13 +0000
Subject: Re: DB_DataObject and Structures_DataGrid integration
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-32626@lists.php.net to get a copy of this message
Markus Wolff wrote:
Don't get me wrong, event handling isn't a bad thing (as mentioned earlier, I'm about to propose a general package for that in the near future), but in web applications, it shouldn't be used for flow control. This is just plain wrong.
What do you precisely mean by flow control ? Do you consider that responding to a user clicking an Edit button on a DG is about flow control ?
Also, this doesn't have anything to do with the idea of making the DataGrid package more flexible through the use of events. If events are feasible (IMHO, in most cases, simple callback methods will do, which have nothing to do with a real event system (see: Observer Pattern)), DataGrid should use them. Just don't try to copy *everything* from .NET - just because something makes sense there, it doesn't mean it makes sense in PHP. The DataGrid component is a good example for a really good component in .NET that should be brought to PHP, but in a PHP way. Using events for flow control in a web application isn't.
In the case of the DG, I agree that a whole event-handling framework isn't needed. I'm just interested by taking _some_ of the event/callback paradigm to abstract HTTP requests, and specifically forget about the GET hell. But, it surely is different of desktop apps. A callback function may not be enough. It would be nice to be able to define an event handler with a dsn-like sort of thing. It could be a callback function, or a script path+parameter, etc... -- og

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