From: Steve W. <sw...@wc...> - 2000-11-03 20:34:50
|
Hi Ori! Sorry for the long wait in replying. I'd love to see it. I hope I have time to read it properly. I'm interested in your comments on PHP's object model too; I have read recently that it's too immature (after the PHP Kongress in Colonge). We have an extensive rewrite in OO as well, done by Jeff Dairiki. Have you seen it? It has all the features (I think) of the 1.1.7 release plus some improvements. I've added the task to our Task List on Sourceforge to objectify the database access. This generally makes things easier for the developer: packaging data and the functions that operate on that data. But PHP doesn't seem to offer much more after that. Couple this with the problem that object systems can be much harder to understand than procedural ones, and that gives me second thoughts about introducing OO into PhpWiki. In a well designed OO system, the classes are loosely coupled, they form subsystems that are easy to understand, and they are easy to discover and modify. If we only objectify one interface, we would have to do quite a bit of surgery on the code (if we stick with the current code base, and I don't see why not) for what might be little gain. What would be infinitely better is if we used some kind of generic DB library, like Perl's DBI/DBD. Then PhpWiki could run on any relational database, and we would only have to maintain one interface and the various schemas. If we were really lucky, this library would support flat file and DBM access as well, but we can wish all day for PHP to be Perl and it's not going to happen ;-) cheers sw On Wed, 1 Nov 2000, Ori Folger wrote: > Hi > > I have written an OOP based Wiki in PHP a while back, before I knew of > phpwiki. It's not as feature rich as phpwiki, but I think it's a good start. > > Would you be interested in seeing it? > > Ori > ...............................ooo0000ooo................................. Hear FM quality freeform radio through the Internet: http://wcsb.org/ home page: www.wcsb.org/~swain |
From: Arno H. <aho...@in...> - 2000-11-03 23:12:09
|
> We have an extensive rewrite in OO as well, done by Jeff Dairiki. Have > you seen it? It has all the features (I think) of the 1.1.7 release plus > some improvements. Yes, Jeff has done some outstandig work within very short time. > Couple this with the problem that object systems can be much harder to > understand than procedural ones, and that gives me second thoughts about > introducing OO into PhpWiki. The problem I see with OO in phpwiki is this: most of the time we only have one instance per class - so what do we gain by using OO? What makes $data->function() better than function($data) ? In other cases like e.g. the iterator class in Jeff's branch OO can be very useful. And I guess in 1.3.x we will use OO to some extension where it makes sense but keep to the procedural approach otherwise. OO excels when you can take advantage of inheritance and other more sophisticated features. But those cases are hardly needed in phpwiki. Unless you can convince me otherwise I think a 100% OO approach has more cons than pros. /Arno |
From: Ori F. <or...@co...> - 2000-11-04 22:57:20
|
Hi As you and Arno said, OOP is not appropiate for a wiki. In fact, I have ceased development of my own version and hope to contribute to phpwiki instead. What I hoped to achieve with my wiki, and this has little to do with OOP, is modularity. I not only wanted a different data storage approach, but also a different parser and a few more advanced features. I felt that a wiki which will be easy to install and configure and yet offer a lot of the possible wiki features would be a good idea. As to an abstract database interface, I find that the one that comes with PHPLib is easy to use. My wiki should work fine with any of the RDBMS's supported by PHPLib (well, maybe the random page feature will fail since it relies on a specific MySQL feature). There is also a DBI-like class being worked on as part of PEAR, the future PHP version of CPAN, you might want to look for that. - Calanya, aka Ori Folger "Don't anthropomorphize computers -- they hate it." |
From: Sandino A. <sa...@sa...> - 2000-11-07 05:10:46
|
Steve Wainstead wrote: > > What would be infinitely better is if we used some kind of generic DB > library, like Perl's DBI/DBD. Pear DB (or any other db abstraction lib) can be used, but most of the times the DB portability problem resides in the SQL differences between databases, so a DBMS-specific driver is always needed. -- Sandino Araico Sánchez Diga no a la piratería, use software libre. |