MDA: A revolution in a software development method or a new vinegar in the Case Tools old bottle?

zhaozj2021-02-16  71

MDA: A revolution in a software development method or a new vinegar in the Case Tools old bottle?

I recently watched Martin Fowler's Weblog Previous post-model driver architecture. In this WebLog, Martin Fowler believes that there are currently two views on MDA: Some people think that MDA is a "mutation" after the software development self-assembly language to advanced languages; the other person thinks that MDA is just already Case Tools "昙花 一". Is MDA a revolution in a software development method, or is there a new vinegar in the old bottle of Case Tools? This problem has aroused a debate. This article tries to further explore the MDA's current development technology from the history of retracting MDA and its current status.

MDA history and origin

MDA (Model Driven Architecture, Model Drive Architecture) is the new software development framework that OMG is currently launched. The launch of this framework has brought a "earthquake" to the entire software industry, perhaps the primary platform technology such as J2EE and .NET. The rapid development is more suitable for "earthquake", and MDA is more like a "earthquake" facility. It isolates us from the "strenuous vibration" of the underlying platform, protects our business logic building. "Enron, so that we can calm down when the impact wave generated by a round of a round of the platform technology. It will have a profound impact on the future of software technology, how is its "source"?

In the past ten years, OMG standardizes OBJECT Request Broker and a series of object service frames (ie, called CORBA architecture). Since 1995, OMG began informal adoption of technical specifications and industrial-related technical specifications, and was formally working in 96.97. At the same time, further expanded the work range under the leadership of Mary Loom, which leads to the production of the UML modeling language, and the 2001 OMG organization further adopted another frame - MDA . Of course, MDA is not like the CORBA framework is used to implement distributed object systems, but a way to use models in software development. Looking back at the history of MDA, we can see that the huge success of UML has laid a solid foundation for MDA, and it also feels that in the long road from software technology to software engineering, MDA is just moving forward. Small step, but it has set off a wave of the entire software industry, which will have a profound impact on future IT technology in many ways definitions and development processes.

The MDA is derived from the idea of ​​separating system operations from the system of manipulation from the system. The MDA provides a way to standardize a platform independent system and standardize platform. The system selects a specific implementation platform and converts the system specification to a specific implementation platform. The three main objectives of MDA are: lightweight, interoperability, and reusability by architectural separation.

What is MDA?

What is MDA? In short, it is a series of frameworks around the support model drive development process, including: Unified Model MOF (Meta Object Facility), XML metadata exchange XMI (XML Metadata Interchange), public data warehouse meta model CWM (Common Warehouse Metamodel), etc. This is defined in the "Application MDA" book in David Frankel: MDA is to use the modeling language as a programming language, not just as a design language. Programming with modeling language can improve productivity, improve quality, and make software products longer. MDA divides the model of the software system into: platform-independent model PIM (Platform Independnt Model) and platform-related model PSM (Platform Specific Model), and they link between the corresponding conversion rules. PIM is a pure analysis model that does not consider the specific implementation technology. PIM is reusable at this level, further improves the abstract level of the software system through PIM, and also shields the impact of changes due to the change of the underlying platform; PSM As the name is a model associated with a specific platform system, which is based on a particular implementation technology, such as J2EE. During the development of the MDA mode, first build PIM using the platform-independent modeling language, then convert the PIM into the PSMS associated with a particular platform according to the specific implementation platform and language conversion rules, and finally generate the final application by the code generation tool. Program code and test framework.

MDA mainly includes two aspects:

1. Framework of unified management metadata

2, can be executed model and code automatically generate

First explain a few related important concepts before further illustrate:

Metadata: The data used to represent the model. For example: a UML model; a CORBA object model expressed in IDL; a relational database mode with CWM expression, etc.

MetaModel: The so-called metamod is a model of the model.

Because MOF is the basis of the entire MDA architecture system, it is necessary to explain what is MOF? See what David Frankel is saying: "Mof (meta-object facilities) is a sister standard of UML. It is essentially a constraint subset of the UML class modeling structure. You can use it to create a modeling The model of the language. MDA can handle the model described by the style of the language, as long as there is a MOF element model of this language. "If you talk about David Frankel, some is: MOF is a defined modeling The modeling language of the language. MOF defines different modeling language standard specifications in accordance with different purposes. For example, for a general OO modeling, UML is defined; for exchange service data purposes, CWM, and the like are defined.

1. Framework of unified management metadata

In order to unify the sharing of metadata between the distributed heterogeneous system, one of the MDAs is to establish a framework for unified management metadata. The MDA is manifested by managing metadata by MOF-based four-layer element frame structure, as shown in Figure 1:

Figure one

among them:

M3 layers: Element element model layer, that is, the meta model of the element model, there is MOF on this layer.

M2 layers: meta-model layer, modified by MOF for different fields, such as UML, CWM, XMI, etc.

M1 layer: Model layer, this layer is made by the model of the M2 layer to make specific modeling examples. For example: modeling of a specific business entity, etc.

M0 layer: Implementation layer, this layer is a specific implementation of the model created by the M1 layer in a particular platform, that is, the executable application system we finally obtained.

The MDA has achieved the definition, exchange, storage, and sharing of metadata through this metadata management framework, thereby realizing sharing and exchange between the metadata between heterogeneous systems, achieving the heterogeneous system Interoperability.

2. Executable model and code automatic generation

