Live data from Hacker News

Why WordPress theming sucks

yop.la

21–28 of 28 posts

Re: Why WordPress theming sucks

#21
post #8

Earlier quoted context omitted.

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: ", " ", true ); if(strlen($title > 80) { echo(substr($title, 0,80)."..."); } ?> Would be this if Wordpress used Sm…

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.

Re: Why WordPress theming sucks

#22
post #20
post #17

Earlier quoted context omitted.

you're correct. the differences between wordpress and blogger are vast. you've mentioned the big ones already. blogger is... - easy to setup - hard to customize - limited in terms of features / plugins (if any) - hosted as a service

How about vs posterous? (Sorry, I should have included it in my first post, but I forgot the name.)

never used posterous, but it looks more similar to blogger than wordpress. well suited for churning out a simple blog.

Re: Why WordPress theming sucks

#23
post #18

Earlier quoted context omitted.

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.

If it worked like that, WordPress would already be OOPed and MVCed isn't it?

i'm not sure i follow. are you suggesting that the wordpress development team discourages participation?

Re: Why WordPress theming sucks

#24
post #18

Earlier quoted context omitted.

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.

If it worked like that, WordPress would already be OOPed and MVCed isn't it?

Nope, I don't follow up the WordPress development at all so I can't judge

However, I can't believe none of the WordPress developers has never suggested to rewrite it using nowadays technologies?

Re: Why WordPress theming sucks

#25
post #8

Earlier quoted context omitted.

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: ", " ", true ); if(strlen($title > 80) { echo(substr($title, 0,80)."..."); } ?> Would be this if Wordpress used Sm…

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:

  
      ...add posts to an array, then assign to template...
The developers had just used an object model that let you do something like:

  $smarty->assign('POSTS',Post::getRecent(10));
And then access them in the template like this:

  {{foreach from=$POSTS item=post name=posts}}
    {{$post->title|truncate}}
    

{{$post->content}}

{{$post->url->permalink}} {{/foreach}}

Re: Why WordPress theming sucks

#26
post #2

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!

If your interested in a rewrite of WordPress then I'm sure the Habari guys would be interested in your help.

They started a while back on doing pretty much just that.

Re: Why WordPress theming sucks

#27
post #8

Earlier quoted context omitted.

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: ", " ", true ); if(strlen($title > 80) { echo(substr($title, 0,80)."..."); } ?> Would be this if Wordpress used Sm…

We don't use Smarty for a number of reasons.

Anyway PHP is itself designed as a Templating language and works very well.

Adding Smarty or any other templating language into the mix just means that users and developers have to learn both PHP and the templating language.

Re: Why WordPress theming sucks

#28
post #11
post #4

Earlier quoted context omitted.

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. http://wordpress.org/news/2010/07/eol-for-php4-and-mysql4/ 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 i…

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 WordPre…

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!

Post reply on HN