Differences between C/S and B/S architectures and Advantages and Disadvantages Analysis _ php instance

Source: Internet
Author: User
Tags website server
CS and BS are two common software architecture methods that can perform the same business processing and even implement common logic in the same way. In this case, why do we need to differentiate them? Let's take a look at the differences and relationships between the two. I. C/S architecture

1. Concepts

The C/S architecture is a typical two-layer architecture. The entire process is Client/Server, that is, the Client Server architecture, the client contains one or more programs running on the user's computer, and there are two types of servers. One is the database server, and the client accesses the data on the server through the database connection; the other is the Socket server, where the program communicates with the client program through the Socket.

The 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 client must bear a lot of pressure, because the display logic and transaction processing are included in it, through the interaction with the database (usually the implementation of SQL or stored procedures) to achieve persistent data, in order to meet the needs of the actual project.

2. Advantages and Disadvantages

Advantages:

2.1 The interfaces and operations of the C/S architecture are rich.
2.2 security performance can be easily guaranteed, and it is not difficult to implement multi-layer authentication.
2.3 As there is only one layer of interaction, the response speed is faster.

Disadvantages:

2.4 narrow application area, usually used in LAN.
2.5 user groups are fixed. Because the program needs to be installed before it can be used, it is not suitable for some unknown users.
2.6 high maintenance costs. In case of an upgrade, all client programs need to be changed.

II. B/S architecture

1. Concepts

The B/S architecture is called Browser/Server, that is, the Browser/Server structure. Browser refers to a Web Browser. A very small number of transaction logic are implemented at the front end, but the main transaction logic is implemented at the server end. The Browser client, WebApp server, and DB constitute the so-called three-tier architecture. B/S architecture systems do not require special installation, only Web browsers.

In the B/S architecture, the display logic is handed over to the Web browser, and the transaction processing logic is placed on the WebApp. This avoids the huge fat client and reduces the pressure on the client. Because the client contains few logics, it is also becoming a thin client.

2. Advantages and Disadvantages

Advantages:

1) the client does not need to be installed. You can use a Web browser.
2) The BS architecture can be directly deployed on the Wide Area Network. with certain permission control, the BS architecture can achieve multi-customer access with strong interaction.
3) Upgrade the BS architecture without upgrading multiple clients.

Disadvantages:

1) The BS architecture is unsatisfactory across browsers.
2) It takes a lot of effort to achieve the performance of the CS program.
3) high design costs are required in terms of speed and security, which is the biggest problem of BS architecture.
4) the interaction between the client and server is in the request-response mode. Usually, the page needs to be refreshed, which is not desired by the customer. (This problem has been mitigated to some extent after Ajax is popular)

Iii. improvement and extension of B/S for C/S

As mentioned above, both C/S and B/S can perform the same business processing, but with the rise of Internet technology, B/S, it is an improved or extended structure for the C/S structure. Compared with C/S, B/S has the following advantages:

1. Distribution: You can query and browse services at any time.

2. Convenient business expansion: server functions can be added when web pages are added.

3. Easy Maintenance: You can change the web page to synchronize updates for all users.

4. Simple development, strong sharing, and low cost. data can be stored permanently on the cloud without worrying about data loss.

Iv. Mainstream Web application platforms

A dynamic website server platform must include at least the operating system, Web server, application service, and database. An excellent website server is determined by many factors, such as personal preferences, deployment costs, and security mechanisms. Currently, three mainstream Web platforms, ASP. NET, JavaEE, and LAMP, have their own advantages and disadvantages to meet different needs and users. The comparison is as follows:

A combination of the three platforms:

ASP. NET: Windows Server + IIS + SQL Server + ASP

JavaEE: UNIX + Tomcat + Oracle + JSP

LAMP: Linux + Apache + MySQL + PHP

Five or three figures tell you how the Web works

1. The server directly requests HTML files without applications and databases

2. servers with applications (such as php)

3. servers with applications and databases

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.