Habari PHP weblog software
Having a lot of work stacked up and nothing fun to do, I decided to ignore the work and give Habari a test installation on a localhost, just play around with it for an hour or two and see what the deal was with the core code.
To be scrupulously fair, these vague observations are the product of an hour or so, and of course, not authoritative in that regard. Against this, I have no great love for the present direction of WordPress… 2.5 seems laudable in most ideas, but not quite the finished version at present - there is still the spectre of bloat here, and I don’t think viable competition would do WordPress any harm at all.
PDO - PHP Data Objects, just not sure about this - as a database layer, WordPress uses a pretty simple class, ez_sql and even a bodged sanitisation function for escaping strings and gets by, with a certain amount of extra PHP before and after to keep it honest - this touches on the resource hog issue, recently mentioned. Nevertheless, PDO make it harder for the average programmer to get to grips with straight away, and I still have a gut reaction against framework for framework’s sake…
The multi-site install - having tried out 2 or 3 root urls, it certainly works as advertised - the smartest people around, sploggers, will have fun with this when they find out - how to run vast MFA networks off one installation - with WordPress MU, not that many hosts allow the hacking http.conf required to get subdomains going
The main point - PHP5.2 - Harbari is advertised to require it, presumably due in the main to the PDO thing - in this it reminds me strongly of Magento, online shop software, which demands bleeding-edge PHP/MySQL, crashes irretrievably otherwise and is an absolute pain. Magento is a (too) feature rich app, presumably designed to crush venerable osCommerce that struggles along with tables, an almost complete lack of a database wrapper and procedural PHP - and yet it hasn’t, largely because half its potential users can’t install the damn thing….
Sometimes, a few principles have to be sacrificed, to get along in the world as it is.












Michael C. Harris — May 11, 2008 @ 10:03 am
Thanks for trying out Habari. PDO gives us better security by default, by preventing SQL injection attacks, supports prepared statements, and allows us to support multiple databases (currently MySQL and SQLite, with PostgreSQL support on the way). You don’t need to know anything about PDO to be able to use Habari though, only if you want to contribute to the core. Not likely to be an issue for your “average programmer.”
Your post ends sounding a bit negative, with your comments about Magento. Did you have any problems with Habari? If you did, we’d love your feedback. Actually, we’d love feedback if there were things you liked as well
Lewis — May 11, 2008 @ 10:52 am
Not negative about Habari, coding or intentions - I think at the present time a strongly viable alternative to WordPress has become a definitely ‘good thing’.
The overall caveat I would have is on the issue of included frameworks and packages, in which, only for the purpose here, I’d include PDO - agreed, not an issue for the average webmaster, but probably yes, becoming an issue for the ‘average programmer’ - WordPress does benefit from its transparency and (indeed) slightly clonky old code - it gives the confidence to a lot of people to hack it around (now whether this is a good thing or not….).
Observations here as gross generalisation - I’ll certainly present my opinion, for what it’s worth, in better detail…
Owen — May 11, 2008 @ 3:42 pm
I think you may need to look more closely at how Habari employs PDO. There are wrapper functions provided by Habari to the relatively obscure PDO operations that mirror WordPress’ ez_sql. So for example, where WordPress uses db_query(), Habari uses DB::query(). Not much different.
PDO is a PHP-native library for database access that is more recent, cross-engine compatible, and more security-minded than the mysql extensions that are used by the WordPress version of ez_sql. PDO is not a framework, it’s a database library, one that will become more standard in PHP applications as developers become more familiar with PHP5.
PHP5 is the way of the future. 5.2 has the best balance of stability and functionality. Other developers would be wise to standardize on this version.