2014年10月3日星期五

Summary of the course

Summary


Model-driven software engineering is a new method of software development which occurred around 2000s. It uses xtUML as the main developing tool, the result of modelling is code generation. 

MDSE enables developers to develop the project in agility, rather than agile, it saves the turn-around time while developing. Also, it makes it easier to find errors and mistakes at the early stage, this is a good news because the earlier you find the mistake, the less expenditure you will cost for the whole project.

Also, since the whole process while developing is firm, then we can make it modelized. To be more specific, once developers finish developing the data model, state model and process model, they may need to spent some time on integrating them. After that, everything could be done by rules, this will save a lot of human resource and expenditure.

MDSE could provide these above advantages, comparing with the traditional methods. It can be foreseen that as long as there is no new method, MDSE will remain popular in the future.


During this course, I have learnt a lot, although our works during the workshop were not good compared to the sample solution. But what I think is that I can gain a better understand of MDSE from these faults. And I must say thanks to our lecturer and tutor, because it was them who figured out the problems in our work. So, if this course will be held next year, I strongly suggest that  we can have more than one tutors in the classroom, in this case, more problems could be pointed out and solved.

Lastly, this course is meaningful for me, because MDSE is an important skill for our software engineering students.

Domain Integration and Model Translation

In today’s workshop, we talked about domain integration and model translation mainly.
To begin with, after we have finished data, process, state modelling, then it is necessary to integration them together. In this case, xtUML is a useful tool,  because we can integrate everything without error, simply by following domain integration rules, as long as each domain is correct.
After we finished domain integration, then it was time to generate code. We also have rules to translate the model into code in C, java, php, Mysql ..etc.
We tried Pedestrian Crossing system as practice in the afternoon. Although most part of the code had been done, the rest part of the code could be done by following the rules. During of practice, I found that the process was really boring, because I cannot even change the name of a single element while writing the code manually. When I finished, it also took me a lot of time fixing the mistakes, such as wrong spelling, lack of transition … As the result, the code ran properly at last.

Personally, writing the code is the hard work, because it takes too much time to do that. However, since the code could be written by rules, we could make our computers to do that automatically. Therefore, as long as the model has been integrated, we do not need to spare any effort on writing code.

Executable Specification

Today the topic is executable specification.

To begin with, I would like to talk about eXecutable and Translatable UML diagram. According to the concept (Raistrick, 2009) : xtUML = UML - Semantic weak elements + Precisely defined action language. This helps to ensure that every unit of xtUML is clear and easy to understand, also we can translate it into code by some rules.

xtUML illustrates the relationships of subject, class and state. To be more specific a class model is created for each subject matter, while each state model can be only created for active class.
From this picture, it can be seen clearly that xtUML includes class model, state model, and because the rules of drawing these diagrams has some changes and class should be active, xtUML is actually a higher level of developing tools. Here, there is one thing needs to remember, objects communicates with each other by sending signal, and only active class could generate the signal.    

In this case , there comes to a new problem about xtUML, since different class could be run simultaneously, how can we know the order of these states?
The solution is that we add collaboration and sequence diagram in xtUML. These can show how human involved in the system and the sequence of these states.

During the workshop, our group have drawn both collaboration and sequence diagram, what we found was that these diagram should be based of the xtUML class model and state model. The signal in these diagram should be the same. Also, once we understand the state and the process clearly, then it is not a problem to finish these diagrams without an error.

Personally, executable specification is rely on the previous four topic, it helps us understand the relationships between these models.

Process Modelling

Today, I am going to talk about my reflection about process modelling. During the lecture on week 6 and the workshop, I have finish a number of process modelling diagram, including context diagram, data flow diagram and entity-relationship diagram, each of these three has its meaning and is use for in terms of software model driven development.

Firstly, it is important to explain my understanding about these three diagram:
  1. Context diagram
     Context diagram (also called system context diagram) in software engineering describes the boundary between different systems, some parts of the system or the environment of the system. It illustrates the entities which are involved in. (Choubey, 2012). In other words, it gives an overview about the input, output and participated entity of the system.
Here is an example of system context diagram, the picture is from Data Exploitation website. As can be seen from the diagram, there are seven entities which are related to NDE system, among which IDPS and MMC are two input entities and IPO, CLASS and Management are three output entities. While the entity CUSTOMER and  Product Developer combine both input and output.
The system context diagram is the top level view of the system.

  1. Data flow diagram (DFD)
Data flow diagram represents data as visible flows, to illustrate where the data goes and how they enter the the system, and how the data being processed and outflow the system.
The chart which shows the whole system is one step is level 0 DFD, in this case, we can only see the input and output. However, level 0 DFD could be decomposed, then we get the level 1 and level 2 ...etc as the result. Once the DFD cannot be decomposed, it is in the bottom level.

    3  Entity-Relationship Diagram (ERD)
In software engineering, an entity-relationship diagram is used to describe the relationship between entities. It is similar to data modelling, but can show the process of the whole system.
Therefore, these three diagrams is process modelling are in progressive relationship. Because the first one shows the system as a whole while the last one shows it in detail.

Secondly, processing has a number of common and unique points compared with data and state modelling:
  1. Process modelling deals with data and state at the same time, which data modelling and state modelling deal with only data and state respectively.
  2. Process modelling models the whole system, from start to end, this is called the process, while data modeling and state modelling focus only one part of the system
