Home  >  Article  >  What do programmers mean by front-end, back-end, and full stack?

What do programmers mean by front-end, back-end, and full stack?

藏色散人
藏色散人forward
2021-07-30 11:58:413834browse

What are front-end programmers, back-end programmers, and full-stack programmers? When looking for a job, should I choose front-end or back-end? Why are so many full-site programmers in the United States? With these questions, this article will answer them one by one to ensure that you understand these concepts clearly!

Original address: https://www.bilibili.com/video/BV1DV411B7v5/

First of all, what is front-end development?

Simply put, front-end development is to develop the "content display" on the web page and the interaction with users;

The "content display" here: refers to the content you display on the web page You can see information such as pictures, text, videos, numbers, etc.

So the interaction with the user refers to the user providing data input to the website by clicking buttons, entering text and other actions on the page, and then the front end responds to the user's input.

For example, updating the content on the page. To give a more specific example, if you comment below my article, then the page will respond to your comment action, such as in the background database. , increase my comment count by one.

And display the number of comments on the article on the page, as shown below.

What do programmers mean by front-end, back-end, and full stack?

The basic technologies used in front-end development are html, css and javascript, which are used respectively Control the content, visual effects and user interaction in the web page.

The following is a brief introduction to each.

html is not a programming language, it is a markup language used to define structured data. The web page you see on the browser actually corresponds to an html file. This file contains It is html code, and one of the responsibilities of the browser is to download the corresponding html code from the website through the URL you enter, and render the code into what you see with your naked eyes.

So, one of the jobs of a front-end engineer is to write HTML code, or use some technology to dynamically generate HTML code for the page. You can view any web page through the browser's developer tools. to its corresponding html code.

If you look closely at a piece of HTML code, you will find that it is actually composed of a bunch of various types of angle bracket tags nested together. For example, on a YouTube page, the title of the video corresponds to For a title type tag in the code, the video player corresponds to a video type tag; its avatar image corresponds to a nested in the hyperlink tag. image tag; and the text in the comment corresponds to a yt formatted-string type tag. The yt here should only contain youtube, so this tag should be youtube itself. The defined tags, and then the css code, are used to specify the appearance and style of each html tag to be displayed, such as length and width, position, color centering or dispersed font display attributes, etc.

The css code is also read by the browser and rendered into the effect you see with the naked eye. Sometimes PM will want to fine-tune the size and color of a button on the page, and this fine-tuning is done by the front-end Engineers make changes; this button is implemented by the css code corresponding to it. The real programming part in front-end development is javascript. How the web page interacts with the user and how it interacts with the back-end are all implemented through javascript code, just like html code and Just as the css code is executed by the browser, the javascript code in the page is also executed by the browser.

Here, javascript has nothing to do with java. The characteristics between the two are very different. This is like the difference between India and Indonesia, and the difference between pandas and red pandas. Very far, there is a huge difference between Leifeng and Leifeng Pagoda.

Back to the topic, when people write programs, no matter what language they use, they usually don’t reinvent the wheel. Instead, they call the language’s ready-made library to implement some common functions. Make the development process more efficient.

For front-end javascript development, react is currently a popular library, and it is also what I use when doing front-end work. The react library can not only be used to implement interaction logic and event response with users. In fact, almost all html codes on the page can be generated by react. This method of generating html codes for rendering on the browser side is called client-side rendering, the opposite is service-side rendering, which is the complete html code of the page. It is all generated by the front-end server of the website and then sent to browser.

The front-end server is mentioned here. By the way, the logic of the front-end server can be implemented through any programming language, such as java, javascript, php or even Scheme. As long as the behavior of the server complies with the http protocol, client-side rendering and silver-side rendering have their own advantages and disadvantages. Therefore, when developing web pages, you need to choose the most appropriate page rendering method based on the actual situation. ;

In addition to react, another popular javascript library is vue, which is more commonly used in China. If you check the html code of station b, you will find that Vue is also used on the front end.

The above introduction is some conventional technologies for front-end development. The working principles of HTML, browsers and front-end servers are generally introduced in the "Computer Network" class in schools. CSS, JavaScript and React are just some of them. Mainly relying on self-study.

If you are interested in javascript and react learning courses, you can go to "javascript Advanced Tutorial"!

After talking about the front-end, let’s talk about the back-end.

What is back-end development?

A considerable part of the back-end development work is to develop data access services, so that the front-end can add, delete, check and modify data by calling the back-end services, which is the curd that everyone often hears, so that Implement front-end response to user requests.

For example, when you register on a large website, the front end of the website will call its back end and write your user information into the database. A backend service is not limited to being called only by the front end. It can also be called by mobile apps and other backend services.

By analogy, the front-end often needs to call the back-end service to complete the response to the user's request, and the back-end service often needs to query the database.

