#1) True. It does not use an MVC paradigm. That's not the way it was designed, and they're not able to make it MVC w/o breaking backward compatibility with the huge ecosystem of plugins and themes that currently exist.
#2) True, and I agree. The function naming could be improved. If you don't know what the function does, look it up in the codex or the source code. The documentation could improve, too, but one of the stated goals for their next development period is improved docs.
#3) Look at the docs. Yes, the_title() writes to the page. If you want to use the title in a variable, there is get_the_title(). There are generally other functions or parameters you can do if you want it to return the value rather than writing it.
#4) False. The comments template file is comments.php.
For my defence, I also lead you to the get_search_form() function that does NOT return the search form as a variable, but that really writes it as HTML
My company hates WordPress style theming. In fact, many of the design decisions we made on our product were to address this pain point. There are so many details to remember that the process of creating a theme becomes about Wordpress rather than about front-end web code.
We use Twig as a templating language and expose our entire data API so there isn't a massive set of functions to learn. Here is an example of how to list the latest posts:
<ul>
{% for post in hifi.get({'type':'post','orderBy':'-publishedAt'}) %}
<li>{{ post.title }}</li>
{% endfor %}
</ul>
This keeps the process of creating a theme mostly about HTML/CSS because it dramatically reduces the specific information that you need to know about the platform itself.
So let me get this straight. Some developer/guy spends 5 minutes trying to theme a WordPress website for himself and decides to write an article bitching about it instead of actually reading some documentation or the thousands of Google results from countless other developers who have done the same and much more? The first commenter pretty much sums up how much this guy knows about WP themeing (hint: nothing).
This almost happens to me all the time but I know better. I spend 10 minutes with a new program, decide it's batshit crazy but instead of posting a lame article I have the wisdom and experience to stop and tell myself "I'm just a noob" and will probably embarrass myself.
And what are this so-called thousands of Google results from countless other developers who have done the same and much more? Dirty workarounds that shouldn't be necessary if WordPress had been made properly in the first place. That's only what the author says: although WordPress rocks to propel blogs, it's far from being made of good code.
you can rewrite a lot of the WP functionality by writing a plugin. if your plugin is popular, it's modifications may be absorbed into the core software that is distributed at wordpress.org. you're calling open source development dirty workarounds.
I bet the developers have thought of rewriting it using OOP and an MVC pattern, but all current plugins and themes would have to be rewritten as well. It's not so bad, since you'd only need the top few dozen plugins and themes rewritten to get traction.
I'd be willing to help out if anyone here is brave enough to try a rewrite!
WordPress is abandoning support for PHP4 and MySQL 4 in version 3.1. This will allow them to incorporate many of the features in PHP5 they haven't been able to do yet such as stronger OOP.
It doesn't need a rewrite. Instead, work with the many brilliant devs who have been improving it for years and know it inside-and-out -- including its flaws and areas for improvement.
Oh, come on. WordPress could have started providing a decent API eons ago. They don't care. Or they fundamentally don't see there's anything wrong with spaghetti code and inconsistent API's.
The only reason they are abandoning PHP4 because it has become so rare they can't test against it anymore, not because they want to improve anything. Remember this crap: http://ma.tt/2007/07/on-php/ ?
Which is typical for WordPress: one of the most successful companies to be built on PHP, and all they do is bitch about it and use their influence on a part of the community to hold it back instead of contributing, like Facebook, Digg and such.
I'd call the API a success: it has thousands of authors releasing thousands of plugins and themes and this is only the code that's been released open-source.
We have been providing a stable and reliable API for a long time.
Just because it doesn't look like how you envisage it should doesn't mean it doesn't exist.
Matt's post was true at the time and WordPress.org the open source project has never been "holding back the php community". Instead we have been ensuring that the most important people, our users, are able to upgrade reliably and easily on whatever hosting platform they use.
In the end we put the users first because without them the project would just wither away!
Why bother? You could go a long way and make things clearer by giving the functions better, new names and deprecating the old ones. "Rewrite with OOP and MVC" is an easy, whiny, pointless suggestion. Wordpress is warty, but it doesn't need a rewrite.
Rewrite with OOP and MVC" is an easy, whiny, pointless suggestion
Separating the design from the code would make it a lot easier for designers to create themes without having to worry about PHP. A proper templating system like Smarty would make a huge improvement with its built-in modifiers. For example:
This makes any display logic in the templates more portable when switching themes as well, because designers will be less prone to putting that code in header.php or single.php.
I agree, but the point is it is not a rewrite to add a templating engine to Wordpress; in fact it would be a (relatively) simple additional theme style that could co-exist with the existing PHP themes.
in fact it would be a (relatively) simple additional theme style that could co-exist with the existing PHP themes
In the process of adding a templating system to Wordpress you would come across many instances where you'd wish that instead of having to bother with structures like:
<?php
if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
...add posts to an array, then assign to template...
The developers had just used an object model that let you do something like:
I don't want to hijack the intent of this submission too much, but I am really curious about a question burning on my mind. I can't help but notice the sheer number of WordPress mentions on HN and other sites lately, and while a paranoid part of me wonders if this is something of a marketing blitz, I want to try to get an unbiased opinion:
Is WordPress the way to go these days for blogging?
How does it compare to Blogger? What other reasonable options are there, and how do they compare?
I don't know much about Blogger, but as it's a SAAS, how customisable is it? Can you host your own PHP pages, can you do really what you want with the theme?
I think there are differences to consider between hosted blogs and blog scripts you can actually install on your own server and customise the way you want.
#2) True, and I agree. The function naming could be improved. If you don't know what the function does, look it up in the codex or the source code. The documentation could improve, too, but one of the stated goals for their next development period is improved docs.
#3) Look at the docs. Yes, the_title() writes to the page. If you want to use the title in a variable, there is get_the_title(). There are generally other functions or parameters you can do if you want it to return the value rather than writing it.
#4) False. The comments template file is comments.php.
#5) True.