[wp-hackers] WP & MVC

Martin Sturm msturm10 at gmail.com
Sat Feb 24 11:30:20 GMT 2007


2007/2/24, Matt Mullenweg <m at mullenweg.com>:
> Sure, anyone is welcome to, particularly if they think it translates
> into end-user benefits.
>

I think the idea of a class-based implementation of WordPress is
pretty nice, because it could lead to a much cleaner code base and,
that would translate in an easier to use API. However, the problems
you will encounter are obvious. Plugins will break (that can be solved
by creating some kind of backward compatibility layer, but that is
ugly and making things only complex).
However, one can consider refactoring the source over time, and
transforming it gradually into a class-based, object oriented design.

I'm not sure if a MVC-approach is the way to go. I think PHP isn't
very suitable for this approach (at least not without a external
framework). PHP isn't also a OO-language, which can be an argument
against a full OO-based implementation. You still keep the native PHP
functions, which are not object oriented.

Maybe we should switch to another, OO language? =)

--
Martin


More information about the wp-hackers mailing list