Abstract: In the case of a full analysis and comparison of B/S structure and C/S structure, the future development prospects are briefly described and a new architecture is proposed. Combining B/S and C/S, the component technologies COM+ and AcdveX technologies are applied to the server and client respectively to develop an efficient and secure application system.
In recent years, with the continuous development of network technology, especially the rapid development of Web-based information publishing and retrieval technology, Java computing technology and network distributed object technology, the architecture of many application systems has become more flexible from C/S structure. The evolution of the B/S multi-level distribution structure has brought the network architecture of the software system into a new phase. Knowing the characteristics of these structures and selecting the system according to the actual situation is very important for the successful development of a MIS system.
1 C/S structure and B/S structure
1.1 C/S structure
C / S structure, that is, Client / Server (client / server) structure. This structure puts the contents of the database on a remote server and installs the corresponding software on the client. The C/S software generally adopts a two-layer structure, and its distribution structure is shown in Fig. 1. It consists of two parts: the front end is the client, that is, the user interface (Client) combines the representation and business logic, accepts the user's request, and makes a request to the database service, usually a PC; the back end is the server, that is, data management (Server) submits the data to the client, and the client calculates the data and presents the result to the user. It also provides comprehensive security protection and integrity processing of data, and allows multiple clients to access the same database at the same time. In this structure, the server hardware must have sufficient processing power to meet the requirements of each customer.
The C/S structure is very mature in technology. Its main features are strong interactivity, secure access mode, low network traffic, fast response, and good processing of large amounts of data. However, the program of this structure is targeted development, the change is not flexible enough, and it is difficult to maintain and manage. Usually limited to small LANs, it is not conducive to expansion. Moreover, since each client of the structure needs to install a corresponding client program, the distribution function is weak and the compatibility is poor, and the rapid deployment installation and configuration cannot be realized, so the lack of versatility has great limitations. Technical personnel with a certain level of professionalism are required to complete.
1.2 B/S structure
The B/S structure, that is, the Browser/Server structure, is to install and maintain only one server (Server), and the client runs the software using a browser (Browse). It is a change and improvement of the C/S structure with the rise of Internet technology. Mainly using the mature WWW browser technology, combined with a variety of Script languages ​​(VBScript, javascript...) and AcTIveX technology, is a new software system construction technology.
The B/S three-tier architecture adopts a three-tier client/g server structure, adding a layer structure in the data management layer (Server) and user interface layer (Client), called middleware (Middleware), making the whole architecture Become three layers. The three-tier structure is accompanied by the maturity of middleware technology. The core concept is to use the middleware to divide the application into three different processing levels: presentation layer, business logic layer and data storage layer, as shown in Figure 2. The three levels of division are logically divided, and the specific physical divisions can be combined in various ways. As the basic platform for constructing the three-tier structure application system, the middleware provides the following main functions: responsible for the connection and communication between the client and the server, the server and the server; realizing the efficient connection between the application and the database; providing a three-layer structure application development , running, deploying, and managing platforms. This three-layer structure is independent of each other between layers, and any one layer change does not affect the function of other layers.
In the B/S architecture system, a user sends a request to a plurality of servers distributed on the network through a browser, and the server processes the request of the browser to return the information required by the user to the browser. The rest, such as data request, processing, result return, and dynamic web page generation, access to the database, and application execution are all done by Web Server. As Windows embeds browser technology inside the operating system, this architecture has become the preferred architecture for today's applications. Obviously B/S structured applications are a big improvement over traditional C/S structured applications.
The main features of the B/S structure are strong distribution, easy maintenance, simple development and strong sharing, and low total cost of ownership. However, data security issues, high server requirements, slow data transmission speed, and personalized software features are significantly reduced. These shortcomings are obvious to all, and it is difficult to achieve special functional requirements in the traditional mode. For example, it is difficult and inconvenient to perform a large amount of data input or report response and special print output through a browser. In addition, it is difficult to implement complex application configurations. Although it is possible to develop more complex applications using technologies such as AcTIveX and Java, the development of these technologies is complicated compared to the development of a very mature C/S application tool, and there is no fully-fledged technical tool for use.
Analysis and comparison of 2 C/S structure and B/S structure
2.1 Different hardware environments
C/S is built on the basis of the local area network and provides connection and data exchange services through dedicated servers. The users being processed are not only fixed, but also in the same area, requiring the same operating system. B/S is built on the basis of the WAN. The information is managed by itself. It has a stronger adaptation range than C/S. Generally, it is only necessary to have an operating system and a browser. The relationship with the operating system platform is minimal. For an unknown user base.
2.2 Different structure
The C/S software generally uses a two-layer structure, while the B/S uses a three-layer structure:
The difference between the two structures is that the client participates in the operation in the two-layer structure, and the client does not participate in the operation in the three-layer structure, but simply receives the user's request and displays the final result. Since the client in the three-tier structure does not need to participate in the calculation, the configuration of the client computer is low. Although BlS adopts a logical three-layer structure, the physical network structure is still the original Ethernet or ring network. Thus, the communication between the first layer and the second layer structure, and the communication between the second layer and the third layer structure all occupy the same network line, and the network traffic is large. The C/S has only two layers of structure, and the network traffic only includes the communication between the Client and the Server, and the network traffic is low. Therefore, the ability of C/S to process large amounts of information is unmatched by B/S.
2.3 Different processing modes
Compared with C/S, the processing mode of B/S greatly simplifies the client. As long as the operating system, network protocol software and browser are installed, the client becomes a thin client, and the server concentrates all. Application logic.
2.4 Component reuse is different
In terms of component reusability, the C/S program is considered as a whole and has low reusability. BlS corresponds to multiple structures, requiring components to have relatively independent functions and good reusability.
2.5 System maintenance is different
System maintenance is the most expensive part of the software life cycle. Due to its inherent integrity, the C/S program must examine and deal with the problems as a whole. With the B/S structure, the client does not have to be installed and maintained. The B/S structure only changes individual components in terms of component composition, and development, maintenance, and the like are concentrated on the server side. When an upgrade is required, it is only necessary to update the software on the server side without having to replace the client software to achieve a seamless upgrade of the system. This reduces the cost and effort of system maintenance and upgrades, and greatly reduces the total cost of ownership (TCO) of users.
2.6 Different security requirements
Because C/S adopts a paired peer-to-peer structure mode and adopts a network protocol suitable for LAN and good security (such as NT's NetBEUI protocol), security can be better guaranteed. C/S generally targets a relatively fixed user group. The program pays more attention to the process. It can perform multi-level verification of permissions, provides a more secure access mode, and has strong control over information security. Generally, the highly confidential information system adopts the C/S structure. B/S adopts the open structure mode of point-to-multipoint and multi-point-to-multipoint, and adopts TCP/IP as an open protocol for Internet. Its security can only rely on the management of passwords on the data server. Database to guarantee. Therefore, B/S has higher requirements for security and access speed than C/S. These key security issues in Internet technology are far from solved.
2.7 different speeds
Since C/S is one layer less in logic structure than B/S, C/S is faster than B/S for the same task. Make C / S more conducive to processing large amounts of data.
2.8 Interactivity is different from information flow
Strong interactivity is an inherent advantage of C/S. In C/S, the client has a complete set of applications, with powerful functions in error prompts, online help, etc., and can be freely switched between subroutines. Although B/S provides a certain interactive ability by javascript and VBScript, it is too limited compared with a complete set of client applications of C/S. The C/S information flow is single, and the B/S can process information such as BB, BC, BG, etc. and has a change in flow direction.
3 Architecture based on B/S structure combined with C/S structure
In summary, it can be seen that the two technologies B/S and C/S have their own advantages and disadvantages.
C/S technology is the mainstream development technology 20 years ago, and it is mainly limited to the needs of internal LAN. Therefore, it lacks some features as an application platform, and it is difficult to extend to the environment such as the Internet, and requires developers to deal with system-level problems such as transaction management, message queue, data replication and synchronization, and communication security. This puts high demands on application developers and forces application developers to put a lot of effort into solving problems outside the application. This complicates the maintenance, porting, and interoperability of applications and becomes a major drawback of C/S.
However, compared with the B/S structure, the development history of C/S technology is more "long". From the perspective of technology maturity and software design and developer mastery, C/S technology is more mature and reliable. In some cases, adopting 100% B/S mode will cause problems such as slow system response, high server overhead, high communication bandwidth requirements, poor security, and increased total investment. Moreover, for some complex applications, there is currently no suitable way to develop the B/S method.
Objectively analyzing the advantages and disadvantages of C/S and B/S, and establishing a network architecture combining C/S and B/S structures has become an inevitable trend. In the actual development and planning of the system, we must be targeted to build a suitable information system.
The design method is illustrated below by taking the school student management system as an example. The system adopts B/S+C/S architecture, combines ASP technology, and applies component technology COM+ and AcTIveX technologies to the server and client respectively. The implementation of the system is mainly divided into three parts: ASP page, COM+ component and database, which is a three-tier structure. The presentation layer consists of ASP pages, which are used to implement WEB page display and call COM+ components. The business logic and data access are composed of a set of COM+ components implemented by VC. In order to facilitate maintenance, upgrade and implementation of distributed applications, in the implementation process, the business logic layer and the data access layer are separated, the ASP page does not directly call the data access layer, but calls the database through the business logic layer. Some functional interfaces that need to be processed by WEB and satisfy most visitors' requests adopt the B/S structure. For example, the instructor can query the relevant information of the students in the class through the browser; the school administrators use the browser to the students of the school. Teachers and other information for management and maintenance and query statistics; the leadership can query and make decisions through the browser. This way the client is more flexible. The functions that only a few people use in the background use C/S structure, such as database management and maintenance interface. This way, the advantages of the various modes can be fully utilized - avoiding the shortcomings of the B/S structure in terms of security, confidentiality and responsiveness, and the shortcomings of the C/S structure in terms of maintenance and flexibility. The implementation of COM+ can be divided into three steps: the design of COM+ components, the generation and programming of COM+ applications. The COM+ component is located in the WEB application, and the client makes a request to the WEB SERVER. WEB SERVER passes the request to the WEB application. The web application passes the data request to the database server, which returns the data to the web application. The data is then transmitted by the WEB SERVER to the client. For some of the harder to implement features by embedding the AcTIveX control in the page.
The advantages of adopting this structure are:
(1) Give full play to the advantages of B/S and C/S architecture, and make up for the shortcomings of the two. Full consideration of the user's interests, to ensure that the browsing query is convenient to operate, but also makes the system update simple, simple and flexible to maintain, and easy to operate.
(2) The information is released using the B/S structure, which maintains the advantages of the thin client. The software loaded into the client can use a unified WWW browser. And because the WWW browser and network integrated server are based on industry standards, they can work on all platforms.
(3) The database side adopts C/S structure and connects through ODBC/JDBC. This part only involves system maintenance, data update, etc., and there is no shortcoming such as the large amount of client maintenance caused by the complete adoption of the C/S structure. And on the client side can construct very complex applications, the interface is friendly and flexible, easy to operate, can solve the inherent shortcomings of many B / S.
(4) For the original C/S architecture-based application, it is very easy to upgrade to this architecture by simply developing the WWW interface for publishing, and retain some of the original subsystems. This makes full use of the resources of the existing system.
(5) By embedding ActiveX controls in the browser, you can implement functions that are not implemented or difficult to implement in the browser. For example, the report responds with a browser.
(6) Divide the server side into two parts: the WEB server and the WEB application. The WEB application uses component technology to implement the logic part of the three-tier architecture to achieve the purpose of encapsulation.
The B/S structure and the C/S structure have their own advantages and disadvantages. How to combine the B/S and C/S development systems is a common concern in the development of MIS systems. In the application process, the selection and construction of the system should be carried out according to the actual situation and according to the actual situation, so as to develop an efficient and safe application system.