Software Development Platform
Outline Design
Directory
I. Requirements Overview
1.1 problem Overview
1.2 Business Analysis
1.3 Other requirements
Ii. System Analysis
2.1 runtime support environment
2.2 Development Support
Iii. Platform Operation Support
3.1 Client
3.2 Application Server
Iv. platform development support
4.1 Business Component Management
4.2 Interface Component Management
4.3 interface generator
V. System Application
5.1 permission management
5.2 General Data Integration tools
I. Requirement Overview 1.1 problem Overview
Technical capability has always been the bottleneck of development, and software development is one of the important factors. Through the introduction of new employees, platform development, and years of development experience, the software development situation has improved, but the problem has not been fundamentally solved. Mainly reflected in:
- Low software development efficiency and long development cycle;
- Low software quality and high system maintenance costs;
The reason for the problem is demand analysis and software design. The Reuse Rate in development is too low and repetitive work is too much.
A good platform solution will help solve the problem and further improve the development efficiency.
1.2 Business Analysis
The following figure shows how to create a business use case based on the development process:
You can draw activity diagrams Based on the development process as follows:
1.3 Other requirements
The company's next development step is to promote the "productization" of main products and shorten the project development and implementation cycle.
1.3.1 system model support
The application system is productized by analyzing the system and establishing the business model of the system. The platform must support system modeling and support model management and operation.
1.3.2 Multi-Layer Support
Application Systems are data applications, and data is the core of applications. Data access is an indispensable part of the application system and the most repetitive development. The platform must implement a multi-layer architecture to separate data access and form a data service, so that data access can be directly obtained from the service without programming.
1.3.3 reliability requirements
Application systems must be able to run stably for a long time at the user's site, and their reliability needs to be ensured.
1.3.4 System Efficiency
The application system is used in users' daily work. The speed must be guaranteed and cannot be too slow, affecting users' work.
Ii. System Analysis
Through the analysis of development requirements, we divide the development requirements for the platform into two aspects. One is to extract the common parts of the application system, such as data access and business management, establish a complete supporting environment for application system operation according to a certain architecture; second, manage the results of non-generic components, and emphasize program reuse and configurability, form component-centered development management and support.
2.1 runtime support environment
The running support environment is a common part of the system, which is solidified in the form of platform services to provide support for running the application system. The running support environment is divided into two parts: the frontend client and the backend application server.
The following is an example of the running support environment:
The activity diagram of the running support environment is as follows:
2.2 Development Support
Currently, software development and use are the fourth-generation development tools with excellent functions. The platform's support for development is based on the management of development results. The granularity of results is components, including business components and interface components. Through the management of development achievements, the reuse of programs is improved, and application system assembly tools are provided.
The activity diagram of system development is as follows:
Iii. Platform Operation Support
The running supporting environment is a general part of the application system and a public system, which is solidified as a platform and serves as the basis for running the application system.
The key to the operation support environment is the architecture. The architecture is based on a multi-layer structure, which is divided into the data access layer, business layer, and interface layer. It supports real separation of interfaces, services, and data.
Corresponding to Layer 3, the platform is divided into client and Application Server (including business layer and data access layer ).
3.1 Client
The application system consists of multiple forms/pages. What are the specific forms? This is determined by the user permissions. Each form/page is composed of interface components, which are also determined by the form configuration file. The Service Gateway provides services for the application server.
The following is a class diagram of the client:
The following figure shows the sequence of the client:
3.1.1 System Controller
The system controller is the container of the application system and is responsible for system loading. The application system is dynamic and determined by user permissions. The main functions of the system controller are user authentication, system initialization, and interface calling.
1. User Authentication
User authentication is also an interface application. According to the interface configuration file, the user login interface is initialized, the user name and password are obtained, the authentication request is sent to the server through the service network, and the returned user permissions are obtained.
2. system initialization
Initialize the main interface based on the obtained system files, mainly generating the menu system.
3. System Call
Provides system calls based on the menu system. For the selected call, the interface name is provided and submitted to the form controller for processing.
3.1.2 form (PAGE) Controller
The form (PAGE) controller is a form container that controls activities in the form. A form is composed of components. The form (PAGE) controller can also be considered as a special form component. It is responsible for loading other components, managing relations between them, and other operations. The main functions of the form controller are form initialization and form operation management.
1. Form Initialization
Find the corresponding configuration file according to the form name obtained by the Controller call, load the component according to the configuration, and initialize the component according to the configuration.
2. Form Operation Management
The form control adopts the MVC mode, and the Model-View-Controller (MVC) mode divides Domain Modeling, display, and operations into three independent classes based on user input. [Burbeck92]:
- Model. The model is used to manage the behavior and data of an application domain and respond to requests sent to obtain its state information (usually from a view, the command to change the status is also returned (usually from the Controller ).
- View. View is used to display management information.
- Controller. The controller is used to interpret users' mouse and keyboard input to notify the model and/or view for corresponding changes.
Figure 1 describes the structural relationship between the three objects
Both views and controllers depend on models. However, the model neither depends on the view nor the controller. This is one of the main advantages of separation. Such separation allows the model to be created and tested independently of the visual representation function.
In our architecture, components respond to user operations and pass the events to the form controller. The form controller uses a common command parser to act as a controller. The configuration file determines how events are handled. It defines the operational relationship between components. The controller implements operations between Interfaces Based on the operations defined by the configuration.
Example:
- When you press the "query" button, the button (Button set) component sends a button event and tells it the name "query ".
- Form controller, search for the configuration file based on the "query" event name to get the work to be done.
- Obtain the input query conditions (through its attributes) from the query condition input component );
- Pass the service name (model) and condition to the application server through the service gateway for processing and obtain the returned results;
- Use the returned results to update the dataset (view );
- Use a dataset (View) to update the display of result display components (such as a grid) (using the component method)
3.1.3 Service Gateway
The Service Gateway is responsible for handling the operations on the application server. The main function of service gateway is to establish connections, map service requests, and transmit Application Service requests.
1. Establish a connection
Establish a connection to the application service according to the system configuration file;
2. Service Request ing
The application server has its own interface, and the client can also define its own service request commands. The Service Gateway is responsible for the ing and conversion between customer request commands and Application Server interfaces.
In this way, changing the interface of the application server will reduce the coupling between the client and the application server as long as the ing program of the service gateway does not affect the original application.
3. Service Request
A remote call is used to send a service request to the application server, obtain the result, and send it to the requester.
3.2 Application Server
An Application Server is a collection of middleware. It provides an application system runtime environment to implement a multi-layer architecture of the system. Currently, the application server of the platform is composed of two parts: Public Data Access and business layer management.
The data access layer uses the data persistence design to support the persistence of objects to data, so as to realize automatic operations from business components (objects) to Data.
The business layer management has a complete business component management architecture that supports automatic calling of business components.
The following is a class diagram of the Application Server:
The sequence diagram is shown below:
3.2.1 Business Management
The management of the running business layer is mainly the dynamic execution management of business components, which is built on the Business Component Library (For details, refer to 4.4.1 ). The main function of business management is to call and execute business components.
The main work and process are as follows:
- Receives business requests;
- Find and load the correct business components in the Business Component Library;
- Execute business components;
- Pass the required data operations to the data access layer and get the returned results;
- Return the execution result to the requester.
3.2.2 data persistence
Data Persistence is built on the basis of ORM.
Object relationship ing (ORM) provides a conceptual and easy-to-understand Method for modeling data. The ORM methodology is based on three core principles:
Simple: data is modeled in the most basic form.
Communication: the database structure is documented in a language that anyone can understand.
Accuracy: Create a correctly standardized structure based on the data model.
Nhib.pdf is A. Net-based object persistence class library for relational databases. Nhibernate comes from an excellent Java-based Hibernate relational persistence tool.
Nhib.pdf persists your. Net object to a relational database from the bottom layer of the database. Nhib.pdf handles this for you, far better than you have to write SQL statements to access objects from the database. Your code is only associated with objects. NHibernat automatically generates SQL statements and ensures that the objects are submitted to the correct tables and fields.
When NHibernate is used, as long as the object is defined according to the NHibernate specification, nhib automatically completes the object-to-data ing to complete the required data operations.
Functions of nhib.pdf:
- Data Connection: nhibse can connect to most large database systems, such as ORALCE, SYABSE, and DB2SQL SERVER.
- Data Operations: perform various data operations;
- Object-to-SQL statement: An SQL statement is automatically generated based on the object;
The workflow of nhib.pdf is as follows:
- The application system uses (business) object operations and transmits the object to nhib.pdf;
- Nhib.pdf automatically translates object operations into SQL statements;
- NHibernate searches for available data connections in the connection pool. If not, it connects to the specified data;
- NHibernate execute an SQL statement on the data connection and obtain the result. The result is returned;
Iv. platform development support
In addition to basic and general application systems, there are also many business-related applications. Although the applications are different, there are many similarities, such as interfaces, interface elements, or business models.
To improve the efficiency of software development, it is necessary to increase the Reuse Rate of the program. To improve the program reuse rate, the key lies in the design and program framework, such as implementing the separation of interfaces and services, implementing business modeling, and achieving business atomicity.
On the other hand, how can we effectively reuse existing programs? It is also a way to improve the program reuse rate. We believe that the reuse of source programs involves too many factors and is not very effective. We should reuse the development results at a certain granularity and set it as a component. Through the reuse of mature components, we have realized the reuse of software.
In terms of platform software support, we take Component Management as the basis and system assembly as the ultimate application.
Component Management manages application development results in the form of components, which are divided into Business Component Management and Interface Component Management.
4.1 Business Component Management
The business component contains the business logic. If the component is created based on the object-oriented method, the component can also be seen as a business model. In this way, component management becomes the management of business models.
On the platform, business components (objects) can exist in two forms: solid business components and saved in the description file. The difference between the two is that the descriptive type is a simple business object, which is equivalent to a business object with only attributes. The real type can implement complicated business logic through methods.
The main functions of Business Component Management are simple business component generation and Business Component Management.
- A simple business object is generated by editing a Business Object (attribute) and generating a description file or an object source program. Of course, the source program must be manually added to the application system project and necessary modifications should be made;
- The business components used by the system can be regarded as a library and Business Component Management is to manage the business component library, including adding, deleting, and modifying, to maintain the business components available to the system.
4.2 Interface Component Management
The interface component is the element that forms the interface, as if the bricks are for buildings. On the platform, all interface components appear in Entity form. The relationship between the interface and interface components is described in the interface configuration file.
On the platform, interface components form the Interface Component Library. Interface Component Management is the management of interface component libraries, including adding, deleting, and modifying to maintain business components available to the system.
4.3 interface generator
Components can be effectively managed and can also support running environments, but it is not convenient to use for development. The interface generator is a tool that uses components to help with interface development.
The interface generator is a dedicated IDE (integrated development environment). It is centered on Component applications and uses components for selection, running, assembly, and debugging to form a specific interface. The result is saved as a configuration file.
The main functions of the interface generator are component view (including testing), interface assembly, and testing.
1. View Components
View the components in the component library and RUN them to see how they feel.
2. Interface assembly
Select components and select interface components and business components respectively;
Component Assembly interface, including attribute settings, such as location and size;
Test the interface, run the interface, and return to the front to adjust the dissatisfaction;
The complete interface and the tested interface are saved as the interface configuration file, including components, set properties, and operations (events) to be processed.
The sequence diagram is as follows:
V. System Application
System applications are some applications and tools provided by the system. They can be seen as special services. The business of the system itself is also platform-based and can be seen as a demonstration-DEMO of platform applications.
Basic System Tools include permission management and general data integration tools.
5.1 permission management
Permission management has three objects:
Is their class diagram:
A role is a set of users of a certain type and can also be considered as a special user.
There are some relationships between them:
- The relationship between users and permissions forms user permissions;
- The relationship between roles and permissions forms the permissions of a role;
- Users can inherit and modify the permissions of their roles;
Permission management is the management of these objects-users, roles, permissions, and their relationships, including adding, deleting, and modifying.
Another important feature of permission management is user authentication, which is used when the system is running.
5.2 General Data Integration tools
A common data integration tool is a common data application and can also be seen as a special service component. It can automatically convert the source object instance (data) to the target object (Instance) based on the defined source object and target object, and save the object.
Common Data Integration tools are mostly used in data integration. Database integration is used to integrate external system data into an application system, or send application system data to the required external system.