VUE.JS is it Necessary?

Not long ago began to study vue.js and kind of like it but have questions:

1. It is better when the server(in php) compiles the html and sends it to the client or when the server(php) sends the array of data and the js framework it displays the menu. Well, not only menu. The main criteria is the speed of loading of website and reduce server load.

2. If there any point to do online store using on the client vue.js and server cs-card ?

PY.Sy. Immediately apologize if the questions are stupid)
June 14th 19 at 18:58
4 answers
June 14th 19 at 19:00
Solution
The question "Which is better?", "Does it make sense?" can be answered only in the context and it is subjective. Store lack of context, a shop store strife.

Unequivocally for SPA applications in the future. At the SPA you can also give html - SSR.
- SPA to do longer, maybe in fact you are doing 2 applications (client and server).
- SPA at the server load and the waiting time page most pay for the download of the application. Further conclusions can be made depending on the specific situation.
Well, the answer is subjective - claude.Tromp commented on June 14th 19 at 19:03
Several times I read on habré some strange articles about react which used server-side rendering. XS what's funny... - Adrian.Bogisich commented on June 14th 19 at 19:06
One of the main advantages is the normal indexing by search engines. - Davonte.Renner commented on June 14th 19 at 19:09
Fast download and html for those with script carved in the first series download - nova_Wehn commented on June 14th 19 at 19:12
June 14th 19 at 19:02
While PS (Search engines) do not learn normally to index sites with templating on the client, future SPA is not as rosy as many would like, gg)

Because the client does not need a fucking shop that is not indexed the word "all")
You probably have not heard about Server Side Rendering in the SPA. - claude.Tromp commented on June 14th 19 at 19:05
Apparently not heard, Yes. But the principle on which bots are given a page from the server, but the data sets, which later (already on the client) "compiles" hypertext markup language?) - Adrian.Bogisich commented on June 14th 19 at 19:08
When the request is given to the compiled html page with the SPA application. Those bots always given to the compiled page. And the use of SPA users, the app makes requests in response to the actions of the user already to the API server. - Davonte.Renner commented on June 14th 19 at 19:11
API example JSON information? I just say not yet very familiar with that so if not fighting) - nova_Wehn commented on June 14th 19 at 19:14
For example Yes.
https://ssr.vuejs.org/ru/ - Davonte.Renner commented on June 14th 19 at 19:17
Oh you understand me) so my main question is which option will be less loaded server, when the server compiles all html and is sent to the client or when sent to the SPA and on the client displays html. (It seems odd garbage written ) - Rowena.Pacocha commented on June 14th 19 at 19:20
and for referring thank you for reading - Davonte.Renner commented on June 14th 19 at 19:23
If SPA is without the SSR, then in most cases it will be a lower load on the server. The server will only need static files and the example JSON from your API. - claude.Tromp commented on June 14th 19 at 19:26
Here it wanted to hear, will go on to study, thank you for the info.) - Davonte.Renner commented on June 14th 19 at 19:29
Even without the SSR index
30% slower, but indexes - claude.Tromp commented on June 14th 19 at 19:32
,
If SPA is without the SSR, then in most cases it will be a lower load on the server.

Why? SSR is only used to return the page to the direct approach. Ie, in most cases, this will be only the first entry. For the rest of the requests from the client is sent only the data.
If we assume that rendering a single page on the user load of the server, Yes. But it's hardly worth considering. So with SR and without it, by and large without a difference in terms of load. - claude.Tromp commented on June 14th 19 at 19:35
Well for example if the specificity is such that the users often visit and it is on the initial page.
But in General, I agree. Just there is an exceptional situation. - Davonte.Renner commented on June 14th 19 at 19:38
June 14th 19 at 19:04
As a unified approach to the design of SPA (search engines and browsers), add information about your mini-framework includeHTMLwhich allows just:
1. To generate a template that can start and run entirely locally (no server!), dynamically loading the desired page block.
2. It's very easy to create a SPA containing different information blocks that can be separated to give from the server, and for PS(search engines) - stitch in a single HTML page on the server side.
3. Quickly understand how to use.

In terms of fast template engine for JSON on the client side - I can advise REX Tiny Templater
June 14th 19 at 19:06
1. If the priority is the website loading speed - better generation in php. If reducing the load on the server - mapping to js. But the difference is there and there is so small that it cannot be considered seriously.

2. cs-card is ready to shop ? To do so is likely impossible, there is most likely your front, not vue.js.

Find more questions by tags Vue.js