Design and development of mode-driven in Xde (I.)

Source: Internet
Author: User
Tags abstract

Summary:

Software patterns, especially design patterns, are becoming more and more important in today's software development. The concept of patterns is introduced in a number of standards, tools, and development methodologies. This paper describes how to model software patterns in UML, and combines the specific tools rational XDE, describes how to define, how to apply the model in detail, and points out some related problems.

The first part: UML Representation of pattern

1.1 Software Model

The concept of software model (Software pattern) has a long history, the software industry from other engineering industries such as the construction industry to absorb the concept of the model, and its evolution into a software model, it is undoubtedly a revolution in the field of software engineering results. However, the classification and description of the GOF design pattern makes the concept of the model more nuanced and can be used in software development.

The so-called pattern, in short, is a successful solution to a particular, recurring problem. As far as the problem itself is concerned, any field or category can be made. In areas such as architecture, music, writing, management, and so on, there is a concept of patterns. In the area of software, patterns are presented in a form of agreed documents to facilitate recording, learning, and communication. Experienced programmers can transfer their knowledge through the patterns of this more formalized thing to others. Thus, patterns can be seen as a materialized, documented experience and knowledge.

In the nearly 10 years, the software model has developed greatly, it is not only an expression of experience, now can be used as a driving force for program development. The model-driven software development process (Pattern Based Development) is not a new thing. However, in today's software development field, a development idea, or process, without a powerful tool to support it, is difficult to get a wide range of applications.

The software pattern, in its abstract level, can be divided into the architecture pattern, design pattern and idiom three kinds.

1. Architecture Pattern: Provides solutions to the problems encountered in architecture design. Examples of architecture include: Pipe-filter mode, whiteboard mode, MVC pattern, orb mode, and so on. Architectural patterns are not necessarily object-oriented, and their ideas can be used for any development method. As a result, there are some difficulties in using UML to describe, and usually some specific proprietary descriptive methods, such as C2 (Component-connector), are used. There is less support for its tools, and most are still in the research phase.

2, design mode: To provide the object-oriented design of the specific problems of the solution, making the results of the design more good scalability and reusability. Generally speaking, the design pattern refers to the 23 models that are categorized in the Gof book. The design pattern has its design function, which is divided into three types: construction type, structure type and behavior type, including bridging mode, Factory mode, combination mode and so on. Descriptions of these patterns as well as tool support have been more mature. Now there are some case tools that support design patterns, such as togetherj,rational Xde. Among them, the support of Xde mode is the best. This article will discuss the pattern development in XDE in the following article.

3, customary usage (IDIOM): Is the use of specific language patterns. The main issue is how to use a specific method to solve the problems encountered in the process of code writing, how to better write program code. Usually a language, such as java,c++, will have a corresponding idiom. The abstract level of this model is relatively low and involves a specific language, which is not discussed here too much.

1.2 UML pattern Mechanism--collaboration, parametric collaboration

In earlier UML, support for schemas was not provided. With the increasing popularity of the model, the OMG has finally introduced new concepts to provide support for schema modeling (mainly design patterns) in the new version of UML.

People with a little familiarity with UML are very knowledgeable about collaboration diagrams (collaboration Diagram), which are one of the 9 largest views of UML and are used primarily to provide dynamic descriptions of models.

The concept of collaboration (collaboration) is not quite the same as collaboration diagrams. In an object-oriented model, a specific behavior is implemented by a group of objects and by message passing between objects. This model information is represented by collaboration. Collaboration depicts the interaction between a set of objects in a given context and the objects used to implement a particular behavior. It contains two aspects of structure and behavior, similar in structure to static view, containing a collection of objects (more specifically, roles) and their relationships. Behavior is a collection of messages that are exchanged between objects with a role, known as interactions (interaction). The static aspects of collaboration can be represented by class diagrams, and collaborative diagrams actually give some static model information, while dynamic descriptions are usually expressed using sequential diagrams (Sequence Diagram) or collaboration diagrams.

From this point of view, the pattern is a collaboration. For design patterns, it essentially describes the structure of objects and the interaction between objects--and applies such a collaboration to solve a problem. In UML, patterns are represented by a special collaboration, parameterized collaboration (parameterized collaboration).

In a parameterized collaboration, collaborative participants (such as classes, or other elements of a relationship) can be a generalization of the collaboration parameters. Whenever this collaboration is applied to a specific model, the parameters are replaced with concrete model elements. In this way, the relationship between the parameters in this collaboration is fixed in the model. While for design patterns, it contains more meaning than collaboration. However, such a parametric collaborative modeling method has been able to describe the semantic information of the majority of patterns. Patterns can also include use of backgrounds, instructions, and other descriptions of usage consequences, which can be written as annotations in a separate text file.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.