Two architecture differences between C/s and b/s

Source: Internet
Author: User
Tags socket website server





c/S and b/s, is a common but two kinds of software architecture, can do the same business processing, or even in the same way to achieve common logic. So why do we have to differentiate ourselves from each other? So let's take a look at the differences and connections.









First. C/S architecture



1. Concept



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



The C/S architecture can also be seen as a rich client architecture. Because the client needs to implement the vast majority of business logic and interface presentation. In this architecture, the part of the client needs to be under a lot of pressure, as both the display logic and the transaction are included, and the data is persisted by interacting with the database (usually the implementation of SQL or stored procedures) to meet the needs of the actual project.



2. Advantages and Disadvantages



Advantages:



The interface and operation of 2.1 c/S architecture can be very rich.
2.2 Security can be easily guaranteed to achieve multi-level certification is not difficult.
2.3 The response is faster because there is only one layer of interaction.



Disadvantages:



2.4 Applicable surface is narrow, usually used in LAN.
2.5 user base fixed. Because the program needs to be installed to use, it is not suitable for some unknown users.
2.6 High maintenance costs and an upgrade occurs, all client programs need to be changed.



Second, b/s structure



1. Concept



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



b/S architecture, the display logic to the Web browser, transaction logic on the WebApp, so as to avoid the huge fat client, reducing 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 be installed and has a Web browser.
2) BS architecture can be placed directly on the WAN, through a certain degree of access control to achieve the purpose of multi-client access, interactivity is strong.
3) The BS architecture does not need to upgrade multiple clients to upgrade the server.



Disadvantages:



1) on cross-browser, the BS architecture is not satisfactory.
2) It takes a lot of effort to achieve the level of CS program.
3) The high cost of design for speed and security is the biggest problem with the BS architecture.
4) client-side interaction is a request-response pattern and usually requires a refresh of the page, which is not a customer's pleasure to see. (This problem has been eased somewhat after Ajax popularity)



The improvement and expansion of C/s



As mentioned above, the C/s and B + can carry out the same business processing, but with the rise of the Internet technology, b/s structure is an improvement or expansion of the structure. The following advantages are provided with respect to C/S,B/S:



1, Distribution: can be at any time to inquire, browse and other business



2, Business expansion convenience: Add Web page can increase server function



3, maintenance is simple and convenient: Change the webpage, can realize all users synchronization update



4, the development is simple, the sharing is strong, the cost is low, the data can persist in the cloud without worrying about the data loss.



Four, the main Web application platform



A dynamic Web server platform must include at least: operating system +web Server + application services + database. A good website server is determined by many factors, such as personal preferences, deployment costs, security mechanisms. And now the mainstream of the three web platforms: ASP. NET, Java EE and lamp each have advantages and disadvantages to meet different needs and users. The three comparisons were 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 (recommended)





Five or three pictures tell you how the Web works



1, the server does not have the application and the database, requests the HTML file directly












2. Server with application (e.g. PHP)












3. Server with Application and database (popular)








 






Reference:



Http://www.jb51.net/article/56605.htm



Http://jingyan.baidu.com/article/b0b63dbfc9a2874a483070c0.html








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.