Public Resource Management and Sharing Subsystem - Public Resource Sharing Module

xiaoxiao2021-03-06  40

table of Contents

Abstract ...........................................................................................

I. Introduction ....................................................................... 1

(1) Development of public resource management and sharing subsystem ...................................................... 1

(2) Introduction to the application technology ............................................................................... 2

1. Introduction to Development Tools (Microsoft Visual Studio.net, C #, SQL Sever)

2. Key Technologies ADO.NET

Second, demand analysis ................................................................... 4

Third, system design ................................................................................... 5

(1) Architecture ................................................................................... 5

(2) Detailed design of public resource sharing module .........................................................

(3) The interface and source code of the WebService layer ...........................................................

(4) Optimization of software for systems ............................................................. 14

(5) Application example ...............................................................................................................

Four, conclusions .........................................................................................

5, thank you ...........................................................................................

Sixth, the main reference "and appendix .................................................................................

(1) Main references ...............................................................................................................................

(2) Appendix ................................................................................................................ 16

Appendix 1: Architecture Diagram .......................................................................................................

Appendix 2: Calling process of student information in public resource sharing module ...................................................................

Appendix 3: Calling procedure for the intermediate department information in public resource sharing module .....................................................................

Public resource management and shared subsystem

- Public Resource Sharing Module

Shuai Linna

School of Computer and Information Science, Southwest Normal University, Chongqing 400715, China

Summary Public Resource Management and Shared Subsystem provides public data resources most commonly used in MyCollege.net, and application systems can use these data resources through network controlled. Different application systems have different access rights for different resource types and resource properties. Such various application systems will have strong flexibility, developers can develop corresponding data access schemes for future operating environments (such as network conditions, etc.), reducing data redundancy, enhancing data updates Synchronous, cross-platform sexual aspects of data is used.

Abstract The system of common resource management & share provides common data resource for kinds of application systems in Mycollege.Net. In control of qualification, application systems can use these data resource by network .Different application systems have their access qualifications for different resource types and resource attributions. So, programmers can flexibly develop various application systems and they also can design proper data access scenarios in according to the running environments in the future (eg the statements of network) .Besides these advantages, our system can reduce data redundancy, enhance The Synchronization of the Data Update and Application Systems CAN Use Data in Different Develop Environments. Keywords Public Resource Management Share Information Permissions

I. Introduction

Public resource management and sharing system modules are completed by our team together. Among them, the public resource management module, database design and partial data access layer are completed by Zheng Yifen; public resource sharing module, permission control and part of the data access layer are completed by Shuai Lenna. Other work is completed by our two.

(1) Development of public resource management and shared subsystem

Public resource management and shared subsystems are mainly managed by student information and departmental information. Each management system in the school requires information on students or institutions. For example: library management system, school computer room management system, tuition fee management system, etc. If you have student information in the database of each management system, then the same work needs to be repeated. This will not only cause waste of resources, increase the difficulty of system development; and it is prone to data redundancy and inconsistent data access. We develop this system to address these problems.

The development of this system is based on WebService mode. The goal is to achieve centralized management of public resources, and public resources are implemented through networks in different systems and different platforms. Other management systems simply call the public call interface provided by this system to directly access the required public resource information, and there is no need to design this database. On the other hand, it is possible to avoid resource waste and data redundancy caused by public resource information, and also simplify the development of other management systems.

(2) Introduction to the application system

1. Introduction to Development Tools

Microsoft Visual Studio.net is a full range of development platforms that use it to develop general applications, database applications, hardware drivers, or web-based applications. Visual Studio.net contains different languages ​​such as Visual Basic, C / C , and C #, and developers can choose from what language to be used as needed, of course, it also provides integrated functions between different programming languages, such as COM . In addition, in Visual Studio.NET, it also provides visual development environments, and you can quickly complete the interface design of the application. For this system we use C # in Visual Studio .NET as a development language.

C # is an object-oriented programming language. Its basic syntax is the same as C / C , which divides the logic of software development into 5 Most: Business Facade, Business Rules (Business Rules), Data Access Layer (DataAccess), Model layer, etc. This logic division makes the software development more convenient and separates the accesses of the statement and the database, and the business rule layer separates the rules separately for software extension and maintenance. Microsoft SQL Sever is a high-performance client / server relational database management system. There are many important new features, such as transparent distributed processing, concise management, object design interface based on object embedding and linking technology (0le), and integration with the Internet. The most important reason for choosing Microsoft SQL Sever is due to its scalability. Because Microsoft SQL Sever is a multi-threaded parallel database core, it can exert advantage of additional processors. In many cases, only support for symmetrical multiprocessing technology can be obtained using a specific parallel database and operating system. Of course, it also has high security and effectively protects user data.

2. Develop key technologies used in this system

The code written in this system fully adopts object-oriented programming idea, many of which are packaged and inherited. Our entire system mycollege.net uses. NET technology as the main development technology, as a module in myCollege.net - public resource management and shared subsystem, the functionality of its implementation determines its needs management There is also a lot of data, which is available to users. In order to ensure that users can efficiently and accurately call data, we use three-layer build mode and adopted ADO.NET technology in the data access layer.

Introduction to ADO.NET Technology

(1) ADO.NET programming foundation:

ADO.NET is an object responsible for data storage in the .NET Framework platform.

(2) What is ADO.NET technology and use?

ADO.NET is subsequent version of Active Data Objects2.6 (ADO). The main purpose of ADO.NET is to create a distributed data sharing app in the .NET Framework. ADO.NET is based on an XML industry, just like ADO, it provides a data access interface to communicate with OLE DB compatible data sources, such as SQL Server or Oracle. Applications can connect these data sources using ADO.NET and retrieve, process, and update data.

You may have learned ADO, then you have to learn new data access object model when you work in the old version. If necessary, you can use ADO in Net.Framework, but you need to pay some performance for COM layers. In addition, Net.Framework does not support COM Variant data types, which is the Field object in the Recordset object. Value data type, that is, if you use the ADO Recordset object in .NET, in order to access data, NetCLR often converts each field, if you want to access data, do these types of conversions will cause too much System overhead.

The most important reason to use ADO.NET is to obtain a truly disconnected data architecture and XML's tight intending and a universal data representation, you can combine data in various data sources and optimize and Database interaction features, the same part of ADO.NET and Net.Framework is closely integrated together, and take advantage of the layer structure and design patterns of all objects in Net.framework. ADO.NET is based on ADO, and many tools are provided for the data access tool set. (3) Features of ADO.NET

(a) ADO.NET uses a data structure that is not connected;

(b) Data is cached to the data set;

(c) The data set is independent of the data source;

(d) data remains XML

Data needs to move from the data store to the data set and move from the data set to various components, in ADO.NET, the format of traditional data is XML. Similarly, if data is required, store it as an XML, if there is an XML file, you can use it like any data source and create a data set from it.

In fact, in ADO.NET, XML is the basic format of the data, the ADO.NET data API automatically creates an XML file or stream in the data set, and sends them to another component, the second component can call similar The API reads XML back to the data set.

(e) Provide more conveniences based on XML based on XML, XML is an industrial standard format. This means that your application data component can exchange data with any other component other in any other application, as long as the component is understood as XML, many applications are written as understanding XML, providing unprecedented levels to exchange between heterogeneous applications .

XML is based on text. The XML representation of data does not use any binary information, which allows it to send through any protocol, and most firewall will block binary information, but by formatting information into XML, the component is still convenient to exchange information . For most scenarios, you don't have to know the data in ADO.NET without knowing XML. The ADO.NET automatically converts data into XML or XML as needed to automatically convert data to ADO.NET as needed, and interact with data using normal programming.

(f) Architecture definition data structure

Although you don't have to know anything about XML, you can read and write the database and data sets, but there are also things that use XML just the standard you pursue. In the case of data design, when the data is not intended to access the data, it is, using metadata in ADO.NET, will use XML.

The data set is expressed in XML. The structure of the data set uses an XML architecture to define, as the data contained in the data set can be loaded from XML to XML, and the structure of the data set can also be used as an XSD architecture from the XSD architecture and serialization.

Most of the operations in ADO.NET do not have to delve into the architecture. Typically, the Visual Studio.NET tool will be able to operate in a visual designer and generate and update the architecture as needed.

Second, demand analysis

Function description

The public resource management and shared subsystem mainly completes the three functions of student information management, departmental information management and sharing rights control.

1. Student information management includes the following content:

(1) Student information: name, student number, gender, ID card number, professional, department, dormitories, dormitory address, home phone, surviving, home address, etc.

(2) Function module:

(a) Add information

(b) modify information

(c) Delete information

(d) inquiry information

2, the department information management includes the following:

(1) Department information: Contains the name, code, creating time, etc. The professional information is opened, including professional name, code, creating time, etc.

(2) Functional module: (a) Add information

(b) modify information

(c) Delete information

(d) inquiry information

3, access control:

All data access functions of the system will be disclosed to the outside through the network call interface, so that this is a pure open system. Different application systems can use data resources, but for different management systems, they are not the same as data permissions of this system.

(1) Permission control properties include: USID, resource type, attribute, readable, and writable of the application system.

(1) Functional module:

Readable properties: only contain query operation permissions. By the two properties of the USID and resource types of the application system, the user can determine that the user can only perform the corresponding query function, and the query returns the type and quantity of the relevant data is also determined by the USID and resource types of the application system.

Writable properties: contains an operation permission such as query, add, delete, modify. By the two properties of the application system's USID and resource types, the user has the permissions of the user above the above-related operations, but also determines which information is performed by the USID and resource types of the application system.

Third, system design

(1) architecture

In order to achieve two main functions of the system, we use three-layer design model: user interface layer, intermediate layer and physical database layer. Among them, the intermediate layer is also divided into: WebService layer, business façade, business rules, and database access layer (DataAccess). Business appearance layers and business logic layers can access database access layers. The business appearance layer is mainly for users, while the WebService layer is facing different application systems. The construction of this sub-system design structure refers to the architecture of the entire system, and is a simplification of mycollege.net architecture.

(1) Structure diagram, such as Appendix 1.

(2) The following describes the following:

(a) Business Facade (BusinessFacade)

It is mainly to package the distributed business logic in the package application, which provides a simple-stateless interface to the user. It is actually a precise description of the demand in the function interface layer, ie the functions in this class class fully express the functions involved in the demand. Thus, once the layer is designed, the developer representing the layer can develop independent interface using this layer.

In our subsystem, it is mainly for users who call the public data resource management module. When a user operates the public data resource through the interface layer, the module first passes it to the business appearance layer, and then the business appearance layer passes the user's needs to the database access module so that the database access module performs the corresponding Operation, then the business appearance layer responds to the value returned by the database access module. If the operation is successful, return to the user, otherwise returns an error message.

(b) BusinessRules

The BusinessRules layer is mainly expressing business rules. In this sub-system module, it mainly sets the user's permission rules for data resource sharing.

(c) WebService module

The WebService module is an open function interface. It mainly facing the application system for sharing this sub-system data resource. When an application is called public resources through the WebService module, the module passes the requirements of the application system to the business logic layer. The business logic layer applies its rules to first determine its access rights. If the authority allows, the business logic layer will The application system is transmitted to the database access module so that the database access module performs the corresponding operation. The WebService module then responds to the value returned by the database access module. If the operation is successful, return to the user to the user, otherwise returns an error message.

(d) Database Access Module (DA)

The main function of the database access module (DA) is to perform various operations directly to the database, such as adding new information to the database, deleting some of the information in the database, querying information and modifying information in the database, while executing The situation returns a corresponding value. (e) Physical database

All public resources are stored in a physical database.

(2) Detailed design of public resource sharing modules

1. The process of calling the student data resource in the public resource sharing module see Appendix 2.

According to Appendix 2 as follows:

When the external system is to share the student information in this system, it first calls the corresponding function interface in the WebService layer via the Internet. WebService is judged by this module. If passed, the access command is passed to the business logic layer (BusinessRules). The business logic layer is judged with all its rules to deliver the relevant information passed to see if the external system has the right to share the required student information. If this permission is not allowed, it is not allowed to be shared, and the information that is not allowed to return; otherwise the business logic layer passes the sharing of the external system first to the buffer layer, if the required information in the buffer layer is directly returned This information, otherwise you have access to the database access layer according to the access procedure in the public resource management module, which is performed by it. When the database access layer gets these student information from the system database, it returns a successful information. Finally, the WebService module makes a corresponding feedback to the external system. At this point, the system implements the functions of student data resource sharing.

2, the process of calling the departmental data resources in the public resource sharing module see Appendix 3.

According to Appendix 3 as follows:

When an external system is to share the system information in this system, it first calls the corresponding function interface in the WebService layer via the Internet. WebService is judged by this module. If passed, the access command is passed to the business logic layer (BusinessRules). The business logic layer is judged with all its rules to deliver the relevant information passed to see if the external system has the permissions of the required department information. If this permission is not allowed, it is not allowed to be shared, and the information that is not allowed to return; otherwise the business logic layer passes the sharing of the external system first to the buffer layer, if the required information in the buffer layer is directly returned This information, otherwise you have access to the database access layer according to the access procedure in the public resource management module, which is performed by it. When the database access layer is acquired from the system database, it returns a successful information. Finally, the WebService module makes a corresponding feedback to the external system. At this point, the system implements the functions of the departmental data resource sharing.

(3) The interface and source code of the WebService layer

1, the interface of StudentService in the WebService layer:

2, the source code shared by the departmental data resource in the WebService layer is as follows:

Namespace WebService

{

[WebSpace (Namespace = "http://mycollege.swnu.edu.cn/cResource/webservice")]]

///

/// DEPTMAJORSERVICE's summary description.

///

Public Class DeptmajorService: System.Web.Services.WebService

{

///

/ / When adding a new college, call this function

///

/// College name

/// If the college is successful, return true, otherwise return false [WebMethod]

Public Bool Adddept (String Dept)

{

IF (0

Return True;

Else Return False;

}

///

// / When a college adds new major, call this function

///

/// Professional name

/// College name

/// add new majors to the designated college, return true if it is successful; otherwise returns false

[WebMethod]

Public Bool Addmajor (String Major, String Dept)

{

IF (0

Return True;

Else Return False;

}

///

/// Set a single message of a college, repeat multiple times to set up all basic information about the college

///

/// College name

/// Single information name required to set

/// Specific information value

/// ) Returns true if the single information setting is successful; otherwise returns false

[WebMethod]

Public Bool setDeptsingleinfo (String Dept, String Field, Object Info)

{

IF (0

Return True;

Else Return False;

}

///

/// Set a professional single message, repeat multiple times to set all the basic information about the students.

///

/// Professional name

/// Single information name required to set

/// Specific information value

/// ) Returns true if the single information setting is successful; otherwise returns false

[WebMethod]

Public Bool SetmajorsingleInfo (String Major, String Field, Object Info)

{

IF (0

Return True;

Else Return False;}

///

/// Delete a college, all information about the college will be deleted, calling this function should be very careful

///

/// College name

/// Returns true if the college is deleted; otherwise returns false

[WebMethod]

Public Bool RemoveDept (String DEPT)

{

IF (0

Return True;

Else Return False;

}

///

/// Delete a professional, all information about this professional will be deleted, calling this function should be very careful

///

/// Professional name

/// Returns true if the professional deletion is successful; otherwise returns false

[WebMethod]

Public Bool Removemajor (String Major)

{

IF (0

Return True;

Else Return False;

}

///

///

///

/// Student's professional name

///

[WebMethod (cacheduration = 60)]]

Public Dataset ListAllDepts ()

{

Return New DataAccess.deptmajors (). ListAllDepts ();

}

///

/// When you need to quantize all the professional information of a college, call this function.

///

/// College name

/// If the college exists, all professional information of the college is displayed

[WebMethod]

Public Dataset Listallmajorsindept (String Dept)

{

Return New DataAccess.Deptmajors (). Listallmajorsindept (DEPT);

}

}

}

3, the source code shared by student data resource in the WebService layer is as follows:

Namespace WebService

{

[WebSpace (Namespace = "http://mycollege.swnu.edu.cn/cResource/webservice")]]

///

/// studentService summary description.

///

Public Class StudentService: System.Web.Services.Webservice

{

#Region Add

///

/// Add a student to set the details of the student information to call the back setsingleinfo function ///

/// Student number

/// Student Name

/// Student gender

/// Student national

/// Student's professional

/// Student grades

/// Returns true if it is added; otherwise returns false

[WebMethod]

Public Bool Add (String Snumber, String Sname, String Sex, String Nation, String Major, Int grade)

{

IF (0

Return True;

Else Return False;

}

#ndregion add

#Region Remove

///

/// Delete a student, all the information of the student will be deleted, and the function should be very careful

///

/// Student's student number

/// Returns true if deleted; otherwise return false

[WebMethod]

Public Bool Remove (String Snumber)

{

IF (0

Return True;

Else Return False;

}

#ndregion remove

#Region setSingleInfo

///

/// Set a single information of the student, repeat multiple times to set up all basic information about the students.

///

/// Student number

/// Student's attribute, such as students' ID number, name, nation, etc.

/// Value of the student's attribute

/// If the information is set success, return true, otherwise return false

[WebMethod]

Public Bool SetSingleInfo (String Snumber, String Field, Object Info)

{

IF (0

Return True;

Else Return False;}

#ndregion setSingleInfo

#Region getStudent

///

/// Retrieve students through a student number

///

/// Student's student number

/// Enter a student number. If the school number exists, the information is displayed; otherwise returns an error message

[WebMethod]

Public Dataset getStudentBysNumber (String snumber)

{

Return New DataAccess.students (). getStudentBysNumber (SNUMBER);

}

///

/// Restaurant through the name fuzzy

///

/// Student's name

/// Enter the name of the student. If the name exists, you will display all the information called this name; otherwise returns an error message

[WebMethod]

Public Dataset getStudentBysname (String sname)

{

Return New DataAccess.students (). getstudentBysName (SNAME);

}

#endregion getstudent

#Region ListStudents

///

/// According to professional, grade batch retrieval

///

/// Professional name

/// Grade

/// If the professional name and grade entered, all relevant students' information is displayed; otherwise returns an error message

[WebMethod]

Public Dataset ListStudentsBymajor (String Major, int grade)

{

Return New DataAccess.students (). ListstudentsbyMajor (Major, grade);

}

///

/// According to the college, grade batch retrieval

///

/// College name

/// Grade

/// If the entered college name and grade exists, the information of all related students is displayed; otherwise returns an error message

[WebMethod]

Public DataSet ListStudentSByDept (String Dept, Int grade)

{

Return New DataAccess.students (). ListstudentsByDept (DEPT, GRADE);

}

///

/// Search by grade

///

/// Grade

/// If the original level is entered, the information of all relevant students is displayed; otherwise returns an error message [WebMethod]

Public DataSet ListallStudentSbyGrade (int grade)

{

Return New DataAccess.students (). ListallstudentsbyGrade (grade);

}

///

/// Batch Search for students' information from the entire school

///

/// Show all students' information of all students

[WebMethod]

Public Dataset ListStudentsIncollege ()

{

Return New DataAccess.students (). ListallstudentsNCollege () ;;

}

#ndregion liststudents}}

}

(4) Optimization of software for systems

Since the amount of information managed in this system is relatively large, there are both student information that has information. Therefore, the network transmission is quite large, especially when the application system is shared, it needs to transmit a large amount of information over the network. Therefore, the system running speed is limited. Therefore, we must optimize this system to enhance the operating speed of the system to a certain extent, enabling more rapid response to users and various applications. We will optimize this system from software.

1. Cap the data in the WebService module:

Since one of the functions of this system is to publish a function interface to the outside world so that each application share the required public resources through these function interfaces. If only the public resource is stored in the physical database SQL Server, each resource share needs to transmit a large amount of information from SQL Server to the database access layer, and then transferred to the business logic layer, the WebService layer, and finally the application system . In this way, the traffic volume is quite large, not only slow, and the reliability of information is also reduced, and the information is extremely easy to lose or errors. So, for the WebService module, we will open a certain amount of storage space in memory, which is high, and data with high update frequencies is stored in the cache. Such certain data are stored both in the physical database and stored in the cache. Although the system's overhead is increased, it has greatly improved system performance. Because when the application system needs to share some information, you don't have to access the physical database directly, but first check if there is a need in the cache cache in Cache, if there is, then cache hits, you can share information in cache Otherwise, access the physical database. This reduces the network access time. In order to improve the access priority of Cache, we can set the priority of Cache to high and set it to 0. At the same time, in order to maintain data consistency, when the information in the database changes, we will modify the information stored in Cache in accordance with new information in the database to achieve data consistency.

2, the database access layer and the physical database have two ways: offline connection and non-off-line connections. Since the amount of data is large, if the non-off-line connection is used, the connection between the database access layer and the physical database, at this time, the system's running speed is very slow. So we use offline connections. When you need to access the database, the connection between the database access layer and the physical database is dynamically established, and the connection is disconnected after the access is complete. In this way, the amount of transmission of the network is greatly reduced, and the speed of the system will also increase accordingly. At the same time, in the database access layer, use DAB to connect to the physical database, which simplifies the complexity of programming. (5) Application example

In order to use and test the functions and performance of "Public Resource Management and Sharing System", we can develop a student status management system based on CRESOURCE. Because our integration of our entire system is based on WebService mode, the student status management system is to use the StudentService service provided in CRESOURCE to manage basic information. In the student management system, the relevant information of students enrolled, transparent, decided, sedage, and completion of the date of completion, and the most basic information (name, gender, nation, etc.) of the students must pass. The StudentService service in CRESOURCE. From the overall data management system, there are two sources: one is a local database and the other is integrated from CRESOURCE through WebService technology.

Fourth, conclusion

All development processes of this system module are based on the idea and requirements of software engineering, demand analysis, system design, database design and coding are strict in accordance with objective analysis, and carefully design the purpose.

This system is developed in the Microsoft Visual Studio.NET, which is developed based on .NET-based C # programming languages, while using SQL Server 2000 databases to develop and design the database.

Due to the time relationship, we only have a complete database and public resource sharing this block and integrate with other subsystems. The rights management logic layer in the public resource management module and the public resource sharing module has not been implemented.

Through this graduation design, we recognize the importance of the theory and practice, and learn to apply new technologies to solve problems, such as our development environment and programming language never have never been exposed in the previous study, but through access Data and programming practice, we have now a certain understanding of .NET's performance and C # usage techniques. In addition, we have also experienced a key role in the effective operation of work. These will benefit us in future learning and work.

5, thank you

This graduation design can not complete the guidance and help of the teacher Zou Xiangchun, and the teacher, Chen Wu, Teacher Chen Wu, Xiao Xiao, Mr. Li also gave great help in this process, to help them Heartfelt thanks. There is also a team of all members to support me, thank you for their heartfelt thanks!

Sixth, major references and appendices

(1) Main reference

[1] Guo Sheng.C # .NET programming, Tsinghua University Press, 2002

[2] Jiamu Studio. C # Programming Thought, Machinery Industry Press, 2003

[3] Van Rurai ..NET Data Service C # Advanced Programming, Tsinghua University Press, 2002

[4] Barwell .vb.NET Advanced Programming, Tsinghua University Press, 2002

[5] Zhang Li.SQL Server database principle and application tutorial, Tsinghua University Press, 2003

[6] Flash Dixin.SQL Server2000 Database Management, Beijing Hope Electronics Press, 2002

[7] Liang Fangming. SQL Server2000 Database Programming, Beijing Hope Electronics Press, 2002 (2) Appendix

Appendix 1: Architecture

Appendix 2: Calling process diagram of student information in public resource sharing modules

Appendix 3: Calling process diagram of hospital system information in public resource sharing module

转载请注明原文地址:https://www.9cbs.com/read-74029.html

New Post(0)