[wp-hackers] Google Summer of Code 2008
wordpress at santosj.name
Wed Feb 27 00:12:45 GMT 2008
As flaming you would not further your enjoyment nor mine, I will refrain
from doing so. However, as a PHP developer, I /do/ find your ill informed
suggestion insulting. Let me clarify my position and allow you to further
clarify your position.
*Separation of Business Logic from Presentation*
You are confusing procedural code from ad hoc code. The debate is rather
that you should use procedural code to abstraction from combining ad hoc
code in the template.
See Coppermine for an example of ad hoc code and compare with WordPress.
Then get back to me. After seeing Coppermine, you'll realize that your
statement doesn't stand.
The rest of your statement goes into theming and I will answer it in the
*PHP mixed with HTML is a Bad Thing (TM)*
PHP is a templating language. You may argue this point, futilely, but let
me explain and use Smarty for the example.
What is the difference from this PHP code:
<?php if( expression ) : ?>
<?php endif; ?>
and this Smarty code:
Aside from speed differences and disk caching to offset speed differences,
there is none. There is no difference to a designer from either one. The
only difference is that if you offer PHP, then the designer won't need to
relearn the separators from templating language to templating language.
*PHP mixed with HTML*
PHP mixed with HTML is only a bad thing, if you come from another language
like Java or Python (which both are awesome). PHP was made to work with
HTML and to come back and say that you shouldn't ignores the previous
If you study Coppermine, you'll find the original argument which your
statement derives from has its history in ad hoc PHP development where
developers weren't using either procedural or object oriented development
to create a separation of business logic and presentation.
I'm not a MVC zealot, therefore, if you take the abstraction of MVC, then
WordPress already does it. I've said it before and I'm not going to repeat
myself. If you want me to further substantiate my argument, then you'll
have to catch me on a good day.
Oh wait, I left a comment on the Popular Ideas forum about converting
WordPress to MVC.
Basically, you don't have to use OOP to achieve MVC, you can do it the way
WordPress does it, or you can do it the way Zend Framework, or whatever
framework you want.
MVC is only a paradigm, a pattern, it is not so concrete as you need to
Please accept my apologies for using "You" as I mean, "I think what you
are saying is..." but I'm not going to go back and edit my email.
Please. I suggest you do further research on the matter and perhaps search
for, "PHP is a template language" on Google as these ideas expressed in
this email are not my own but borrowed from far more intelligent people
than I. Furthermore, they can better explain the ideas expressed in this
email better than I, but I'll happily provide an interpreted view of their
ideas for you.
> As far as I can tell from WP's code, what it *really* needs right now
> for starters is to separate code from contents from presentation.
> PHP mixed with HTML is a Bad Thing (TM).
> Smarty anyone ?
> No offense intended, just a suggestion that seems clear enough to me.
> Warm Regards,
> Mário Gamito
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
http://www.santosj.name - Personal Blog
http://funcdoc.wordpress.com - WordPress Function Documentation Blog
More information about the wp-hackers