D
D
dissdoc2014-11-06 00:05:58
Node.js
dissdoc, 2014-11-06 00:05:58

NodeJS. Where to use View?

Good evening friends. I have a question for you.
Now I use BackboneJS on the client. I want to switch to NodeJS. And here the next question arises: to give JSON from NodeJS or to completely generate View on the server side using Jade?
1. Will client-side performance drop?
2. Is it possible to optimize (pre-compile View)?
3. Maybe just use Backbone on the server side (as an option)? But again, back to the first point.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2014-11-06
Protko @Fesor

Maybe it depends on the task? If you write a SPA or an apish, then write a REST API. If you are making a site that search engines should index, then you can already think.

E
Elizaveta Borisova, 2014-11-06
@Elizaveta

The question is not very clear. Now there is a client on Backbone, and it absolutely also receives either rendered templates or JSON from the server side. Now does not arrange something on the client?
Port the backend in the same way to Node.
It is possible to pre-compile the view in some cases to avoid the effect of a twitching screen (maybe it does not threaten you).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question