Overview
In this rapidly expanding society, we have to say that mankind is entering a new era, that is the information age. A major and notable feature of the information age is the application of computer networks. Computer network from the initial centralized calculation, after the client/server phase (there are two layers C/s and three layer C/s), has developed to the most popular Browser/server computing model. One of the most controversial and influential is the C /s and b/s structure , C/S is a long history and technology is very mature architecture, B/S is a new generation structure, derived from C/s, there are many innovations in the Web Information Age Tiger Shengwei.
c/S architectureI. C/s architecture and its background
C/S architecture is a relatively early software architecture, mainly used in local area networks. Before this experienced a centralized computing model, with the progress and development of the computer network, especially the application of visual tools, there have been two layers of C/s and three-layer C/s architecture, but has been very popular also more classic is we have to study the two-layer C/S architecture .
The C/S architecture software (i.e. client/server mode) is divided into client and server two tiers : the first layer is a combination of representation and business logic on the client system, and the second layer is a database server combined with the network. Simply put, the first layer is the user presentation layer, the second layer is the database layer.
The client and the server are directly connected, both of these components assume an important role, the first layer of the client is not only the input and output, operation and other capabilities, it can handle a number of calculations, data storage and other aspects of business logic transactions; second tier The server mainly takes the transaction logic processing, originally the transaction is very heavy, but because the client can share some logical transaction, therefore reduces the server burden, causes the network traffic to increase.
software that wants to use the C/s architecture needs to download a client that can be used after installation .
Ii. Advantages of c/s architecture
Since the C/s architecture can flourish in the long river of computer history, it must have its flash place. The following will analyze the advantages of the C/s architecture from various angles.
1) direct connection between client and server
A) point-to-point mode makes it more secure.
b) You can manipulate local text directly, reducing the time and effort of getting text.
c) Reduced traffic due to direct connection, which can save a large amount of money for customers.
d) Directly connected, there is no barrier or fork in the middle, so the response speed. When there is less traffic, there is no feeling, but if the traffic volume is large, there will be no congestion phenomenon.
2) The client can handle some logical transactions
A) Make full use of both hardware facilities to avoid waste of resources.
b) share some logical transactions for the server, which can be processed and data stored. Can handle complex transactional processes.
c) The client has a complete set of applications, has a strong function in the error prompt, the online help and so on, and can freely switch between the subroutine.
3) Client Operation interface
A) can improve the customer's visual experience to meet customer needs.
b) Client interface can be arranged at will, fully meet the needs of customers, show characteristics and personality.
Iii. Disadvantages of C/s architectureAfter a long period of time testing, people also found that the shortcomings of C/s, the following will be summarized in the previous views.
1) Client
A) can only handle a few functions of a single multi-system.
b) C/S architecture is applicable to local area network, the demand for speed is relatively high.
c) Due to the need to install the client, installation is difficult to deploy, so it is not easy to expand.
D) If the client is using a different system, it is necessary to write programs for these systems separately.
e) The client interface lacks versatility and needs to be rewritten as the business changes.
f) The client needs a specialized client program, which is cumbersome and is not capable of rapid deployment installation and configuration for user groups with a wide range of points and no network conditions.
2) server
A) The increase in the number of users will be traffic congestion, slow server response and other situations.
b) When the server is heavy, it can only be discarded, using a more powerful server.
c) When the number of client users increases, the server can not bear the burden, is a veritable "fat" client.
d) The user is connected to the database via ODBC, and each user connected to the database maintains an ODBC connection that occupies the resources of the central server and is highly demanding for the server.
3) user
A) external users who do not have a client installed cannot access it.
b) The server can only be accessed if the client is installed, so users cannot access it anytime and anywhere.
c) The user is connected to the database through ODBC, so the number of users is limited, not easy to expand.
D) Due to a small range of customers, it is not possible to achieve a truly large-scale information sharing, information transmission and dissemination.
4) Development Cost
A) The need to recruit high-quality personnel, training, high cost.
b) The initial development needs to be equipped with a good client, server, need to have professional standards of technical personnel, so the cost is high.
5) Later costs
A) system upgrade maintenance trouble, need to change a lot of programs, put a lot of energy and money.
b) When the business expands or changes, the program needs to be changed, and the client interface needs to be changed again.
c) The initial input costs can not be once and for all, the latter need a lot of costs, such as server replacement, client notconsistent and so on.
iv. Application of C/s architecture
c/S Architecture software is countless, from office office,wps,winrar to anti-virus software such as Jinshan, Ruijin and then to our entertainment software, such as players, QQ, and so on, nowhere to see C/s architecture.
b/S ArchitectureA, b/s structure and its background
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 . The main use of the continuous mature www browser technology, with a common browser to achieve the original need for complex special software to achieve the powerful function, and save the development cost, is a new software system construction technology.
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 first, and the Web server sends a request to the database server to access the database after the unified request is implemented in an SQL statement.
The third tier 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.
b/S architecture and C/S architecture , the browser is not directly connected to the database server, so it is many-to-many structure. Therefore, under this structure, it is very suitable to realize the huge internet in the WAN, even the global network. Has a strong information-sharing nature.
In the early days of the B/s appearance, the browser can only display static pages, not good interaction, not a lot of logic processing, when the browser is mainly used to achieve the release of information, is a one-way application. Then came the Dynamic Web page, where the dynamic has three aspects, one is the interaction, the second is the animation, three is the data. In this way, the interactive performance of the browser is greatly improved. The pages are also more colorful. The browser can also handle some logical transactions, so the browser becomes the client, but because the content is less processed, it is called a "thin" client .
Advantages of B/S architectureb/S architecture is based on the rapid development of web technology from the traditional C/s architecture, and has become the main network architecture. At present, the main website, especially the business site is based on the B/s structure. Then we have to count the advantages of B/s architecture, why it is favored by everyone.
1) Browser
A) to face the vast number of users to achieve information dissemination and sharing.
b) The browser only handles some simple logical transactions with little burden.
c) Updates to the page can be synchronized for all users to see.
d) Interface design development is simple, the requirements of the programmer is low, do not need a lot of training.
e) Business expansion is convenient, only need to add a few business expansion of the page, do not need a lot of programming.
f) interface does not need to write too much, more general, change the interface is relatively simple, so there is little need for maintenance.
g) Because of the platform independence of the Web, you can scale from one server to a few users to a large system with tens of thousands of users.
2) Server
A) data is stored centrally on the database server, so there is no data inconsistency.
b) can effectively protect the data platform and manage access rights, the server database is also very secure.
c) Do not use Windows systems on the database server, choose More, and have less cost.
D) If it is offsite, simply connect the server to a private network for remote maintenance, upgrades, and sharing.
e) After the emergence of a cross-platform language such as Java, b/s architecture management software is more convenient, fast and efficient.
f) data is stored in the database server, the client does not hold any business data or database connection information, so the data is more secure.
g) As the server load increases, the number of servers can be increased smoothly and the cluster Server system will be established, then load-balanced between the servers.
3) User
A) b/s is built on the WAN, the required speed is not high.
b) External users can also access the browser.
c) interface humanization, generalization, do not need much training to be able to master.
D) do not need to install the client, as long as the Internet, you can browse the page anytime and anywhere.
e) The powerful information dissemination and information transmission capabilities of the Internet can effectively solve the large number of irregular information exchange within the enterprise.
f) All users are connected to the database through a JDBC connection buffer pool, and the user does not maintain a connection to the database, and the number of users is essentially unlimited.
4) Cost
A) software reusability is strong, saving a lot of cost.
b) No need to install special software, the client almost 0 maintenance.
c) Easy to develop, easy to upgrade, people do not need too much training, save a lot of money.
D) The client hardly needs maintenance, as long as the server can be fixed, so the cost is small.
e) Generally only the initial one-time input costs, software projects to control and avoid it black holes.
f) built on the WAN, do not need to be dedicated network hardware environment, such as telephone Internet, rental equipment, etc., the cost is small.
Disadvantages of the B/s structureAlthough the B/s structure has many advantages, but also inevitably some defects, otherwise it will not be the outbreak of what kind of structure to use the war of words. However, in theory, since B/S is an improved version of C/S, we should overcome many defects of C/s, so the shortcomings should not be many. Let's take a look at what's actually happening.
1) Client
A) surface generalization, does not highlight personality.
b) the page needs to be constantly dynamic refresh, especially the increase of users, the speed of the slow situation, very time-consuming.
c) Because there is no need to install the client, the client is easy to expand, there are external users can also access, so B/s face a large number of unknown users.
2) Server
A) when the number of users increases, the server responds slowly.
b) Although the functions are diverse, they cannot be specialized and do not enable complex functions.
c) The server assumes an important responsibility and the data load is heavier. In the event of a server "crash" and other issues, the consequences are unimaginable.
Four, b/S Architecture applicationWhen explaining the typical C/s architecture, the common QQ software was mentioned. Now new out of a webqq, from the WEBQQ name of the web is not difficult to see it belongs to B/S architecture, is a browser server structure. In fact, this is true because WEBQQ does not need to install the client at all, it needs only a browser to interact with the chat.
c/S and/boverview of the relationship between C/S and b/s
b/S architecture is improved from the C/s structure, can be said to be three layer C/s structure, it is obvious that the relationship is not general. b/S from the C/s out, and then with the rapid development of web technology and people's dependence on the network deepened, b/s became the most popular network architecture today. Both architectures are Tiger Shengwei in their respective positions, and they are very important network architectures. In response speed, user interface, data security and other aspects, C/s Stronger than B/s, but in business expansion and the application of WWW conditions, b/s is significantly better than C/s. So to speak, B/s strength is the weakness of C/s, and vice versa. They have their advantages and disadvantages and cannot be replaced by each other.
different points of C/s and b/s
1) A big difference
1. Structure
c/S is a two-tier architecture consisting of a client and a server, while B/S is a three-tier architecture consisting of a browser, Web server and database server.
2. Logical transaction Processing
c/S architecture reasonably allows the client and the server to take part in the logical transaction processing, the burden of the server is reduced, and the client can also carry out some data processing and storage functions. b/S architecture of the browser is its client, but this client can only carry out some simple input and output and information sharing function, the main logical transaction processing or rely on the server, so the burden of the server is very heavy.
3. Working principle
C/S architecture is the client and the server directly connected to achieve point-to-point communication, B/S is the browser through the Web server to the database server to send data requests to achieve many-to-many communication.
4. Response speed
c/S architecture of the client and the server directly connected, there is no barrier, so the corresponding speed, especially when the user increased more obvious. b/S architecture correspondingly slow, the main task in the database server, due to the infinite expansion of B/s architecture, when the user explosion, the traffic is huge, the server corresponding speed is slow, the server is in danger of paralysis.
5. Cost
c/S architecture development, the hardware needs a one-time purchase, high cost, and requires trained technical personnel, training costs, and the software also needs to continue to invest a lot of money later. b/S architecture only need one-time input can almost once and for all, benefit software project control and it black hole.
6. Maintenance, upgrades and extensions
c/S architecture once there is a business change or to upgrade, the client interface will have to re-design, the need to invest a lot of manpower and resources. Software maintenance is also more troublesome and requires professional maintenance. User extension is also troublesome, need to install the client, the hardware and software requirements are high. b/S architecture maintenance and upgrades are very easy, as long as the page content changes or increase or decrease the page, the client is almost 0 maintenance, only need to maintain a good server. So it's relatively easy and convenient. Because b/s can be accessed anytime and anywhere, it is easy to expand.
7. Information sharing
The C/S architecture is built on the local area network, which is for the limited users, and the information sharing is only in a small scope. b/S architecture is built on the WAN, users can access anytime, anywhere, external users can also access, especially the continuous development of web technology, B/s face is almost unlimited user groups, so information sharing is very strong.
8. Client interface
C/S architecture can be designed for different functions of different very unique user interface, to achieve personalization. But once the business changes it needs to be redesigned and cumbersome. b/S Architecture user interface is very general, not for the user to highlight the personality, but the business changes only need to change the interface content or increase or decrease the page, it is easy to achieve.
2) Small Differences
1, the applicable network
The C/S architecture is built on the basis of the local area network, and the LAN provides the service through the dedicated server. b/S architecture is built on the basis of the wide area network and has a greater scope of use.
2. Visit
c/S architecture, users need to install the client to be able to access the server, and b/s structure, users can access anywhere, as long as there is a Web browser, convenient and fast.
3. Database connection Type
c/S is an ODBC connection, so as long as the user connected to the database will keep the connection will not be disconnected, so limit the number of users, and b/s using a JDBC connection, the user does not maintain a connection to the database, so the number of users is almost unlimited.
4. function
C/S architecture can achieve a single complex functions, such as financial management, so now most of the larger ERP system is still C/s architecture, b/S Architecture interface is more general, can handle less logical transactions, so the function is weak.
5. Security
The C/S architecture is built on the local area network, facing the more fixed users, the security requirements are higher. b/S architecture built on the WAN, the face of unknown people, poor security.
6. Information flow to different
c/S program is typically a centralized mechanical processing, interactive relatively low B/s information flow can change, b-b b-c b-g and other information, flow changes, more like a trading center.
7, the requirements of technical personnel
The function of C/s is more specialized, the requirements for design and development personnel are higher, and professional training is required. b/S interface is more user-friendly, universal, so do not need a high level of skills.
Turn from: Baidu Library
On the structure of C/s and b/s