In web development, the dividing line between the front and back ends always seems to be controversial. Search on the Internet what is the front and back end separation, but also say what all have, hype, description is not clear. From the beginning there was no concept of front and back end at all, to the later entanglement. Lebyte Z explains it to you

The traditional separation method

When I think about the front end and the back end, basically the first difference that comes up is that the back end deals with the database and the server, and the front end deals with the browser. There seems to be no problem, everyone thinks so. There’s nothing wrong with that, of course; we’ve always thought of it as a browser demarcation that separates the two parts of the code. But the original purpose of the front and back end separation was to separate the responsibilities of the front and back end developers and solve the problem of development patterns. But it seems that their responsibilities were not always clear, and are not even now. Although the front end is dealing with the browser, the final page the browser gets is a temporary static page generated by the server from the template. So, actually, the back end is involved, because it has to deal with templates. There are, of course, two traditional modes of development collaboration:

One is that the front end writes a static page first, then lets the back end set the template. Static pages can be developed locally, with no business logic to worry about and just a View to implement. The disadvantage is that there is also a need for back-end templates, which need to be browsed at the back end to avoid errors.

Another type of collaboration is where the front end writes directly to the template. The problem with this is that the front end is so dependent on the back end that it can’t do much if the back end is not written.

Obviously there seem to be a lot of problems with both approaches, but at least that’s the model most companies have followed so far. They differentiate the front and back end development from the physical layer, while diluting the logic of the front end. Since all the front-end does is implement a static version of a page, most companies give front-end engineers some work to do. If you look at what companies are looking for in front end engineers these days, they’re looking for additional design responsibilities in addition to basic page creation skills. For example, at least one back-end programming language, NodeJs or PHP or Java.

At this point we thought we had separated the front and back ends, but the front and back engineers definitely had a hard time with the awkward template issue. Not many people write HTML directly in JSP or PHP these days. Front and rear end separation is normalizing. So how to separate, who takes more, who takes less, depending on the technology level of each company. Front-end development engineer cattle, think of the front-end MVC, MVVM, straight out. Back end cow, just think, you give this prototype to back end, nothing else.

Traditional development methods

The PHP code before was written in HTML code, there was no pure PHP file and HTML file, there was no separation of the front and back ends, which basically means PHP and HTML, I have you, I have you.

However, there were a lot of problems in the later development. Front-end engineers (HTML, CSS, JS) may not understand PHP code, and PHP engineers are not familiar with CSS, so people came up with a way to separate the code! This allows everyone to be better at what they do, which costs some efficiency, but is friendly to the developer in a way.

The separation of the front and back ends is not as complicated as the Internet suggests.

1. First of all, we should know that all programs are based on data. Without data, programs have no practical significance.

2. Front and back end separation is the separation of data operation and display. Front-end focus on data display, through text, pictures or ICONS and other ways to make the data visually displayed. The back end focuses on data manipulation. The front end sends the data to the back end, which modifies it.

3. The backend usually uses Java, c# and other languages. The current node belongs to JavaScript and can also carry out back-end operations. Back-end to the database link, and the operation of the data.

4. The back-end provides interfaces for the front-end to invoke data on the back-end.

The basic principle is that, maybe the language is not accurate, the idea is fine.

So the core of developing a website now is basically:

HTML + CSS: Page display

Javascript + Ajax (this is part of the browser and can be called through javascript) : page interaction, logical processing

Common development framework choices:

Simple website: jquery + Bootstrap

Background management system: AngularJS + jquery + Bootstrap + Webpack

Complex products: React + Redux + webpack

From: Lebyte