Saturday 25 March 2017

(coming from php to node) building a forum website in node. on initial load am I best using a templating system such as jade, or inject json data into static(ish) html file?

I'm sorry that I can't word this properly. English isn't my native language.but let's assume I were to recreate reddit.com front page. would it be best if I process the home page with a template engine, then serve that, or should I serve a "barebone" static HTML template and let the client-side render the json data I include in the static template?templating just feels unnecessarily complicated to me. I don't want to learn a whole new way to write HTML... I don't need an engine that converts " html " to ""... I just want to be able to fill the template with data... but there doesn't seem to be a way to do it like php does it... e.g. '; } ?>I feel like the "right" way to do it is to serve a html file statically, and load the data via json/javascript. render at client side, you know?I just want the fastest page load time and response time without having to spend $4k/month on servers just to convert whitespace to brackets.unrelated: absolutely love node. but I'm really getting annoyed with how many options you have for different things. all the tutorials I've read use express.js for example, but I can think of at least 3 popular packages that do similar stuff and might even be better.

Submitted March 25, 2017 at 01:20AM by mysqlnoob4

No comments:

Post a Comment