Re: DB_DataObject and Structures_DataGrid integration
| From: | Olivier Guilyardi | Date: | Fri, 13 Aug 2004 17:31:25 +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-32636@lists.php.net to get a copy of this message | ||
Markus Wolff wrote:
Olivier Guilyardi wrote:What I dislike is having to handle raw $_GET parameters while, say, for example HTML_menu, parse them as well, sort of behind my back. I'd say : or I handle them all, or I handle none of them, in which case there must be some kind of powerful framework which does it for me. Don't get me wrong though, I like and use HTML_Menu :) Actually, I'm interested by attempts to abtract the GET parameters handling. Another source of inspiration are Java beans as used in JSP for forms.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.Actually, most of my knowledge about events comes from using GTK in C. And in this environment, your statement about "loosely glued components" is quite wrong. But for web development, and PEAR, I just don't know. I like GTK, and well : <select>, <a>, etc... Aren't these all widgets ? It's not that I'm more experienced with desktop development (I know better cgi), but I just feel like the traditional widget+event+handler paradigm is powerful. So the .NET way about this attracts me.
Here, precisely, I was talking about the DataGrid, because that's what's on my mind currently. But of course, I'm wondering about what it could be at the whole application level, for every page, etc...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.I've never used an integrated framework. I looked thoroughly at BinaryCloud a while ago, but it did not attract me. Maybe is this a Cathedral and Bazaar issue. And, as an integrated framework, .NET for sure belongs to the former category, while PEAR is more on the Bazaar side. -- og