Therefore, process modelling is based on data and state modelling, which is in a higher level of model-driven development.

In summary, process modelling focuses on the process of the whole system, it includes the change of state and data. However, it is not the highest level of model-driven modelling, because there still has executable model and domain integration, which I am going to talk about later. So, process modelling is acting as a bridge which connects the lower level and the higher level of model-driven methods.
Reference
Manoj Kumar Choubey (2012) IT Infrastructure and Management (For the GBTU and MMTU). p. 53
NDE Project Management (NPOESS) Data Exploitation website. 2008. http://projects.osd.noaa.gov/NDE/proj_context_diagram.htm

State Modelling


During the second week (week 4) and the second workshop, we had spent about 10 hours working on this model. Although our work was not quite good, state modelling still had left great impression on me. In this essay, I am going to talk about what I had learnt and my understanding from state modelling, also, some applications which are relevant to the reality will be covered as well.

Basically, state model is used to model the common behaviour of an object which has different states. From the state model, we can find out states, events, actions and transitions, which are the major components of state model diagram.
The diagram above is the state model of an alarm clock. According to the diagram, it has five states, which are described in rectangles, and the initial states is WaitingForSet state. For each state, there might be some contents inside the rectangle, and this is event. For example, in the state SettingAlarm, we have the event “generate triggerAlarm to self at alarm Time”, “turn alarm LED on” and “generate waitForAlarm to self”. Between two different states, there are an arrow and the name, which is transition and action respectively.

Suppose that the system is  at one specific state, then it is clear to find out that which event the system could generate and which state the system can go to by which transitions, as long as there is a path to the other state.

Personally, there are two main advantages of using state modelling.

The first advantage is that it is clearly, easy to understand. There are only several components n the state model diagram, and as long as people have some knowledge, then they can able to identify everything from the chart.

The second one is that state modelling makes system modify and update more effective. In the past, when the original system cannot meet the new requirements, then it is likely for the designer to design a new system, which may need to spend much time and money. However, if the system is modelled by state modelling, then it may become simple for them, because what they should do is to only change some transitions or add or delete some states, events. Therefore, the scale of the project becomes much smaller than before.

Although state modelling indeed has some drawbacks, however, the advantages still outweigh the disadvantages. And there are much applications of state modelling in terms of these good issues.

One of the most famous applications which is being used across the world is simulation, this activity has been using state modelling since the advent of  this method. Basically, there are two kinds of simulation, static and dynamic, but whatever kinds of simulation, state model is required. During our workshop, we simulated the pedestrian crossing traffic system, by identifying state model for each domain, such as traffic light and pedestrian light. We found that for each domain, they are in one specific state every time, however, when we view the whole system, it is clear to see that the system is in a dynamic balance state, because each domain has an impact on the others, but the whole system should remain stable.

Also, another good usage of state modelling is system problem diagnose. System drawbacks, such as deadlock, wrong transitions could be found by by diagnosis.


Indeed, state modelling has the above advantages. However, how to deal with unexpected situation is still a question for state modelling method, which needs to be solved in future.

Data Modelling

Data Modelling

When it comes to Model Driven Software Development, the first thing that we learners need to know is Data Modelling, because it is the basic elements elements. In this essay, I am going to talk about my comprehension about Data Modelling, also the application of this kind of modelling will be referred as well.

To begin with, Data Modelling is used for modelling unchangeable things which exists in the real world, no matter it is a real thing or a virtual one. In other word, as long as the thing is static, it can be modelled by data modelling.

Basically, Data Modelling could be divided into three major elements, class, attribute and relationship. According the our lecture note, a class is a general entities, which has a number of common entities. It is similar to a java class, which could be used in more than one object. For attribute, it is related to each entity, which is used to describe each class. For example, for a student class, it should has name, DOB, sex, major, minor (etc) as main attributes. In this case, all students could be described in the student class, although the value for each attribute might be different. For association, it is used to describe the relationship between each two entities. For instance, student enrolls in course, which means there is an enroll association between student class and course class. Personally, it is the most important factor in Data Modelling, because it is the these relationships which makes software project much harder.

The diagram above illustrates the main process of data modelling (West and Fowler, 1999). According to the diagram, we create logical data model initially, which is based on activity model and data requirements. Then we focus on creating or updating the model in physical part, in this situation, technical environment and performance consideration will be taken into account, also conceptual data model will be used in this part, such as entities, attributes, relationships and integrity rules. Next, we create data, which is from physical data model and real business data. Finally, the data we created or updated is what we want from data modelling.

There are a number of famous data modelling application in our real work. One of them is database. Basically, the database of one system stores all static information, which indicates the class attributes and associations. Take the following ER diagram as an example:
From the diagram, we can create the database with the database rules, which means that these creation steps could be viewed as process management, and that is why database is called database system management (DBSM).
If we use the process management, once the diagram is well-development, the change having error is much smaller than using normal method, also it could save time, because all database schemas could be created by the rules.

In conclusion, data modelling is useful in developing a project.

Reference:

Matthew West and Julian Fowler (1999). Developing High Quality Data Models. The European Process Industries STEP Technical Liaison Executive (EPISTLE).