Introduction to C/S Architecture and B/S Architecture

1. C/S Architecture

1. C/S structure and its background

The C/S architecture is an early software architecture and is mainly used in local area networks. Prior to this, the centralized computing model has been experienced. With the progress and development of computer networks, especially the application of visualization tools, there have been two-layer C/S and three-layer C/S architectures, but we have always been popular and classic. The two-tier C/S architecture to be studied.


The C/S architecture software (ie client/server mode) is divided into two layers: client and server: the first layer is the combination of presentation and business logic on the client system, and the second layer is combined with the database server through the network. Simply put, the first layer is the user presentation layer, and the second layer is the database layer. The client and server are directly connected, and both components play an important role.

2. Advantages of C/S Architecture

a. The client and server are directly connected. The point-to-point connection method is more secure and can directly operate local text, which is more convenient.

b. The client can handle some logical transactions. Data processing and data storage can be performed to provide certain help.

c. The client directly operates the interface.

3. Disadvantages of C/S Architecture

a> The C/S architecture is suitable for local area networks, and the requirements for network speed are relatively high.

b> The client interface lacks generality, and when the business changes, the interface needs to be changed and rewritten.

c> As the number of users increases, there will be communication congestion and slow server response.

d> The maintenance of the system is also more troublesome.

4. Application of C/S Architecture

There are countless C/S architecture software, from office OFFICE, WPS, WINRAR to antivirus software such as Kingsoft, Ruijin to our entertainment software, such as player, QQ, WeChat, etc., C/S architecture is everywhere.

2. B/S structure

1. B/S architecture and its background
With the popularity of the Internet and WWW, the previous host/terminal and C/S could not meet the new requirements of the current global network opening, interconnection, information can be seen everywhere and information sharing. The B/S model emerged, the browser/server structure. It is an improvement of the C/S architecture, which can be said to belong to the three-tier C/S architecture. Mainly using the mature WWW browser technology, the general browser can realize the powerful functions that need complex special software, and save the development cost. It is a brand-new software system construction technology.


The first layer is that the browser (ie the client) has only simple input and output functions, and handles a very small part of the transaction logic. Since the customer does not need to install the client, as long as they have a browser, they can browse the Internet, so it is aimed at a wide range of users, so the interface is designed to be relatively simple and universal.
The second layer is the WEB server, which plays the role of information transmission. When the user wants to access the database, it will first send a request to the WEB server. After the WEB server makes a unified request, it will send a request to the database server to access the database. This request is realized by SQL statement.
The third layer is the database server, which stores a large amount of data. When the database server receives the request from the WEB server, it will process the SQL statement and send the returned result to the WEB server. Next, the WEB server will convert the received data result into HTML text and send it to the browser.

2. Advantages of B/S Architecture

a> The browser and the database server are connected in a many-to-many manner. Therefore, it is suitable for realizing a huge Internet in a wide area network, or even a global network, with very strong information sharing.

b> The browser only handles some simple logical transactions, and the burden is small.

c> The data is stored in the database server centrally, so there is no data inconsistency.

d> As the server load increases, the number of servers can be increased smoothly and a cluster server system can be established, and then load balancing among the servers.

e> B/S is built on a wide area network, so the required network speed is not high.

f> No need to install the client, as long as you can connect to the Internet, you can browse the page anytime, anywhere.

g> It can effectively protect the data platform and manage access rights to ensure the data security of the server database.

3. Disadvantages of B/S Architecture

a> The server bears important responsibilities and has a heavy data load. Once the server "crash" and other problems occur, the consequences are unimaginable.

b> The page needs to be constantly refreshed dynamically. When the number of users increases, the network speed will slow down.

4. Application of B/S Architecture

For example, WEBQQ, from the WEB in the name of WEBQQ, it is not difficult to see that it belongs to the B/S structure, which is a browser server structure. In fact, this is also the case, because WEBQQ does not need to install a client at all, and only needs a browser to conduct chat interaction.


Guess you like

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