Model driver software development actual combat steps

xiaoxiao2021-04-09  432

Board bridge http://www.jdon.com 2006/5/24 (Reprinted please keep)

Some people say: This year is AJAX year, Ajax as a software system performance layer realizes technology, how can it be able to drive development modes for the model driving development mode? DSM, TOGETHER 2006, etc., all in 2006, so, in 2006, it is not too much in the field model. Because this is the beginning of a new year, the database era has passed. The field model is coming!

In the past, when we face a new business demand, we always set up a data sheet structure, which has gradually been replaced by model-oriented analysis design methods.

Use data sheet analysis requirements, unable to cover all demand for projects, such as the state of the system uniform design, eventually leading to each programmer to directly control the state of the system, leading to the entire system status to run confusion; use data sheet analysis, It is very easy to mix the entities and relationships together, causing analysts to confuse, and cannot correctly analyze the real basic entities of the system; use data sheet analysis, which will cause the software system to be coded-centered by the software system, and then generate traditional processes programming. Style, difficult to maintain and expand, even low performance, focus on the database server side, walk on the traditional large machine centralized computing mode, not distributed computing mode; use data sheet analysis to lose multi-layer structure In thinking that the middle of the middle layer, replying to the past two-layer structure, and more about the design model is applied.

The model-oriented model-oriented analysis design method, the system starts to establish a domain model Domain Model, and the relationship between them, and it can be submitted to the programmer to achieve the performance layer, business service layer, and persistence. Use JDON Framework (hereinafter referred to as JF) and other model driver frames, combined with model-driven engineering methods such as FDD, and complete a software development process correctly, and quickly high quality.

Below we are from analysis, design, and develop a few links to explain the latest software development models in the moment:

MDA step

Models modeling abstraction abstract refinement. Implement detail. Platform platform architecture selection, J2EE or .NET, J2EE Select how to architecture, the case we are selecting the Struts JDonFramework Hibernate architecture platform, so the current JF is a Platform section in the entire model drive development link. Model Transformation model passes, passes the model design to Java class code. The MDA Value proposition

DSM (Domain-Specific Modeling) Based on the above MDA, the reinforcing platform defines mapping and model mapping flexibility and self-living, not like MDA tools, and the factory is determined to die platform and technical details.

MDA Tools and DSM automate model-driven software development process, but in practice, more manual intervention, which demonstrates this process.

Model driver development of the forum system

First, we use the UML with example to completely clearly express a new system's demand, so that it can guarantee the correct modeling.

For example, the simple demand for a forum is as follows:

From this requirement, we need to discover the entity objects with certain content. Actor1 represents the user's role. It can be used to say "what person to do", we use the "things", as an entity object, may It is our domain model (Domain model), the speech case in the picture is actually understood as the user's speech, according to "What is the matter" analysis method, actually "user" (what person) "published" (do) "Speech" (things), we can sum up the "things" here is "speech", "speech" as entity object, which is Message (message post). "Statement" is actually the creation of the model Message, there is a must have been modified, and the change to reduce the crud function will have.

"Reply" is actually the creation of the Message object, but there is a father and son relationship. The same method can be analyzed from the "Browse forum".

The relationship between Forum and Message should be 1: N association, we use the following chart to express our model:

The Forum and Message extraction process are modeling modeling processes, with model class diagrams; through the Abstraction refinement process, with model initialization and refinement.

Through the Model Transformation process, the Java code of the model class:

Package Sample.forum.model public class forum {private string forumid; private string name; private collection message; // represents 1: N relationship (one-to-man) .....} package sample.forum. Model public class messageId; private string name; private string name; // Represents the N: 1 relationship of Forum .....}

With these two model classes, the business service interface around the model is also born, such as ForumService around Forum and MessageService around Message:

package sample.forum.service public interface ForumService {void createForum (EventModel em); void updateForum (EventModel em); void deleteForum (EventModel em); Forum getForum (String forumId); .....}

Since then, we have a domain model class and business service class. If you have used JF, we will find that the JDON framework is also the establishment of these two classes. Below you can use JF to quickly complete the increase of Forum and Message, and Batch two basic functions, see Step by Step Development JDonFramework Application Main steps.

Model driver development of warehouse system

The following is another way to develop a model-driven development process in ERP in the Warehouse Management System, and the warehouse is simple to use, for example:

Let's analyze the use of the warehouse with "What person do something", "finished product storage" How to decompose into "What do you do something?" We can understand this: Warehouse (what person) entry (do) library list (what is going on), so we refine the entity object "library"; and then from the "product data maintenance" function to extract "goods" model. "The finished product storage" is actually a new increase in "library", inevitably has "library" to increase the demand for CRUD functionality.

The class diagrams we build two models are as follows:

With class diagrams, through model refinement and implementation, we can have three models such as PRODUCT, which will also generate the service service interface around these three models. We can complete it quickly by using JF CRUD and bulk query. Basic features of the warehouse system. See the main steps of Step by Step Development JDonFramework Application.

to sum up

The above is a simple refining process of the field model, of course, in the actual project, it is not so simple, and it is not just a model's crud function, but we can grasp the model in complex system through a four-color graph analysis method. And business service functions, the general four-color map MI is implemented using business service service; Description is a domain model.

JIVEJDON 3.0 is a complex software system developed in accordance with the model driver's Idea.

As shown in the figure: Model and business service is established before a system architecture, so there is no model-oriented domain modeling analysis method, there is no Domain Model, there is no model object, there is no intermediate business layer, no intermediate layer, There is no design mode for design mode. Meanwhile The value object Vo is used as the storage object of the data table data. It is obvious that the object succumbers, and the analysis of the data sheet is designed. You are pushing the car when it is pushed, this object succumb to the data The table will result in a mess on the left side of the figure, and the right picture is because of the emphasis on the commander and leadership of the model, the entire system has become well:

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

New Post(0)