Wednesday 25 November 2015

When working on the server side of a website with node.js do you actually work with a DOM or is it just more of the same php-style templating: find and replace strings, concatenate strings, echo variables in the midst of html, etc?

In the past I've tried using PHP's DOM features to build layouts instead of the typical soup of php+html or find/replace placeholders in an html template file. But it always seemed to take longer and I'd read many posts saying php's DOM stuff is a memory hog.My use case is not a massive complex application that someone is paying money for. I'm just interested in using node to do quick and easy and simple things that I would normally use php for. And since I use php to generate web pages. I think I'd prefer to just use JS with node and utilize the DOM instead of a bunch of string manipulation, if it is actually wise to do so with node.

Submitted November 25, 2015 at 06:20PM by thinsoldier

No comments:

Post a Comment