B / S architecture and C / S architecture (abbreviated speaking)

B / S architecture basic concepts

B / S is a Browser / Server, that is, the browser / server architecture. Browser refers to the Web browser, a handful of business logic in the front-end implementation, but the main business logic on the server side.

B / S three-tier architecture may be defined as:

L represents a layer on the client

l the intermediate layer web server

l backend database server layer

In the B / S structure pattern layer systems, the client no longer need to install a specific client application in favor of common browser software, all users are business logic deployed on the new intermediate layer.

Since the three-tier architecture is usually web-based, so the middle-tier applications typically work on the web server, it is seen as a functional extension web server, so the middle layer, also known as web services layer. On the web server, through a large number of containing CGI / Servlet is a server-side script page, accept the request from the client browser, and to complete the operation of the database.

B / S architecture, the display logic to the Web browser, transaction processing logic placed in the WebApp, thus avoiding the huge fat client, reducing the client's pressure. Because the client contains very little logic, it is also known as thin clients.

Server-side programming means to write on a web server program and make it work properly. In the B / S mode, when a user downloads a web page, if the page contains server-side scripting, web server will first execute scripts on the page, and then sends the results page execution to the client browser.

B / S architecture disadvantages

advantage:

(1) client without having to install, there is a Web browser;

(2) BS architecture can be placed directly over the WAN, through certain access control to achieve the purpose of multi-client access, interactive strong;

(3) BS architecture eliminates the need to upgrade multiple clients, you can upgrade the server.

Disadvantages:

(1) in the cross-browser, BS architecture is not satisfactory;

Degree (2) the performance of CS program to achieve it takes a lot of energy;

(3) on the speed and security need to spend a significant design cost, which is the biggest problem BS Architecture;

(4) Browser and Server interaction is a request - response pattern, usually need to refresh the page, this is not the customer would like to see, after the popular AJAX this problem to a certain extent.

C / S architecture basic concepts

C / S is the Client / Server, i.e., a client / server architecture, a typical two-tier structure. A client comprising one or more programs running on a user's computer. Server has two, one is a server-side database, the data access server via the client database; the other is Socket server, the server by a program Socket communication with the client.

Because the client needs to implement the vast majority of business logic and interface display. As part of the client's needs under great pressure, because the display logic are included in the transaction and which, through interaction with the database (typically implemented SQL or stored procedure) and to achieve persistent data, in order to meet the actual needs of the project .

C / S architecture advantages and disadvantages

advantage:

(1) and the operation can be very rich interface;

(2) ensure safety performance can easily achieve multi-layer authentication is not difficult;

(3) Since there is only one layer interacting, so response speed.

Disadvantages:

(1) Applicable narrow, typically used in LAN;

(2) a fixed user base, because the program needs to be installed before use, and therefore not suitable for some users unknown;

(3) high maintenance costs, the occurrence of an upgrade, all client programs need to be changed.

Guess you like

Origin www.cnblogs.com/almm/p/11580239.html