c/S and b/s two types of architecture concepts, differences and links _ other integrated

Source: Internet
Author: User
Tags socket

c/S and b/s, is a common but the two kinds of software architecture, can do the same business process, or even the same way to achieve common logic. Why, then, should we distinguish each other? So let's take a look at the difference and the connection.

First, c/s structure

1. Concept

C/S architecture is a typical two-tier architecture, the whole is client/server, that is, the client server-side architecture, the client contains one or more on the user's computer running the program, and the server has two, one is the database server side, the client through the database connection access to server-side data , the other is the socket server side, the server-side program communicates with the client's program through the socket.

C/S architecture can also be seen as a fat client architecture. Because the client needs to implement the vast majority of business logic and interface display. In this architecture, the part of the client takes a lot of pressure because the display logic and transaction processing are included, to meet the actual project needs by interacting with the database (usually the SQL or the implementation of the stored procedure) to achieve the persisted data.

2. Advantages and Disadvantages

Advantages:

2.1 c/S Architecture interface and operation can be very rich.
2.2 Security can be very easy to ensure that the implementation of multi-layer authentication is not difficult.
2.3 Response is faster because there is only one layer of interaction.

Disadvantages:

2.4 Suitable for narrow face, usually used in LAN.
2.5 User group fixed. Because the program needs to be installed before it can be used, it is not intended for some unknown users.
2.6 Maintenance costs are high, an upgrade occurs, all client programs need to change.

Second, b/s structure

1. Concept

b/S architecture is all called browser/server, IE browser/server structure. Browser refers to the Web browser, a very small number of transaction logic in the front-end implementation, but the main transaction logic is implemented on the server side, browser client, WebApp server-side and DB-side constitute the so-called three-tier architecture. b/S architecture of the system without special installation, only a Web browser can.

b/S architecture, display logic to the Web browser, transaction processing logic on the WebApp, so as to avoid a large fat client, reduce the pressure on the client. Because the client contains very little logic, it is also becoming a thin client.

2. Advantages and Disadvantages

Advantages:

1 The client does not need to install, there is a Web browser.
2 BS structure can be directly placed on the WAN, through a certain degree of authority control to achieve the purpose of multiple customer access, strong interaction.
3) BS architecture upgrades the server without needing to upgrade multiple clients.

Disadvantages:

1 The BS architecture is not as satisfactory across browsers.
2 performance to achieve the degree of CS program requires a lot of effort.
3 The speed and security of the need to spend a huge cost of design, this is the biggest problem of BS architecture.
4 Client server-side interaction is a request-response pattern, which typically requires refreshing the page, which is not something that customers are happy to see. (This problem has been somewhat mitigated after the popularity of Ajax)

Third, b/s to the improvement and expansion of C/s

As mentioned above, C/s and b/s can be the same business processing, but B/s with the rise of internet technology, is a C/s structure of an improvement or expansion of the structure. Relative to C/S,B/S has the following advantages:

1, the distribution: You can always carry out inquiries, browsing and other business

2, business expansion is convenient: Add Web page can increase server function

3, maintenance simple and convenient: Change the Web page, you can achieve all user synchronization updates

4, development is simple, sharing strong, low cost, data can be stored in the cloud for a long while without worrying about the loss of data.

Four, the mainstream Web application platform

A dynamic Web server platform should include at least: operating system +web Server + application services + database. A good Web server is determined by a variety of factors, such as personal preferences, deployment costs, security mechanisms. The three web platforms currently in the mainstream: ASP.net, Java ee, and lamp have their pros and cons to meet different needs and users. The three comparisons are as follows:

Three different parts of the platform combination:

ASP.NET:Windows Server+iis+sql server+asp

javaee:unix+tomcat+oracle+jsp

lamp:linux+apache+mysql+php

Five or three diagrams tell you how the Web works

1, the server without the application and database, direct request HTML file

2, server with the application (such as PHP)

3. Server with Application and database

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.