After separation of the front and rear end, front-end engineers need to do.

  The front and rear end of the separation concept of what is it?

  Front and rear ends is not merely a separate development model, but an architectural pattern (front and rear end separation architecture). Do not think that only when the code line and the front and rear separate front and rear end is separated from the need to distinguish between the front and rear end of the project. Front-end and back-end project is a project of two projects, on two different servers, the need to deploy a separate, two different projects, two different code bases, different developers. Front and rear end engineers need the agreement interactive interface to achieve parallel development, the need for independent development after the end of the deployment, the front end to the back-end by calling http ajax request to call a restful api. The front page only need to focus on the style and analysis & rendering dynamic data, and focus on the specific back-end business logic.

  The rear end of the previous era separation of the front end of the staff responsible for what work?

1, to get the UI design height reduction with HTML

2, the rear end of the agreed parameters & Data Interface &

3, the integrated front and rear ends, the rear end request API interface provided by the data acquisition

4, adjust the front page

  These are my work in front-end process, the responsible thing. One sentence to sum up the work of front-end is: the pursuit of the front-end page performance, speed and smooth, compatibility, user experience and so on.

  Since it has already done before and after the end of the separation, then the need for front-end engineers to focus on html5, css3, jquery, angularjs, bootstrap, reactjs, vuejs, webpack, less / sass, gulp, nodejs, Google V8 engine, javascript multithreading, modular, oriented programming, design patterns, browser compatibility, performance optimization and the like.

  Before and after separation benefits

1, the front and rear ends may be true decoupling, front-end server to use nginx. Front-end / WEB server put the css, js, images, and so on a series of static resources (You can even css, js, images and other resources into a specific file server, such as Ali cloud oss, and use the cdn acceleration), the front end server responsible for controlling page references & Jump & routing, call the back end of the front page of asynchronous interfaces, backend / server application using the tomcat (tomcat to imagine a data provider) to speed up the overall response rate. (We should use some of the front-end engineering framework such as nodejs, react, router, react, redux, webpack)

2, found that bug, who can quickly locate the problem will not pass the buck to each other phenomenon. Page logic, jump error, browser compatibility issues, script errors, page styles and so on, all to be responsible for the front-end engineers. Interface data error, the data is not submitted successfully, the response timeout problems all solved by the backend engineer. The two sides without disturbing each other, love each other front and back of the family.

3. In a large concurrent case, I can scale horizontally while the front and rear end servers, such as Taobao will need a Home 2000 + front-end server clusters to do withstood daily how many billions of daily + pv. (Go to Ali's technology summit, they said they listen to the web container are to write their own, even if he single instance of anti-concurrent http 100,000, 2,000 concurrent http 200 million, and they also can be unlimited expansion based on foreknowledge peak, terrible, it is a home ...)

4, concurrent reduction backend server / load pressure. In addition to all the other interfaces http requests all transferred to the front nginx, request interface calls tomcat, reference nginx reverse proxy tomcat. And in addition to the first request for a page, the browser will call a large number of local cache.

5, even if the back-end service is temporarily out or goes down, the front page will be a normal visit, but the data do not brush it out.

6, maybe you need a micro-channel light-related applications, so you can share the interface, if there are app-related services, as long as through some code refactoring, you can also reuse a lot of interfaces, enhance efficiency. (Multiport applications)

7, something more is not afraid of the page display, because it is loaded asynchronously.

8, nginx supports hot deployment page, without restarting the server, front-end upgrades and more seamless.

9, increasing the code readability & maintainability (front and rear ends coupled together code read quite strenuous).

10, to enhance development efficiency, since the front and rear ends can be developed in parallel, rather than the previous intensity dependent.

11, deployed in nginx certificate, extranet access using https, and only open ports 80 and 443, all other ports closed (to prevent hackers from port scanning), intranet use http, performance and security are guaranteed.

12, the distal end is a large number of component code reuse, component, improve development efficiency, to out!

Guess you like

Origin blog.csdn.net/qq_40128701/article/details/91360639