Current location - Education and Training Encyclopedia - Education and training - Beida Jade Bird Design Training: How to Learn web Front-end Programming?
Beida Jade Bird Design Training: How to Learn web Front-end Programming?
After doing Web programming for so many years, if you think about it carefully, you have actually grasped several key issues, and it is not difficult for Beida Jade Bird/Sharing to learn.

1. Understanding Browser/Server Structure (B/S)B/S was developed from the client/server side in the 1990s. Similar to * * *, a server serves multiple clients.

The differences are as follows: First, the client with C/S structure may be written in different languages, such as VB, Delphi, PowerBuilder, etc. Under the B/S structure, the browser becomes a general-purpose client, and the program is presented in the form of Web without installation. The upgrade of the server means the upgrade of all clients, which is an earth-shaking change compared with C/S.

Secondly, the access protocol of B/S is also standardized as HTTP(s), instead of the original proprietary protocols.

Finally, the server with B/S structure can be accessed by users all over the world, instead of just having a local area network like C/S, so it is more stressful and challenging.

2. hello. Web page? Simply put, it is HTML+CSS+Java, and the Web interface we see is composed of these three.

HTML is responsible for structure, CSS is responsible for presentation, and Java is responsible for behavior.

The front-end development we are talking about is mainly to do this. For front-end engineers, it is necessary to understand the DOM model and how to operate the DOM model through java (such as JQuery and other frameworks).

3. How do browsers and servers interact with each other? HTTP, of course! HTTP, to put it bluntly, is a protocol for chatting between browsers and servers to ensure mutual understanding.

The complete HTTP is very complicated. The authoritative guide to HTTP is over 700 pages thick.

In fact, the most commonly used and important ones are just a few points: (1)GET and POST.

GET gets the data from the server, and POST sends the data to the server (which leads to the problem of uploading pictures). (2)HTTP is a stateless protocol, which requires additional mechanisms to maintain state (such as login state), and the common method is cookie.

(3) Understand HTTP status code (4) Understand synchronization vs asynchrony (which leads to AJAX, JQuery and other frameworks). Map url and code to understand the relationship between URL and code, such as www.xxx.com? How does a url like action=login relate to the back-end business code? Where is such a rule defined? With code, comments or configuration files? How should the backend business code be organized? I believe that no one will write all the business logic into Servlet now, so many MVC frameworks like Struts and Spring MVC are needed to organize the code and make the system clear and easy to understand.

5. How to verify, transform and bind data to ensure that the data sent by the browser meets the requirements? For example, it can't be empty, it can't exceed 8 characters, and the two passwords must be equal ... If there is an error, an error prompt will be given.

The data sent by the browser is in the form of user name = Liu Xin&; Password= 123456 is such a simple text, but the background program has rich data types, such as strings, dates, integers and so on.

So you need to convert the text into the type of the specified language.

After type conversion, how to effectively use the back-end business code? The simplest thing is to get a Map similar to key:value, and the business code can be directly used as map.get(key).

Advanced can directly bind the data sent by the page to the attributes of objects, and support complex structures such as arrays and nesting.

For example, user name = Liu Xin&; User.password= 123456 can be bound to an object named User, which has two properties userName and password.