JavaWeb- client and server

Software use the Two

  • C / S: Client / Server, PC client, server architecture, in which the server is primarily a database, all business logic and interface are handed over to the client to complete, more secure, rich user interface, user experience is good, every the upgrade should be re-installed, for different operating systems development, poor portability.
  • B / S: Browser / Server, Browser / server architecture, browser-based applications to access, the business layer to the server to complete the client only in exchange interface rendering and data, only the development of server-side, cross-platform , highly portable, security is relatively low, poor user experience.

Web Resources

  • What is Web: WEB page and it is used to represent a network host access outside resources for reference.

  • Web resource classification
    1. static Web resources: refers to a web page for people to browse the data is always the same.
    2. Dynamic Web Resources: refers to the data for people to browse the web page is generated by the program, visit different points in time to see the content of the web pages vary.

  • web resources stored where:
    1. All web resources on which a web server
    2.web server that can be used for external access to web resources of a software
    3.web resources into the specified directory which they can, through the corresponding port in the browser to access them.

  • URL: protocol: // host address: port number / address resources

  • Client: browser, Android program, iOS program, small micro-channel program.

  • Server: php server, tomcat server, nodeJS server ....

Resource Access Process

When we visit a URL in the browser which, why you can see a page, a web site is actually a corresponding IP address, an IP address corresponding to a computer, find the corresponding IP address of the computer by the computer which installed there are web server, find the corresponding server through port number to find the corresponding server, the server returns the page to you, such a process is the process http requests.

Request and response

  • Request: the client requests to the server
  • Response: The server you want to send the data to the client
  • Requests and responses have a certain format: a good agreement with the client what format the data to the server, the server agreed well in what format the data to the client, HTTP is the protocol used by this agreement.
Published 25 original articles · won praise 0 · Views 284

Guess you like

Origin blog.csdn.net/qq_42219004/article/details/105276275