Re: DB_DataObject and Structures_DataGrid integration
| From: | Markus Wolff | Date: | Fri, 13 Aug 2004 16:37:12 +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-32633@lists.php.net to get a copy of this message | ||
Olivier Guilyardi wrote:
Markus Wolff wrote:Well, in a way it is - IF this happens, GO there and DO that. A bit like the much-feared proposed GOTO-operator for PHP - okay, maybe not :-)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 ?
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.What do you mean by the GET hell? Using events will not let you get rid of GET parameters. They must still be passed from request to request and they must still be evaluated - otherwise, how would you know what is supposed to happen on the page? IMHO, using an event-based system to determine what's gonna happen on a page in general will result in a great loss of flexibility. Event systems are much better suited to loosely glue components together which otherwise wouldn't know about each other.
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...Are you talking about page event handling in general here, or the DataGrid component?? Anyway, to enable a truly event-based page handling mechanism you usually need a real framework, like .NET. PEAR is not a framework, it's a collection of independent libaries. If you want a tightly integrated framework, you can look at WACT, Binarycloud, PHP.MVC or ISMO. There's no need to reinvent the wheel. CU Markus