to complete the response to the front-end request. From this analogy, you can see that the commonality between the front-end and the back-end is to respond to the request of the front-end customer by calling a service that is behind itself. The work scope of an end-end engineer is very wide. Some of the more common ones are to design the API of the back-end service, design the architecture diagram of the back-end service, design the database of the back-end service and code to implement the business logic of the back-end service. At the same time, you also need to Ensure that the back-end service you design is highly available, that is, it will not go down even when the traffic is very large, and the response time to customer requests is very short, or the throughput is high, and it can be processed per unit time. High number of requests processed.

If you want to build a new back-end service from scratch, then the whole process requires a lot of system design. That is, when back-end engineers are interviewed, they will take the System Design test. System Design is very important to test the accumulation of daily knowledge. .

So what technologies and tools do back-end engineers usually need to deal with?

The first is the back-end server. Like the front-end server, the back-end server can also be implemented by almost any programming language, as long as the correct data can be returned to the caller.

Mainstream programming languages ​​also have their own popular Web Framework, which is a ready-made wheel to help everyone stand on the shoulders of the framework and quickly implement a back-end service. For example, the Web Framework based on PHP hasthinkphp and laravel (insert "PHP is the best language in the world"), based on javascript there is express, based on java Web Frameworks include Spring Boot and Drop wizard, as well as python-based Web Frameworks such as flask, each of which is used by major manufacturers, and different companies are specific. Which framework to choose depends, to a certain extent, on which language the founding programmers like the most and which framework is most used. There are also some back-end service frameworks that can support you to develop in multiple programming languages. Rather than being tied to a specific language.

Having said so many languages ​​and frameworks, if you want to do back-end development in a certain company, do you need to be proficient in the languages ​​and frameworks they use?

Generally speaking, no. When I was looking for a job, I saw the job description and it contained languages ​​and frameworks that I didn’t know. It didn’t matter, I just applied anyway. For the company, it’s enough that you know some of them. Many things are learned at work, and in fact, learning a new programming language within two weeks is a basic quality for a professional programmer. In addition to developing and maintaining back-end servers, back-end engineers also spend a lot of time time on the database, whether it is creating a database for your back-end service, tuning the performance of the database, or analyzing the data in it.

The most commonly used databases at present are relational databases, such as MySQL and PostgreSQL which are widely used in the industry.

How to design a relational database, how to use SQL query to access data, and how to rely on index to speed up data query. These knowledge points will also be introduced in the school database course. However, they will be introduced in the school database course. There are relatively few, but in recent years, more and more non-relational databases are used, which is what everyone often calls No-SQL databases.

For example, MongoDB based on JSON documents, such as LevelDB based on LSM tree, these databases may be used under certain circumstances. It is more suitable for your business needs than relational database.

We usually learn its principles and characteristics at work. The database is often the performance bottleneck in a back-end system, which is the slowest link. , Therefore, when back-end engineers are designing the system, they will use many methods to make the performance of the back-end, such as response time, as little as possible to be hindered by the database. For example, using a cache system such as MemCached to speed up the speed of reading data. For example, use Kafaka to write data asynchronously to improve the performance of back-end data writing. This is a rough introduction to back-end development.

Other important aspects in back-end development, such as performance monitoring, such as DevOps I will skip it here!

Let’s talk about Full stack, Full stack is all-in-one, you must be able to build and deploy a complete and working Web App by yourself, and be able to write it independently The front-end and back-end codes can configure the server and design the database.

Since I started working, I have done both front-end and back-end. I spend about 80% of my time doing back-end. For those of you who are looking for a job as a programmer, many friends have asked me, which one is front-end or back-end? The development prospects are improving. Which major is easier to get into, or which one is suitable for girls? Here I recommend everyone to read this article "Where should I start to learn programming from scratch?" Recommended programming languages ​​suitable for learning in 2021

The difference between choosing front-end or back-end is only in the technology used and the aspects considered. The front-end mainly considers the user experience, and the back-end mainly considers the underlying business logic and platform. Stability and performance mainly depend on what you like to do. Do you like to do the parts that users can see, or do you consider the parts that users cannot see?

Many people think that girls are more aesthetically pleasing and are suitable for front-end work. However, the company has unified interface specifications, and everything can be called directly. The existing components in the library, what the button fonts and borders look like, and the content sorting are not decided by me but PM and UI designers. My aesthetics are definitely not decided by designers. major.

Finally, even if you choose a certain direction, you will actually learn what others do at work, what you like and what you want to do. If you want to switch to front-end or back-end, you can take a look If there are any opportunities in the company in the group, you can also study on your own to look for other opportunities. Your previous work experience will not be in vain, and the company always likes employees with more skills!

There are more positions for full-stack programmers. This may be because the technology is relatively comprehensive. It takes one salary to hire people with two technical positions. For job seekers, full-stack programmers must have several years of work experience. It will be much higher, so everyone basically goes for full-stack programmers. After working, they will gradually develop into main front-end, main back-end, full site or management according to their personal interests and areas of expertise.

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

Statement:
This article is reproduced at:bilibili. If there is any infringement, please contact admin@php.cn delete