Home Web Front-end Front-end Q&A What is front-end and back-end separation?

What is front-end and back-end separation?

Aug 25, 2020 am 11:05 AM
Separation of front and back ends

The separation of front-end and back-end is to separate data operation and display. The front-end focuses on data display, displaying the data intuitively through text, pictures, or icons; the back-end focuses on data manipulation. The front end sends data to the back end, and the back end modifies the data.

What is front-end and back-end separation?

[Related learning recommendations: Front-end video tutorial]

In the process of website development, before and after The dividing line between the two ends seems to be a matter of debate. Searching the Internet for what front-end and back-end separation is, there is a lot of information about it, and the description is unclear. From the beginning, there was no concept of front-end and back-end at all, and then it became entangled.

Traditional separation method

When I mention front-end and back-end in my mind, basically the first difference that appears is: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. Of course, there is nothing wrong with this. We have always thought that we only use the browser as a boundary to separate these two parts of code. But the original intention of front-end and back-end separation is to separate the responsibilities of front-end and front-end developers and solve the problem of development model at the same time. But it seems that their responsibilities were not clear before or even now. Although the front end deals with the browser, the page the browser finally gets is just a temporary static page generated by the server through a template. So, the backend is actually involved because it has to deal with templates. Of course, there are generally two traditional development collaboration models:

One is that the front end writes a static page first, and after writing it, let the back end set the template. Static pages can be developed locally, and there is no need to consider business logic. You only need to implement View. The disadvantage is that you also need a back-end template, and these front-end codes need to be browsed by the back-end to avoid errors.

Another collaboration mode is that the front-end directly writes the template. The problem with this is that the front-end writing process relies heavily on the back-end environment. If the back-end is not finished writing In this case, the front end is almost impossible to work.

Obviously there seem to be many problems with both methods, but at least this is the model adopted by most companies so far. They distinguish the development of front-end and front-end from the physical layer, while downplaying the logical color of the front-end. Since what the front-end does is to implement a static version of a page, most companies find some work for their front-end engineers. If you look at the current requirements for front-end engineers when companies are recruiting, in addition to basic page production skills, they also have additional design responsibilities. For example, know at least one back-end programming language NodeJs or PHP or Java.

At this point, we originally thought we had separated the front-end and back-end, but when it comes to the embarrassing issue of templates, the front-end and back-end engineers have definitely suffered a lot. At present, writing HTML directly in jsp or php should be rare. The separation of front and rear ends is on track. So how to separate, who occupies more and who occupies less, depends on the technical level of each company. When a front-end development engineer is good, he just thinks about front-end mvc and mvvm. If the backend is awesome, I just think, you give this prototype to the backend and don’t worry about the rest.

Traditional development method

The previous PHP code was written in the HTML code. There are no pure PHP files and HTML files. Here is the difference between the front and back ends. Separation, roughly means php and html, you are in me, and I am in you.

However, we encountered many problems during development. Front-end (html, css, js) engineers PHP code may not be readable, and PHP engineers are not very familiar with CSS content, so later people came up with a way to separate the code! This allows everyone to perform better in their respective fields, although it consumes a certain amount of time. Efficient, but friendly to developers from a certain perspective.

The separation of front-end and back-end is not as complicated as said on the Internet.

1.First of all, you must know that all programs are based on data. A program without data has no practical meaning. The essence of a program is the addition, deletion, modification, and query of the program.

2.Separation of front-end and back-end is to separate data operation and display. The front-end focuses on data display, displaying the data intuitively through text, pictures or icons. The backend focuses on data operations. The front end sends data to the back end, and the back end modifies the data.

3.The back-end generally uses java, c# and other languages. The current node belongs to JavaScript and can also perform back-end operations. There is no point in cracking the language here. The backend is used to connect to the database and operate on the data.

4.The backend provides an interface for the frontend to call to trigger the backend's operation on data.

The basic principle is this. The language may be inaccurate, but the thinking is correct.

So the core of website development is basically:

html css: page display

javascript ajax (this is part of the browser, you can Called through javascript): page interaction, logic processing

Usual development framework selection:

Simple website: jquery bootstrap

Backend management system: angularjs jquery bootstrap webpack

Complex products: react redux webpack

The above is the detailed content of What is front-end and back-end separation?. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Guide to React front-end and back-end separation: How to achieve decoupling and independent deployment of front-end and back-end Guide to React front-end and back-end separation: How to achieve decoupling and independent deployment of front-end and back-end Sep 28, 2023 am 10:48 AM

