How does node.js fare against other frameworks for predominantly rendering large templates [closed]

StackOverflow https://stackoverflow.com/questions/20921687

Question

I am about to build an app that will predominantly render large numbers of table entries on an html page server side, i.e., I will be looping over a results object in my template and just wrap each returned row/listItem in some html and then return the document to the client asynchronously; client side it will there will be lots of trivial (in terms of processing) user interaction. I anticipate that the entries that I will loop over will be in the thousands so I guess template engine is my main feature requirement in a web framework.

My app will--for the most part--be a single page application with views changing asynchronously rather than reloading any pages.

I may split up the loading/rendering and returning of documents into blocks, increasing the number of asynchronous calls further.

I come from a python/flask (jinja2) and java servlet/playframework (japid) background and was just wondering if this project seemed like a decent fit for a node.js project (I have no node experience, have only read about it) or if I should just stick to my familiar tech stacks. I am just making sure I'm not forcing node on something that I shouldn't be.

Était-ce utile?

La solution

A key benefit of Node is its streams architecture and patterns. Similar to Unix pipelines, Node streams allow processing lots of data without having to buffer it all into memory at once.

Node.js is well-suited for streaming out large templates which you would rather not buffer into memory all at once (for example, if they are very large, or if you have many connections, so you want a low memory footprint for each connection).

I am not familiar with these, but a quick search for streaming template engines reveals:

Whether it is worthwhile depends on your application.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top