Small research - MVVM model based on the separation of front and back ends under the SpringBoot microservice architecture (2)

This paper is mainly based on the SpringBoot micro-service architecture, proposes the MVVM model with front-end and back-end separation, and conducts detailed analysis and research on it, so as to provide certain technical references for staff in related fields.

Table of contents

4 SpringBoot

4.1 Technology Development

4.2 Technical features

4.3 SpringBoot project construction

4.4 Directory structure

5 MVC model

5.1 Model principle

5.2 Model Analysis

5.3 Model Advantages

5.4 Model shortcomings

5.5 MVC Architecture of SpringBoot

5.5.1 View layer

5.5.2 Controller


4 SpringBoot

4.1 Technology Development

In the development of the software market at this stage, the Spring development framework has become the mainstream development framework type on the market. This is a software product based on the JEE form. The MVC framework launched later has also been applied to various types of Among the web products of , during the process of use, multiple version types have appeared successively, and different content has been formed in different versions. In such a processing mode, the update efficiency can be reduced in an all-round way. Therefore, the Spring framework launched at this stage is an innovative development of traditional software development, which solves a large number of configuration problems.

Secondly, in the research and development process of the SpringBoot project, the new framework system formed is to be able to carry out comprehensive innovation and simplified processing of various more complex configuration operation modes in the process of processing, so that it can be upgraded in the software In the process of development, various types of goals are successfully achieved. Secondly, it also needs to be treated as a microservice product of the project team during the processing.

In the current market development process, the framework system has become a very important development model at the moment, so it has received attention from many parties. In the process of design, it can greatly reduce the workload of research and development and ensure daily research and development In the process, the due research and development effect can be exerted and the functionality of the software can be improved.

4.2 Technical features

In the process of use, the application design can be carried out independently under this framework. In different Apps, there are separate application individuals, and it is also a Jar file type. During operation, as long as it can be used in Java After running, the corresponding software deployment can be carried out, and a certain amount of Tomcat can be embedded in it at the same time, which can greatly simplify the container deployment steps and actual requirements.

In addition, in the development process of the Maven project, it is actually a special project type. In the use of third-party plug-ins, related projects can be effectively used to effectively simplify the deployment volume.

In the process of Spring configuration, an automatic configuration method is formed. Therefore, in the actual configuration process, it can be basically based on the Java annotation method for automatic processing. This processing mode is very in line with the current automatic configuration requirements. This further enhances how configuration is handled. In the production process, it is first necessary to conduct targeted analysis and processing of indicators, health checks, external configurations, and other content. Secondly, it is necessary to realize the development of de-XML, so that the effect of the comprehensive configuration file can be fully canceled.

4.3 SpringBoot project construction

In the process of construction, it is essentially to combine the actual situation of the software to form an open source library core, so it is necessary to facilitate the deployment of various plug-ins to specific projects, and at the same time use the Spring method to carry out good projects. Development processing, and correspondingly provide an online project processing function. In terms of the functionality of online creation, it can realize the seamless connection between projects, and ensure the use of a good processing form to form a good connection method.

4.4 Directory structure

In the process of processing, it is necessary to clarify the storage location of the original sound code. Afterwards, the template and resource storage location of the previous view need to be further processed, and then stored in various resource files to form a good processing form.

5 MVC model

In the development and design process of various software, in order to improve the overall efficiency of software development, it is necessary to conduct comprehensive research and analysis on its products during the development process, so that through the summary and analysis of past software development, Carry out the refinement of targeted work experience, and secondly, in the process of designing, effectively control the amount of research and development costs, so that the staff can avoid the problems of heavy workload and repetitive work content in the software development process The emergence of the system seriously affects the development efficiency of the staff. In order to ensure the overall effect of software development, it is necessary to actively update its software comprehensively during the development process.

5.1 Model principle

Among the MVC technology, it involves models, controllers, views, etc. This is a way to make full use of the separation of business logic, data, and interface display in the actual use process to organize the composition of the code, and then effectively concentrate the business logic into one component. In the process of subsequent software improvement and software personalized design, it can effectively provide a convenient operation mode without additional reprogramming of the business, and it is a relatively effective operating mode. Secondly, in the process of processing, MVC is a system input type developed independently, so that in the process of processing and processing technology, its functions can be concentrated in a logical graphical interface, forming a good structural system.

5.2 Model Analysis

MVC originally existed in the desktop program, M is the model, V is the user interface, and C is the controller. In this way, the separation of codes can be realized during the use process, which realizes the corresponding in a program. deal with. For example, in the process of statistical data of the same batch, it is necessary to use histograms and pie charts for presentation. With the development of the current Web market, MVC has been widely used in many fields of the market, and has become the mainstream design method. Organizations under various open source frameworks have developed their own framework systems, so that High-efficiency software development and upgrades can be achieved.

5.3 Model Advantages

In the current MVC design model, its basic advantages are basically divided into low coupling, high reusability, fast deployment and high maintainability. In the process of daily use, it can be well applied to engineering management At the same time, it also has a more obvious advantage in market share.

5.4 Model shortcomings

This is a process in the MVC design model, often there is no clear definition, not suitable for small and medium-sized applications, which will lead to an overly complex structural form of the entire system. Secondly, in the process of design, the view will always be in an inefficient environment for the scope of the model, and the general advanced interface tools and the use of constructors do not support patterns.

5.5 MVC Architecture of SpringBoot

Based on the SpringBoot framework system, the MVC design method adopted can make good use of the model and simplify it on the basis of the traditional framework. In the project configuration work, the automatic configuration method adopted can make the SpringBoot framework system achieve the effect of efficient development.

In addition, the MVC design method under SpringBoot is also a functional chest lift based on various types of technical methods, which can basically be processed centrally by the Model during the data processing process.

5.5.1 View layer

In the design process of the view layer, a detailed and accurate definition on the website is adopted. To serve you from the point of view of interpretation, this is a Java template engine developed based on a new server-side. For different web environments, it can run stably, and it can also run in an offline environment. The Thumeleaf system currently being used is a way to achieve high-efficiency and high-level template design. It can be brought into the Htum workflow during its processing. In this display mode, the system can always maintain in a reasonable state. For example, in a static system, the coordinated processing under the overall framework is realized, and some plug-ins can be added at will in combination with the characteristics of the system framework. The use of this software at this stage has become a very important part of browser development tools.

For example, in the actual operation process, the Html template created under the project directory often needs to set an automatic retrieval template all the time during the actual operation of the system, and strictly record it in detail based on the name of the template. Secondly, when the controller calls the template, only using the string form can realize the setting and processing of the template name. In addition, in the process of calling, it is also necessary to ensure a good analysis of the controller, so that a good presentation of the system can be achieved.

5.5.2 Controller

This is a kind of user who needs the front-end to send processing and response requests to the system after the front-end view is designed, so that during the processing of the view, a certain server is always submitted. In accepting content, basically the C in MVC is a good controller. Secondly, in the process of communication, it is also necessary to maintain the function of the central hub at all times to avoid certain problems in the process of information transmission. Or in the process of processing, the formed processing method is unreasonable and needs to be transferred and processed later.

Guess you like

Origin blog.csdn.net/Dream_Weave/article/details/132134292