Reason I Would Stay with WordPress

To be honest, I’ve often thought about leaving WordPress and moving to another application. S9Y seems attractive. Padraic has it and it has features that I would very much like to have. However, that was before WordPress 2.3 came out.

In response to Hello Habari on Elizabeth’s blog, I think WordPress gets a lot of grief for its architecture. In Elizabeth’s case, it was because she was on an outdated version. A lot of changes were made since WordPress 1.2 and 1.5. A lot of changes are being made for WordPress 2.5.

To shun WordPress because of past mistakes when not really diving into the current code base is a mistake in my opinion. However, I used to think the same and I’ve been using and upgrading WordPress since the 1.2 days. I think that is where we diverge, is the upgrading part.

Habari Quick Code Review

Habari made several mistakes, I believe. It does do a few things right however. I mean this is the opinion of a former haterz of WordPress core. When you really get in to the community of WordPress, the misconceptions really break apart.

  1. Complex File and Folder Structure

    I do not think that the WordPress structure is broken, in that it needs to be “fixed” with a more complex file and directory. WordPress has three folders descriptive named “admin”, “content”, and “includes” with a prefix, “wp-”. The directory structure for Habari is not as intuitive.

  2. Starting from the Ground Up does not automatically make you better.

    I often thought of forking WordPress to create a complete OO based WordPress system. The thought did not occur to me to rewrite WordPress, because I’m only one person and it would take many years to get where WordPress is now. Granted the Habari team did have a falling out from the WordPress team for some reason or another back in the 1.2 – 2.0 days.

    For them to get where WordPress is now, it is a long and hard road of them. Also, there have been many contributors to WordPress over the past four years, including many of the Habari team. I think that while the base of WordPress grows from the usage and those users contribute back in the form of patches, it will increase the stability of the core further.

  3. WordPress Codex verses Habari Codex

    I do agree that Habari has the foundation for making for great documentation down the road towards a gradual stable 1.0.0 release. WordPress has had many years of documentation contributors ahead of the team.

    The WordPress codex is not what you would call complete, with details that sparsely cover some obscure but highly needed, while others are well covered, but most of the content worthless.

    It would not be difficult for Habari to defeat WordPress in the area of codex documentation if they cover first the areas of matters to the Users, and then focus on the more broad attention to what developers care about.

  4. Habari uses PDO, WordPress uses mysql extension

    In a PHP 5 OO fork of WordPress, PDO would make for a better replacement of the WPDB abstraction that WordPress uses. My experience with writing cross SQL queries for SQLite and Mysql has been great using PDO. However, my method probably would not be inline with Habari or WordPress.

  5. Habari restricts you to one class for plugins

    False! *Updated! As it has been pointed out by others, the Plugin API of Habari is quite powerful, even more so than WordPress.

    One of my biggest complaints with several WordPress plugins that I’ve came across is that when classes are used, the design pattern is Singleton. Habari requires that you use this model for your plugin. The problem is that for complex plugins, your class could be massive.

    The only benefit is that it uses reflection (which is slow by the way) to automatically hook the methods into the actions and filters. In WordPress this is a manual process.

    However, I think it should be a manual process. Copying .NET framework in this regard is a mistake. However, C# and .NET framework do not restrict you to using only one class for all of the “hooks”. You have full freedom to tell .NET which method and class to call and also the name of the method.

    For PHP at least, they should just had stuck with WordPress’s plugin API, but extended it to be Object Oriented. That is one thing that primarily halted me from joining that project last October.

  6. WordPress has Unit Tests too

    I’ve looked at the unit tests for S9Y last year and found one. Habari has a few, but WordPress has more than both combined. The automated testing for WordPress is ongoing and while the entirely of WordPress is not covered, the same can be said for Habari and S9Y.

  7. Habari’s Object Oriented Goodness

    Does OOP make your application better than procedural code? No. Habari does get bonus points from me at least for having a clean Object Oriented class framework. It is beautiful, really beautiful.

    However, I don’t think WordPress should move to a complete Object Oriented system. What it has now is a system that a majority of novice users can pick up rather quickly without needing experience and knowledge of how OOP works.

    Procedural is much easier to explain to a novice. It becomes magnitudes harder to explain concepts of inheritance when the user has to follow the flow down to base classes and figure out if the child class overrides the parent method with its own method.

    When WordPress gains an OO backend for all core library components, I don’t believe they will replace and remove the procedural library. The users you want to cater to, are the novices and designers who want to build themes using an easy to comprehend system and as much as I hate to say it, while OO can provide that, it doesn’t when novices want to crack up the hood and see what drives the functionality.

  8. Habari has good inline Documentation

    I can look and see that all of the methods and classes I’ve looked at have at least phpdoc short descriptions, parameter type/descriptions, and return type/description. Some of the methods could use with long descriptions, it would be time consuming or difficult to add that for the core.

    This is something that WordPress needs and something that WordPress is gaining slowly. It wouldn’t be that difficult to get WordPress up to grade where Habari is, in the area of documentation.