React front-end and back-end separation guide: How to achieve front-end and back-end decoupling and independent deployment, specific code examples are required In today's web development environment, front-end and back-end separation has become a trend. By separating front-end and back-end code, development work can be made more flexible, efficient, and facilitate team collaboration. This article will introduce how to use React to achieve front-end and back-end separation, thereby achieving the goals of decoupling and independent deployment. First, we need to understand what front-end and back-end separation is. In the traditional web development model, the front-end and back-end are coupled

How to use Java to handle form data interaction with front-end and back-end separation? How to use Java to handle form data interaction with front-end and back-end separation? Aug 10, 2023 pm 01:01 PM

How to use Java to handle form data interaction with front-end and back-end separation? With the popularity of front-end and back-end separation architecture, it has become a common way for the front-end to send form data to the back-end through AJAX requests. In this article, we will learn how to use Java to handle form data interaction with front-end and back-end separation. We will use SpringBoot as the backend framework and demonstrate the entire process through a simple example. First, we need to create a SpringBoot project and add related dependencies. in p

Quickly understand the essence of front-end and back-end separation (with architecture diagram) Quickly understand the essence of front-end and back-end separation (with architecture diagram) Aug 05, 2022 pm 04:37 PM

The separation of front-end and back-end is an upgrade that must be carried out in project management when software technology and business develop to a certain extent. It is a necessity and not an accident! To put it bluntly, it is an adjustment to the company's departmental structure.

How to use Vue to achieve front-end and back-end separation and interface docking? How to use Vue to achieve front-end and back-end separation and interface docking? Jun 27, 2023 am 10:09 AM

With the continuous development of front-end technology, the architectural model of separation of front-end and back-end is becoming more and more popular. The advantages of front-end and back-end separation are obvious. The front-end and back-end can be developed independently, each with its own technology selection and development rhythm, which can improve the maintainability and scalability of the system. As a popular front-end framework, Vue can bring a better user experience. This article will introduce in detail how to use Vue to implement the architectural pattern of front-end and back-end separation, and demonstrate the interface docking method. 1. Back-end implementation For the back-end implementation, we can choose

The combination of Vue.js and Java language enables separate development of front-end and back-end The combination of Vue.js and Java language enables separate development of front-end and back-end Jul 29, 2023 pm 03:25 PM

Combination of Vue.js and Java language: realize front-end and back-end separation development. The front-end framework Vue.js and the back-end language Java are both very popular and widely used technologies at present. They each have strong capabilities in front-end and back-end development. . Combining Vue.js with the Java language can achieve separate development of front-end and back-end, making project development more efficient and maintainable. This article will introduce how to use Vue.js and Java language for front-end and back-end separation development, and give corresponding code examples. CreateV

How to achieve front-end and back-end separation in Nginx reverse generation database How to achieve front-end and back-end separation in Nginx reverse generation database Jun 10, 2023 pm 12:01 PM

With the rapid development of Internet technology, the idea of ​​front-end and back-end separation is increasingly widely used by developers. The separation of front-end and back-end can separate and parallel the development of front-end and back-end, improve development efficiency, reduce development complexity, and improve system performance and scalability. In an architecture where the front and back ends are separated, the front end requests data from the back end through the interface, and the back end processes the requested data and then returns it to the front end. In this process, Nginx can play a role in transmitting and forwarding data through reverse proxy technology. This article explains how to

PHP project development practice with front-end and back-end separation PHP project development practice with front-end and back-end separation Jun 27, 2023 am 08:15 AM

With the rapid development of the Internet and the increasing number of hundreds of millions of users, the demand for high-quality, high-performance Web applications is also increasing. In this context, the PHP project development model with front-end and back-end separation is increasingly favored by people. This article will introduce the development practice of PHP projects with front-end and back-end separation, including development process, technology selection and precautions. 1. The concept of front-end and back-end separation. Front-end and back-end separation refers to developing and deploying the front-end and back-end of a web application separately, and conducting data interaction and business logic through interfaces.

In the separation of front-end and back-end development, the debate over the choice between Go language, PHP and Java In the separation of front-end and back-end development, the debate over the choice between Go language, PHP and Java Sep 08, 2023 pm 06:48 PM

In front-end and back-end separate development, the debate over the choice between Go language, PHP, and Java. With the rapid development of the mobile Internet, the front-end and back-end separate development model is becoming more and more popular. In this development model, the front end is responsible for the display and interaction of the user interface, while the back end is responsible for processing the logic and persistent storage of data. Regarding the choice of back-end languages, the more common ones currently on the market include Go language, PHP and Java. So how to choose between Go language, PHP and Java? This article will focus on performance, development efficiency and ecological environment.

See all articles