This paper analyzes the shortcomings of the traditional Web information system, expounds the MVC design pattern idea in detail, and analyzes the open source design framework that is widely used: struts and hibernate work principle, Based on the above analysis, this paper puts forward the idea of combining the two together to develop the remote sensing information publishing system, and finally combines DAO and factory design mode to realize the remote sensing information publishing system with good scalability, practicability and maintainability.
Keywords remote sensing data distribution; MVC design pattern; Struts framework; Hibernate mapping Tool
Introduction
With the rapid development of Internet technology, Web Information system is widely used. Remote Sensing information Publishing system refers to the remote sensing data information Publishing system based on Web. Over time, the traditional Web information system exposes a lot of problems, such as page logic, business logic and data logic mixing together, the system is high coupling, modification, maintenance difficulties, poor scalability. To overcome the above problems, new development methods have been proposed, such as software layering, MVC design patterns and so on.
This paper discusses how to construct the weak coupling, maintainable and extensible remote Sensing information Publishing system. According to the development of web technology, this paper puts forward a framework of struts with MVC design pattern in Java environment and hibernate frame of data persistence to develop remote sensing information publishing system, improve the practicability and flexibility of the system, and overcome the disadvantage of traditional web system.
MVC design pattern and open source framework
1. MVC Design Pattern
MVC design pattern is a well-known user interface software development design pattern, it is model-view-controller (model-view-controller) abbreviation.
The MVC design pattern was first proposed by Xerox in the 1980s for Smaltalk-80 language development, but this design idea was not confined to the language, but was widely applied to other object-oriented programming languages.
Figure 1 MVC Model component diagram
In the MVC design pattern, it divides the application into 3 core parts, as shown in Figure 1.
⑴ (model)
The model encapsulates the user data and the business logic that processes the data, reflects the current state of the application, and can provide a variety of user data status changes to multiple views that display the data. The model is the core of the application.
⑵ View
The view provides a user interface, a window that interacts with the user and the application, both accepting user input and displaying the model data status to the user, but the view is not responsible for any business logic, simply passing the user input data to the controller or displaying the model data to the user.
⑶ Controller (Controller)
The controller connects the model and view, depending on the user's request to determine which model to give the request to, and then calls the view to display the results of the user request after the model is processed.
The MVC design pattern layers The application, the view and the model are connected by the controller, which reduces the coupling between the user interface and the business logic, makes the program design clearer and more flexible, and improves the scalability and maintainability of the software.