V
V
Viktor Yanyshev2017-02-16 18:58:49
Web development
Viktor Yanyshev, 2017-02-16 18:58:49

Principle of front & backend relationship?

Now, right now, the stones will fly, like Google has already written a lot. But here it is impossible for Google to clearly formulate the request. Of course I welcome the link :)
I want to understand in my presentation how the work of the frontend with the backend looks like and vice versa.
For example, if the frontend is developed on some framework with a virtual dom, let it be vuejs, write styles in sass, all this is collected and spit out through a collector, for example gulp. And all templates (views) are stored in html. Since the house is built by vuejs, the role of the backend is that when (probably before rendering the house) the page is loaded from the backend, the initial data (without extra code, only data) should come to data via xhr. And for all other cases, data manipulation is reactive binding (Note Vuejs and something else) along with xhr.
Am I correct in presenting the picture of the work, and what is the role of returning the back of an already generated dom with the participation of js frameworks with a virtual dom?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sim3x, 2017-02-16
@sim3x

Most often, this is how
5 bodies saw the back, the 5th front
They completely miss the deadlines One signor comes
and rewrites everything from 0 in two days . Since everything is a node there, then front-end workers do this. Backend is left to do api for the whole economy. If backenders initially ruled, then reacts and angulars will occupy the jQ niche In each (long) project, everything happens in its own way

every unhappy family is unhappy in its own way

A
Andrew, 2017-02-23
@iCoderXXI

In short, these days, in fact, backing is needed for two things - to give statics for SEO, and to give data via API (REST, GraphQL, and others). It can send both via AJAX (fetch, xhr, axios, ...) and via web sockets.
The front, in turn, if SEO is needed, is isomorphically rendered by the back (webpack?), Then it is given and connected on the client. If SEO is not needed (closed SPA), then the minimum boilerplate is given and the entire UI is dynamically generated, for example, React.
The development is all convenient, modular, going to webpack in a bundle.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question