Patterns of domain model

The concept of pattern is a complicated one. When I here the word pattern I remember my history teacher ages ago when he described the difference between Roman and Gothic churches. There is a pattern of with which you can separate these. The pattern is window and door holes. During Roman times the building techniques was more primitive and the arcs were round. The during Gothics the constructing skill developed so that people learned to create narrow and sharp angel arch. These two arch shapes are the patterns.

 

So pattern is something that is nothing precise but something vague that one can identify.

 

When we consider Gang Of Four Design Pattern there is actually no domain area pattern at all!

 

I have tried to find domain model pattern but I have found only a few. Actually I think so that all my business line models are close to patterns.

 

Here is quite genuine domain pattern. One leading idea on pattern is that one cannot use pattern as such but one have to modify it to suite the current usage of pattern.

As I did already mentioned in previous post I call this “plan – implement” pattern.

The pattern concerns a design and implementation process of designing of repeating events. The idea is to design a repeating base time period like week, month or day as a template and for some period the actual even are created according to this template.

Examples of areas where this ably are for instance: all route transports like buss lines, railway connections, airline route flight, route transfer business on track and ships and also training organization or broadcasting companies.

The basic pattern is the follow ( at least I think so).

Some of the classes like Week and Day can be omitted, but this will give best give you the idea.

Thanks for all the comments to previous post and Tim Lethbridgefor the reference to his book.

Railway Model

I actually created a city commuter model and I will publish it in the next post. These models are very close to each other. I have just dropped street aspect away from this.

 

Here is the class diagram:

Here is also one variation of “ plan – implementation” domain pattern. This is also an issue that I will return in future posts.

There are also some class name that I am not very happy with. I don’t actually know what I should call the event that I here call Run ??

 

Anyone have any constructive proposals ?