Papers Category:Computer Papers
- Computer Application Papers
Post Time:2013-1-31 11:38:00
[Abstract] In this paper, the system design methods to study the application of the three-tier architecture model, explained in detail the development of the B / S three-tier structure application system based on ASP.NET technology design ideas and steps, combined with an Invoicing System project development process as an example to analyze and design, introduction to ASP.NET-oriented application and realization of the three-tier structure of the object technology and management to provide reference material for the majority of small and medium enterprises. [Keywords] three-tier architecture, ASP.
In the application development process, the development of the two-tier architecture of C / S mode has been widely used application logic is usually only found on both clients and servers, it uses data resource access requests issued by the client and server end will return the results to the client's information delivery mechanism, system performance, upgrade and maintenance constraints with the object-oriented technology, hierarchical modeling technology and Web browser to navigate technology matures, B / S mode of multi-tier application architecture has been more and more applications application systems development mode from the original two-story structure, even to the three N-layer structure changes, mainly between the client and the server is a known application server layer or multi-layer application service program, so that the original integrated presentation layer processes and business logic processing bloated fat client to be released, and the evolution of the mode layer and business logic layer implemented separately developers the guarantee simple interface to provide users with the necessary functional operation of the premise, the main focus in the analysis of the system is the core business logic from C / S to B / S mode changes on the design and development, so that the original client maintenance work occurs earth-shaking changes. C / S mode application client management client program installed on each client computer system managers need, when the need to maintain the system, where a solution to the client's user problem, B / S mode simply user browser software (the software is usually installed in the computer system can be included with the operating system to automatically install all the procedures of application systems can be unified management and maintenance managers to focus on the server, which B / S three-tier structure in the multilayer structure model B / S system architecture is a popular architecture design patterns can greatly reduce the maintenance overhead. 3, which consists of the presentation layer, business logic and data access layer hierarchy The Microsoft ASP.NET full play to the characteristics of object-oriented technology, can easily achieve the three-tier structure of B / S system architecture, and greatly improve the development efficiency, enhance system maintainability and scalability. research based on how ASP.NET (C # technology to achieve the three-tier structure of the design of the application system.
2 three-tier architecture system model
Choose the right system architecture is a key to affect the entire system design architecture design to complete the definition and description of the package (subsystem, as well as packages and package dependencies between communication mechanism B / S mode three structure is a simple, mature and universal application of the application architecture, it application structure plan is divided into three relatively independent layers, including the user presentation layer, business logic and data access layer. every floor only to achieve the relatively independent function within the layer, and when any layer changes, as long as the interface between layers unchanged, other layers are not affected by the three-tier structure is a strict hierarchical collaboration, namely data access layer can only be the business logic layer access, business logic can only be the presentation layer to access user presentation layer will request sent to the business logic layer, business logic to complete the relevant business rules and logic, and data obtained access to the database through the data access layer return, and then follow the reverse order, the data is displayed in the user interface layer.
2.1 user presentation layer (USL
User layer, also known as the user interface layer, forms and components of the package man-machine interface, is a direct interface between application systems and system users. Mainly used to display the data sent over by the business logic layer dynamic information, combined with the use of HTML markup and stylesheets defined to achieve user data entry, followed by a simple checksum, sent via the data interface to Yewuluojiceng download papers.
2.2 Business Logic Layer (BLL
Mainly complete package of business rules and logic applications business logic layer, layer access provide function calls for the user, which in turn access the database by calling the function provided by the data access layer to the business logic layer is mainly based on the system design the needs of key object class by building a system to achieve most of the logic of the system control functions.
2.3 Data Access Layer (DAL Data access layer can only be the business logic layer access, and the system only through its access to the database to get the data.
Complete database records extracted from the database when the data access layer under the requirements of the business logic layer to interact with the database query and insert , modify and delete database records updated data capabilities. well-known database access dynamic information management system is the most frequent, the most resource-consuming operation, it is necessary to optimize the database access policies to improve the performance and reliability of the system. / S three-tier structure of the model is a strict hierarchical definition of first complex application systems development work is divided into relatively simple small-block system corresponding layer, and then only in each layer of the functional design layer the interaction between the corresponding function module from an adjacent layer of the call, the transmission of information to be transmitted only by the interface. The data access layer generally consists of two parts: the standard terminology of business entities and data manipulation.
Provided by Microsoft called the business entity components and data access logic components in the three-tier structure, the data access layer is only dealing with the database layer , so the design is to try to improve the speed and security goals.
Business entity components reflected in real life, business data, data access logic components in the database retrieve data or business entity data is saved to the database. Posted in the free papers Download Center http://www.hi138 the. com 2.3.1 data access logic components Data access logic components, simply components operate on the data in the database, and the data required for operation of the business logic.
Data access logic components main function is as follows: (1 add records in the database. (Read database records, and the form of business entity data is returned to the caller. (3 the caller modify business entity data updates to the database. (4 to delete the records in the database.
Not all database tables by a data access logic components operation, in fact, a logical component packaging operation on a table in the database, or a group of related tables. The 2.
3.2 business entity components
Business model based on data in the form of business entity in the real life business entity attributes in the database table has a one-to-one relationship between each database access component corresponds to a business entity.
18.104.22.168 business entity characterized by (1 provides programmatic access to the business data and related functions.
(2 can use the data to create complex architecture, these general performance of complex data can be used as the input and output of the business processes associated with multiple tables in the database. (3 can be used as the input and output parameters of the business processes to deliver the overall data.
(4 business entity is not involved in transaction processing, is only part of the data in the transaction processing, transaction processing by the completion of the data access layer.
22.214.171.124 manifestation of the business entity Many forms in the application, the business entity data representation, object-oriented representation.
Including several ways. (1XML: Using XML string or an XML document object model. (2DataSet: DataSet is cached in memory one or more tables collection generally comes from a database or XML document. (3 custom business entity components: a self-defined libraries, the data used in the preservation of the business process.
Contains some of the data in the table fields and other public property.
In this paper, the third method: custom business entity components business entity data access component calls can also call the business logic layer, usually three-tier structure of the business entity is included in the data access layer, shown in Figure 1 shown.
Some systems on the business entity separate layer, as shown in Figure 2, this in two ways, the key depends on the designer's intent as well as the actual development project, this paper, the second form.
3 three-tier structure of the advantages and disadvantages
3.1 the advantages of the three-layer structure
(1 improve the maintainability of the program: the three-tier structured, once the run problems, you can quickly determine which layer is conducive to safeguarding.
(2 rational development: three layers in addition to calling other associated interface definition need only between the first three, the programmer can parallel development, improve the speed of development.
(3 improve system security: each has its security settings, even if the presentation layer is compromised, the next layer of security there protection.
(4 improve the scalability of the system: The greatest advantage of the three-tier structure is the in extended application system, part of changes will not affect the overall situation, such as to increase the functionality of the Oracle database to give this system, you only need to change the data layer can other layers remain constant.
3.2 the disadvantages of the three-layer structure Three-tier structure development model is a very obvious drawback is its execution speed is not fast enough.
Course of execution speed relative to the non-hierarchical application mode of development of the three-tier structure, does not apply to the implementation of The speed requirements are too harsh system, such as online booking, online stock trading, such as it is relatively easy to change the system of business rules apply to. 4ASP.
NET three-tier design and implementation Based on the above introduction of the B / S three-tier structure, the following references based on ASP.
NET technology, B / S three-tier structure, mode of development of the inventory management system design methods, introduce ASP. NET applications concrete realization of the three-tier structure. ASP. NET three-tier structure of the application directory structure shown in Figure 3, the directory BLL Business Logic Layer, DAL data access layer, DBUtility stored some common classes and methods, Model for the business entity layer, JXC user presentation layer.
In (1Model (business entity layer: are some of the attributes, business entities, attributes and database tables for one-to-one relationship, each database access logic components corresponding to a business entity. (2DBUtility public class: some database operations class library, which including pubconstant.
cs class (to achieve access to the database connection string from web.config, assistant class of DbHelperSQL.cs database, data access classes.
(3DAL (data access layer implementations: the corresponding table in the database table used operations, such as additions and deletions to common operations.
(4BLL (Yewuluojiceng achieve: create each class, and each category corresponds to each table of the database, complete the business logic of the data table, the procedure is called the data layer. (5JXC (user presentation layer: the preparation of the interface.
5 Summary The above describes the application based on ASP.
NET technology, three-tier architecture model to the design and implementation of the overall approach of the B / S structure application system. Introduce the specific hierarchical planning example, reflects the use of ASP. NET technology to write clear logic of the three-tier structure, and effectively to achieve a relatively independent of each functional layer in the system, the system has more powerful flexibility, scalability and maintainability, the grading distribution system hierarchical management deployment to become a reality, and can greatly improve the performance and safety of the system to meet the needs of growing B / S mode application system to learn from this method can also develop other types of enterprise application systems, and improving the level of information.
Main References  Li Huizong, Meng Xiangrui.
SME e-commerce system based on J2EE Design and Implementation [J]. Management of information technology in China, 2010 (1:109-111.  Hongqiong He Gang.
Analysis of the credit evaluation model in C2C e-commerce website [J]. Management of information technology in China, 2008 (11:96-98.  Liu Xiaoyan.
Based. NET technology, reimbursement of medical expenses Management System Design and Implementation [J]. Nanjing Radio and Television University, 2008 (2:70-73. Posted in the free papers Download Center http://eng.hi138.com