Front-end basic knowledge sorting (1)

foreword

I have been working for almost two years, mainly engaged in java background development. Of course, it is not pure writing interface. During this period, I have to write front-end code. I have written ext and native js, and I have also used some popular front-end frameworks, such as jQuery, ligerUI, bootstrap, and more recently react+redux. For simple front-end code, such as native basic js and jQuery, it is relatively simple to use and understand. If you encounter problems, Baidu can solve almost all problems; some CSS styles can also be passed through the Internet (mainly the W3C website ) acquisition, although it takes a lot of time to debug, it can barely solve the problem; the front-end framework can greatly improve the development efficiency, because it is like a mold, copying and pasting similar business logic code can meet its own needs. But after using it for a long time, it will stay at the stage of being able to use it. If I want to start writing from scratch, I really have no clue, so I always feel a little uneasy. So let's sort out some basic knowledge of the front desk from the beginning, not only to know the truth, but also to know the reason, I feel that this can be improved.

1. From the beginning, what is C/S architecture and what is B/S architecture

This is a question that can no longer be based on the basics. It will be introduced in the basic courses of the university, and even similar questions will be taken at the end of the semester. The difference between the two lies in C and B, Client and Browser.

C/S architecture, client/server

(1) Generally, the software we use is C/S architecture

(2) For example, the software QQ, 360, office, XMind in the system

(3) C represents the client, the user uses the software through the client

(4) S represents the server, which is responsible for processing the business logic of the software

Features: 1. The software must be installed before it is used. 2. When the software is updated, the server and client must be updated at the same time. 3. The software of the C/S architecture cannot be used across platforms (for example, the QQ mobile APP cannot run on windows) 4. C/ The communication between the software client and server of the S architecture adopts its own protocol, which is relatively secure (custom protocol, you can add encryption to the protocol to ensure security)

B/S, browser/server

(1) B/S is essentially C/S, but the software of B/S architecture uses the browser as the client of the software

(2) B/S architecture software uses the software in the form of using a browser to access web pages

(4) 3. For example: Jingdong Taobao 12306 Zhihu Sina Weibo

Features: 1. The software does not need to be installed, you can directly use the browser to access the specified website 2. When the software is updated, the client does not need to be updated 3. The software can be cross-platform, as long as there is a browser in the system, you can use 4.B /S architecture software, the communication between the client and the server adopts the general HTTP protocol, which is relatively insecure (of course, the more widely used protocol is https)

2. What does a front-end engineer do?

When I first started working, I always thought that front-end engineers were just writing and drawing interfaces, and there was no logic at all. Thinking about it now, it was really naive at the time. The front-end logic was very strong, and it was difficult. So everyone will think that the front-end entry is very simple, html+css+js, what you see is what you write, is it simple? But as the study deepened, it was found that this was not the case. Everyone also knows that a language like java is relatively simple, but compared to the front-end, the threshold of java is still higher, because after learning the basic knowledge at the beginning, you don’t know what you are learning this language for, it is more abstract. However, after laying a solid foundation, future learning will become easier, such as ssh, ssm, etc. Of course, when a bottleneck is reached, it is still difficult to advance to java, which has a lot to do with your working environment.

What does a front-end engineer do, you can see the picture below


A pure front-end engineer is to convert the designed diagram into a web page, and then deliver it to the back-end engineer to add dynamic data logic code, so there will be a problem that the back-end engineers are relatively pure, after the back-end engineer builds, the interface becomes Another look, which is obviously unacceptable to users. So it is derived into such a model: let the back-end engineers provide the interface, and the front-end engineers write the display logic, so that the interface can be closest to the original design; of course, js can also write the back-end, node js, so that one person can do two Personal work, full stack, obviously this will be more and more demanding for engineers.


Let’s start from scratch today, learn slowly, the road is long and long!

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325483890&siteId=291194637