To make the model be implemented, you must first enable the modeling language to have a precisely defined semantic. The so-called semantic refers to the "interpretation" of the software model in runtime, similar to, for example, which object is created? When is created and created? It should be noted that "accurate" here does not imply "detailed" meaning, it just explains that the model has only a possible "explanation".

What is the code automatically generated? Briefly, from the model automatically generate semantic programs, of course, the MDA tool also provides the ability to manually modify the code generated, but you need to pay attention to: 1. The generated code usually contains some and models The structure is closely related to some "unableable" code; 2. This modification is likely to mean that the model cannot be recreated. Although there are two signs of scruples, it is still necessary for the ability to manually modify the ability to generate code from the consideration of the factors such as code efficiency. Automatic generation of code also includes a plurality of aspects of incremental generation (i.e., only the portion of the model regenerates only the part regenerable in the model) in the model.

MDA is an improvement in software abstraction level

OMG launched MDA's aim to try to upgrade software development behavior to a higher level of abstract level - model level, and transfer the encoding work of a particular platform from the machine to generate, to achieve the business logic and underlying of the separation problem domain The purpose of the specific implementation platform. So let's take a look at what is the software abstraction level?

Grady Booch is the definition of software abstraction: "That is some aspects of Java, C # and C trying to achieve, every aspect will make us more away from the redeeined hardware and actually allow us to express some things, in the expression During these things, we extend these things through the number of steps until the bottom of the hardware. This allows us to seek the problem of the problem domain rather than from the perspective of the machine. "Definition of GRADY BOOCH Although it is a bit embarrassing, it tells us that a fact that the abstract level must separate the business logic and the underlying specific implementation platform of the problem domain, the platform-independent model PIM is a big step toward this direction.

Differences in MDA and Case Tools

Let us return to the debate you mentioned in this article. With regard to the differences between MDA and Case Tools, Frankel is described in this: The nature of MDA is not code generation, although code generation is considered to be major achievements. MDA can also be implemented by constructing virtual machines that can directly perform models.

There are mainly two differences in MDA and Case Tools. First, in the Case Tools era, we need to model both frameworks and business processes, and the current situation is that there are many mature popular implementation frameworks. We only need to concentrate on our business processes, don't care The system implements the framework. Second, many related mature modes from PIM to PSM have been utilized, these modes can convert some of the usual business models into some mature implementation frames on a particular platform. In the Case Tools Times, the concept is still immature and is not widely understood. We need to model our problem domain, but also create some implementation modes, which makes the abstraction process of the entire system is too complicated. The MDA is a product of the building above the mature implementation mode, which simplifies the abstraction process of the entire system with successful UML technology and mature mode technology, and improves the abstraction level. MDA is not a "silver bomb", but greatly improves software development efficiency

Developed a famous MDA development tool Optimalj's COMPARE has entrust the Middleware to study a case: two teams develop the same application, one of which uses MDA and the other is not used. This case can also be regarded as a comparison of model-centric development methods and code-centric development methods. In order to facilitate fair comparisons, the case chosen is a well-known J2EE PETStore application, which is a simple web-based J2EE e-commerce system that basically represents today's mainstream applications. The final result of the two teams is as follows:

Development hours count statistics for each team

team

Initial estimation hours

Actual hours

Traditional team

499

507.5

MDA team

442

330

The result is amazing, visible from the above, the MDA team has an absolute advantage in efficiency, and the efficiency has increased almost 30%, which has not calculated the familiarity and learning tool time necessary for the first time using the MDA method. The MDA method can greatly improve software development efficiency, which is unquestionable.

Current Situation of MDA Tools

At present, the situation in the MDA development tool market is that due to the standardization of PIM to PSM conversion method, large manufacturers such as IBM, Borland are mostly cautious, although they have also provided part of the MDA function in their development tools, but There is no fully follow the MDA specification defined by OMG. Nonetheless, IBM provides an EMF (ECLIPSE Modeling Framework) in the open source project Eclipse, which is advocated in addition to the MDA feature in Rational, in addition to the MDA feature in Rational. This MDA code generation system project, which can be seen that IBM emphasizes the importance of technology in the development of MDA. Borland claims that they are also focusing on MDA technology and are preparing to configure MDA-based model auto-generating functions in TOGETHER. Compared to the cool and self-contained in the industry, some small and medium manufacturers are particularly active, like Interactive Objects, famous ArcStyler, Compware, famous Optimalj, and open source AndroMDA and other MDA tools that follow OMG standard specification have been in some projects. It has been widely used and has achieved remarkable results.

Conclude

MDA is not just "UML code generation", which brings us more about a way of thinking about problems and changes. It helps us consider the problems we face with "use case" perspective, which is constructed on the basis of UML modeling language. Although Martin Fowler is more inclined to the latter point, it is unquestionable that model driver development is indeed playing and will change our development system. We use David Frankel as the end of this article: "Our basic MDA's goals have been used for many years - before the word 'MDA' appears - applied to embedded and real-time systems. System based on Schlaer-Mellor It is used to generate embedded code for all kinds of electronic devices, generate millions of rows of C / C code from abstract models to complete complex telecom exchange. In some aspects, I can say compared to enterprise application systems, MDA is here. There is a more successful manifestation on the system. Since the embedded and real-time systems have succeeded, we will also succeed in enterprise development, we will wait and see.

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

New Post(0)