The contents of this article are organized from http://blog.csdn.net/tennysonsky/article/details/45062079
The C/S architecture and B/s architecture are two influential software architectures. c/S is a long history and very mature architecture; b/S is a new generation architecture, derived from C/s, there are many innovations in the Web Information Age Tiger Shengwei.
I. C/S architecture
has been very popular and more classic is the two-tier C/s architecture that we want to study.
C/S architecture is divided into two tiers: client and server, the first layer is user presentation layer and the second layer is database layer.
The client and server are directly connected, both of which assume important roles. The first layer of the client is not only the input and output, operation and other capabilities, it can handle some computing, data storage and other aspects of business logic transactions, the second tier of the server is mainly responsible for transaction logic processing, the transaction is very heavy, but because the client can share some logical transactions, so reduce the burden of the server.
Second, b/s structure
With the popularity of the internet and WWW, the previous host/terminal and C/s can not meet the current global network open, interconnection, information everywhere and the new requirements of information sharing, so there is a B/s model, that is, browser/server structure. It is an improvement of C/s architecture, which can be said to belong to three layer C/s architecture.
client Presentation layer: For interface boot, accept user input,   |
Application server Business Logic Layer: Executes business logic and sends requests to the database. |
database server Data storage layer: Executes the data logic, running SQL or stored procedures. |
The first layer is the browser , the client, only the simple input and output functions, processing a very small part of the transaction logic. Because the customer does not need to install the client, as long as the browser can browse the Internet, so it is oriented to a wide range of users, so the interface design is relatively simple, universal.
The second layer is the Web server , which plays the role of information transmission. When the user wants to access the database, the request is sent to the Web server, and the Web server agrees to the request and sends a request to the database server to access the database, which is implemented in an SQL statement .
The third layer is the database server , which plays an important role because it holds a large amount of data. When the database server receives a request from the Web server, the SQL statement is processed and the returned results are sent to the Web server, and the Web server then translates the received data results into HTML text to the browser, which is the interface we see in the browser.
Comparison of C/s architecture and B/S architecture
Compare items |
C/S architecture |
b/S architecture |
Network environment |
Lan |
Wan |
Safety Requirements |
For a relatively fixed user base, The ability to control information security is strong |
For the unknown user base, Relatively weak control of security |
Logical transaction Processing |
The client and the server each undertake a part of the logical transaction processing |
The client can only perform simple input and output and information sharing functions, the primary logical transaction is to rely on the server |
Response speed |
Faster, especially when users are increasing |
Slow |
Software Reuse |
Poor |
Good |
System Maintenance |
Difficult to upgrade |
Easy Upgrade |
User interface |
Closely related to the operating system |
Cross-platform, browser-related |
Database connection Type |
ODBC connection, keeps the connection intact as long as the user connects to the database Limit the number of users |
JDBC Connection, the user does not maintain a connection to the database, so the user is almost unlimited |
Function |
More complex, able to achieve a single complex function, now most large-scale ERP system is still the C/s architecture |
Less transaction logic, but the interface is more generic |
Requirements for technical personnel |
Higher |
Lower |
c/S architecture and B/S architecture