You are here: Performance of server-side DOM? « PHP « IT news, forums, messages
Performance of server-side DOM?

Posted by Jeff Schmidt on 10/11/05 07:12

Hello,
I've been toying around, lately, with using PHP's DOM API
(specifically, domxml because I'm still using PHP4) for doing some of my
server side dynamic pages, instead of the 'classic' method of outputting
a serial stream of html dynamically generated with, e.g. php print()
statements. The reason this is attractive to me is that,
programmatically, it makes it easier to seperate logic from
presentation. I realize that PHP has available, through PEAR and
otherwise, various templating systems that attempt to address that need,
but I've found some of the templating systems, at least, to be somewhat
confusing, whereas the DOM seems pretty straightforward to me.

But, I've wondered about the performance implications of my would-be
method. Namely, I would normally start by reading in an html 'template'
file with the function domxml_open_file, modify it to my hearts content
with DOM methods, and then use DomDocument->html_dump_mem() to
re-serialize the html and send it to the web-browser.

Is this horribly inefficient, or just a small, reasonable overhead?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация