Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Server-Side DOM on Cached Templates?
- Michael Ruebner
November 22, 2005, 4:19 pm
rate this thread
The idea is to generate server-side cached copies of default-value pages
and manipulate them via DOM for individual user requests. Kind of a
_before_ sending the page to the client.
I have looked at PHP's XML and DOM features, and it looks as if those will
allow me to manipulate XML trees before generating client-specific
output. Apart from issues that might arise from a switch to an entirely
XML-based setup (is Xforms really there yet? SQL to XML? XSLT?), I would
like to avoid the overhead of generating pages anew every time some minor
change in content or layout occurs.
Does this make sense? If yes, is there anything out there that uses
this approach? How about potential problems and trade-offs?
I'm not married to PHP, so addtional pointers and references to other
languages are most welcome.
Re: Server-Side DOM on Cached Templates?
Well, that's why I want to handle this server-side. I already use
client's side; this is actually where my initial idea came from.
Right now, I am dealing with a CMS that requires a lot of data structure
mangling and chopping. Form control 'label', 'class', and 'value'
attributes need to be changed according to view, involving a lot of
processing overhead for even minor changes. It would be nice to have a
complete default (document) tree somewhere in memory that could be
manipulated using some kind of DOM API.
Apparently, there are already a couple of tools out there that can do the
job in PHP (XML and DOM functions, Sablotron for XSLT processing).
However, I cannot seem to find a comprehensive development framework and,
most important, feedback from the trenches...