b/S working principle

Source: Internet
Author: User

Transfer from http://blog.csdn.net/akkzhjj/article/details/17765541b/S questions

compared to C/S, in c/sc/s after learning, we began b/s learning, Here we contact is asp.net web learning, First we learn the Beef Brisket Press release system, feeling very simple, and before the c/s development there are many similar places, most of the implementation function is also drag control, write method, up to asp.nethtmlcss design page (that is, the front page), of course, can also be javascriptajaxb/s

Web Development and summary

ClientHTML

Hypertext Markup Language. Used to mark and standardize the text, pictures, sound, video and other multimedia elements, through the browser display to us (Web Page).

CSS

Cascading style sheets. Used to design HTML,Css+div 's application makes the implementation of the structure and performance of the page separated, while the CSS learning focus on the CSS box model, it is a DIV the core of typography.

XML

Extensible Markup Language. Literal parsing is not easy to understand, in fact it is used to store transmitted data. the relationship with HTML is that when XML is not used, HTML is used to display the data, the data must be stored in an HTML file, and the data can be stored in a separate XML document using XML. This approach allows you to focus on the display and layout of your data using HTML, and ensure that data changes do not cause HTML files to change. This makes it easy to maintain pages. JSON comparison

Javascript

The client-side scripting language. With HTML and CSS, although there is a good page effect, but that is far from enough, because we do not have to click the hyperlink, we can not do other operations,JS appears to make the Web page added a very strong interactivity, accurate said JS is an object-and event-driven, client-side scripting language. Object-based, learning object-oriented knowledge of its strengths, based on the principle of the same object, the event-driven, so that our web page can be the same as the normal WinForm program, you can do all kinds of mouse, keyboard and so on trigger action. In a word, thecombination of JS and HTML can respond to the client's actions in a timely manner, and respond to the submission of the form in a timely manner.

AJAX

client interaction technology, asynchronous javascriptxml send http request ( xmlhttp). The traditional web application after the user submits the form and then to web The server sends the request, The server receives processing through the form, and then returns a new page, so that the client page will be refreshed to show the data obtained from the server, there is no mistake, but if the user in the request before and after the two page content is very small, the overall page refresh is not necessary, also wasted broadband, user experience is not good.

Ajax has completely solved this problem, andAjax technology is actually putting JavaScript and xmlhttprequest objects between Web forms and servers. When the user requests to the server, the data is sent to some JavaScript code instead of being sent directly to the server. The JavaScript code sends the asynchronous request behind the scenes, and then the server returns the data to JavaScript processing, which decides how to process the data, and it can quickly update the form data without needing to update the entire page. Common examples are Google Maps.

Jquery

A Javascript framework, the basic idea and usage is " pick a page element and then do something about it ", which requires us to understand the basic DOM and Jquery Basic syntax and APIs. It has a very powerful function!

Service side

To the client's request to make the corresponding processing, to achieve the dynamic site, plainly, is to serve the client. There is not much to say, the following is mainly about learning to use the knowledge of ASP.

The working principle of B/s

Basic principle also has some understanding, below begins to analyze b/S application works.

From the user's action, the user submits a form action on the browser page, sends a request to the server, the server receives and processes the request, and then returns the user's requested data (Web page file, picture, sound, and so on) back to the browser, at which time the request is completed.

The problem is that the browser's request is how to form how to send, and then how to send to the server side, the server is how to return, the middle of what operation?

Browser/server interaction

With the problem, let's take a look at the entire process of a browser requesting a server:

  

The interaction between the browser and the server is basically clear after viewing the graph. Here are some of the contents of the figure in the understanding.

HTTP Protocol

Hypertext Transfer Protocol. See hypertext is not very familiar with, yes it is transmitted through the network Hypertext Markup Language (HTML) document Transmission protocol, detailed rules of the browser and the server to communicate with each other, we call the Http request message ( The browser sends the requested data format to the server) and the HTTP response message (the data format that the server returns to the browser).

Request for the HTTP protocol

refers to the request information from the browser side to the server side, through this information to tell the server user the resources needed.

The HTTP protocol defines a number of ways to interact with the server, the most basic of which are 4, get,post,put,delete, respectively. A URL address is used to describe a resource on a network, and the Get, POST, and Put,delete in HTTP correspond to the search, modification, and deletion of 4 operations for this resource. Our most common is get and post. Get is typically used to get/query resource information, and post is typically used to update resource information .

response of HTTP protocol

After receiving and parsing the request information, the server returns an HTTP response message. That is, the generated HTML document is sent to the browser.

There is a lot of content about HTTP , there is no practical operation a lot of mechanisms are difficult to figure out, theHTTP protocol will continue in the future, now understanding can understand the principle of Ajax interaction. Because Ajax in web development also uses the request and response patterns to communicate information to the server.

asp . NET Platform

The principle of web development in ASP. NET is also in line with b/S submission request and processing return this mode, but our development process is not considered, and does not need to consider its underlying implementation,ASP. NET encapsulates its underlying processing mechanism , so that a lot of tasks can only be achieved by dragging and dropping the control, and we can't feel the change of content processing in the Web. The greatest benefit is that we learn that ASP . NET becomes simple and easier to develop, which is the best tool for us to transition from C/s to b/s .

Any study not only learns its technology, but also understands its essential principles to help us in-depth analysis of problems and improve technology. Original aim,B/s study ended, otherwise, actually just started.

concluding remarks

b/S has more than half a year of study time, in general, some theories and principles of carding summary, more knowledge needs us to continue to learn.

b/S working principle

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.