A Php userland Dom Contest
posted: April 6th, 2005 · by: Sven
Now that we’ve seen that php5’s dom extension really lacks support for php’s own un/serialize()ation let’s have a quick look at some php implementations of XML Dom. Possibly, we can speed up our templating experiment’s performance by using a serialize()able XML implementation, so that we’re able to cache our components and ressurect them from an already ready-made, fully usable state?
We’ve done an internal, purely subjective mini-con/test with some php Dom implementations that were spit out by Google. It has been a veeery superficial search (so for sure there are more implementations out there) and it has been an even more superficial test setup (so for sure there are some tweaks to tune up performance for one or another implementation).
Probably, that’s interesting. So here are the results.
Read the rest of this entryWhy php5 DomDocuments need to be un/serialize()able
posted: March 2nd, 2005 · by: Sven
In our last post about “Template playing with php5’s Dom” we shared some thoughts about how to build a basic templating engine based on php5’s build-in dom extension. I have been playing around with that and have to say I found php5 dom’s lack of being un/serialize()able really annoying.
Why would anyone want to php un/serialize() a php Dom tree? A dom can be “serialized” to Xml, that’s human readable and non-proprietary! Creating a DomDocument and getting some Xml parsed is fast.
So, what the *%#~ is this about?
Ok, let’s take a minute to investigate that. Here’s an answer.
Read the rest of this entryTemplate playing with php5's Dom
posted: January 15th, 2005 · by: Sven
Standards, standards, standards … just had a look into Jeffrey Zeldman’s “Designing With Web Standards” (again). He’s nearly religious, but absolutely convincing and insightful about why we all should use web standards. You have to read it.
Ever thought about the role that standards play in the php world? To me it seems obvious that the php world definitely lacks a templating standard.
There are countless php template engines out there, each one introducing some own nifty template language, template tag syntax or something equivalent. What would php’s template world look like, if all this programmer’s manpower was concentrated by the presence of a standard (or at least: some strong recommendations)?
But wait. php5 comes along with a fine, build-in XML DOM extension. Isn’t that a standard? Indeed, it is.
Let’s have a look at how we could get started with a templating system bootstrap using that stuff.
Read the rest of this entry