Wikify Wordpress
Monday, July 3rd, 2006Test a search for linux.
Test a search for linux.
Both gallery2 and wordpress2 have shotty support of 404s when dealing with permalinks via apache2 rewrites and aliases. This becomes a big deal when you want spiders to index your site and they disappear as soon as they realize you don’t support 404s (b/c you appear to be a spider trap). I’ve read numerous posts on the topic regarding Wordpress and they say they’ve fixed it in the latest version which I’m running. Perhaps I’ve misconfigured things, but through careful tracing of execution I’m skeptical. As a result, I’ve created a plugin that I call “Fix 404″ to deal with the WP issues. Next, I need to figure out what the problem is with G2.
Wordpress quickly became the blogging software of choice for bloggers everywhere, unseating MoveableType the previous title holder. It did this much because MT was too difficult for most to use. It’s templating system and class structure was much more elaborate and thus complicated. It didn’t help too that it was written in Perl, a programming language with very concise sytanx like $foo =~ /[Ff]uck[!].Off?/ able to scare off all but the most bold programmers. Wordpress on the other hand, can be picked up by anyone with limited programming experience in an afternoon’s time. The problem is, however, that the developers of Wordpress are unfortunately amatures themselves, with little or no concept of object oriented (”OO”) design. Wordpress 2 is technically OO, but the class structure is a joke and essentially one big container. There are a handful of mega-classes like WP and WP_Query, which drive the entire application. All do a fine line of bluring the difference between function and object oriented code. Everything else is functional and relies on a global variables such as $wp, $wpdb, and $wp_query, which if anything should be a singleton instances, local in scope. Trying to extend anything is impossible without modifying their code. Their idea of templating is doing “includes” on different php files with formatting and additional logic. There’s no seperation between the presentation layer and the data layer.
Bluring the line b/w OO and functional programming, look at WP::query_posts
function query_posts() {$this->build_query_string();
query_posts($this->query_string);}
and the global function query_posts
function &query_posts($query) {global $wp_query;
return $wp_query->query($query);}
I don’t mean to lambast the Wordpress developers personally, but this is just humorous. It doesn’t utilize any constructs of PHP designed to handle this kind of thing (E.g. statics and singletons) — and that’s only if you support their overall flow/execution. Granted static methods were introduced in PHP5, but static variables have been around since PHP4.