Keeping Things Simple

I’ve been doing a little work with PHP recently. Nothing earth-shattering, just dipping in to build a custom theme for Wordpress. Anyway, the reason I mention it is just how visible all of the markup is. I’ve always been totally sold the idea that seperating behaviour and code from the markup (from a server side coding perspective) is evolution, and that script tags mixed in with markup is mucky and hard to maintain.

The flip side that nobody talks about is how you can clearly see exactly what will be sent to the client. There is no layer of abstraction – you can directly see the markup when you’re writing code. I know there are many benefits to the server control model that ASP.NET has adopted, but I sometimes wonder if these benefits outweight the very clear advantage of being able to see exactly what is happening. I definately think this is reflected in the typical quality of markup on a PHP site compared with an ASP.NET site.

Any thoughts?

Posted:

January 17, 2007 @ 13:52

Categories:

Development

Tags:

, ,

Comments:

4 comments so far

Comments RSS feed for comments on this post.

  1. In my current CMS of choice (Expression Engine), it’s not the html that’s embedded into the php, but the other way around.

    You start off with the html, but some sections have embedded CMS commands, and, optionally, php.

    The nice thing is that you get to hide the implementation of often very rich CMS functionality (or custom stuff you write yourself), but you’re always working with the html page. You never lose sight of the important stuff – what’s going to hit the client.

    I’d agree with you, the tag-soup that’s produced by the average asp.net developer is partly a symptom of the development environment shielding the developer from stuff they should think about.

    The model used by EE has the added benefit that you can create php-based custom modules and extensions, but you can make the CMS itself refuse to parse php, so you can restrict more junior developers from doing potentially unsecure things, and just get them to focus on building sites.

    Jake.

    Comment by Jake, February 5, 2007 @ 4:23 pm

  2. Sorry – tag soup is the common expression, but with asp.net, it’s more usually attribute-soup!

    Comment by Jake, February 5, 2007 @ 4:24 pm

  3. The basic model sounds quite similar to wordpress. Curious to know how they differ – should probably download and have a play.

    Comment by Oli, February 7, 2007 @ 8:13 pm

  4. It’s based heavily on wordpress I think, so you’d probably find them quite similar.

    Comment by Jake, February 14, 2007 @ 12:07 pm

Leave a comment