View Single Post
12-07-2010, 10:17 AM
#9
Hero is offline Hero
Hero's Avatar
Status: Very much the flyest.
Join date: Mar 2006
Location: Belgium
Expertise:
Software:
 
Posts: 1,171
iTrader: 1 / 100%
 

Hero is on a distinguished road

  Old

Originally Posted by Village Genius View Post
The point of a templating system is to separate the PHP code from the style code. Wordpress mashes PHP and style together to where the template can make actual database calls, which is a big no-no.
I've never tried Savant, I should have a look at it.
Though, even the MVC design pattern, used specifically for seperating buisness logic from the front-end allows some PHP within the html. Obviously no direct database acces etc, but still.
It's true that wordpress could have separated the layers a bit more, but then again, PHP was written to be used together with(in) HTML

Originally Posted by Village Genius View Post
It's not hard, its the principle I am taking about. What I am having trouble with is actually coding the back-end of wordpress. For instance, there is a function I need outside of wordpress that is in wp-includes/post.php, I need to include five other files (one that has really odd behavior) to use that function because post.php did not include them itself. Any good practice would dictate that post.php include every dependency it had, common sense would dictate that it at least say what it requires.
You should have a look at their plugin api. When you make a plugin you don't need to include anything and you can make use of all the functions. (You'll still need to create objects instances though)

Reply With Quote