Is WordPress really that broken?

The primary rebuttal I have is the argument that Habari is better because of the cleaner code, documentation, and general OO base. While those are great for moving forward, it will take quite a while for Habari to get the sort of base that WordPress has. However, if Elizabeth wishes to move over from the attitudes based on PHP IRC, the more power to her.

While I don’t and haven’t always agreed with the direction WordPress has taken and the position of supporting PHP 4.2.0. I think the primary focus of what drives WordPress is the users and what users need. As always WordPress and Habari is a community driven development. The core team can’t do everything.

I’ve learned a great deal from working with WordPress in the past four months. I’ve very much enjoyed the community’s insight, contributions, and general friendliness. Friendly now even through I was an asshole at the beginning.

I believe there was a discussion on moving to HTML Purifier that was shot down for some asinine reason and I proceeded to debate them on the subject as to why HTML Purifier was a better solution than Kses.

I still think HTML Purifier would be a great replacement for Kses. I’ve been using it for this blog and a lot of the problems that others are having with Kses don’t affect me.

Leaving WordPress Behind

I’m halting my involvement with WordPress to work on Astrum Futura again. I do plan to take what I’ve learned on the plugin model and duplicate it for Astrum Futura.

WordPress has also injected its template procedural model on my development style also. I may use objects for the core, but when building the templating, I’m more incline to use procedural.

I think many novice and intermediate developers can learn a lot from WordPress, when they get passed their misconceptions and misgivings that they may have for WordPress.

Possibly Related Posts:


Tags:

7 Responses to “Reason I Would Stay with WordPress”

  1. Robin says:

    Uh, WordPress has something like 15 random wp-*.php files in the root folder, which I would definitely categorize as disorganized. A lot of those are old feed files and aren’t even used anymore.

  2. Jacob Santos says:

    I’m not saying WordPress is disorganized or organized, I’m saying it is easier to understand the intention of the files and folders. There is also a history with the files as to why they are still in the core.

  3. Jacob, Habari plugins are not restricted to a single class file (though they do have to inherit Plugin). Plugins can even use spl_autoload() to autoload their own class files.

    btw, I’m not sure that saying there are historical reasons why the files are there helps your case. They should be there for technical reasons. Personally, I find the Habari file structure much more obvious, but I’ve used Habari much more than I’ve used WordPress.

  4. Jacob Santos says:

    @Michael

    I’ve been meaning to seriously update this. I’m not sure how many have found this, but it is lacking facts in a few points. One of the developers made a reply to this post and after talking to that person and finding out more, I’ll have to say that I was wrong, on at least three points.

    Thanks for reminding me to update this! Can’t do it today, but probably this week. it is better to not give any false representation of Habari or look like a fool.

  5. Jacob Santos says:

    I think this reads mostly as a reason for most people to choose Habari, but WordPress is more mature. I’m betting that in the future, Habari will be much more popular and the reign of WordPress won’t be as great. However, the faults of WordPress are being improved, so I might be wrong.

    It is generally the community, if the community decides that WordPress no longer suits their needs, they will find another one, whether S9Y or Habari or another blogging platform.

  6. Jacob, thanks for your reply. It’s interesting that you mention community, because that’s one of the reasons I was so attracted to Habari; it has a great community.

  7. Jacob Santos says:

    Michael, I know from my discussions with the Habari developer that replied to this post. I got the impression that I would be very happy with the community and helping out.

    My time is better spent with WordPress, I believe, Habari has the right paradigm with coding practices and respect with potential developers, assholes, and I can suspect community members.

    Actually, the real reason I don’t work on Habari is that I don’t think I can offer anything at this moment. I could learn a lot, but right now I can actually do something in the WordPress community and until I can no longer achieve anything within WordPress I don’t think I’ll move to the Habari community.