Modeling

More Layout

As a modeler I spend a lot of time in the model. I look things up and in order to answer questions I get from EVERYONE – and I also have questions of my own – how does this or that work. The model is also my main tool to solve new problems for the domain – I solve new problems by introducing classes, relations and attributes that catch the missing information needed – then I use this to visualize this information in context in view models.

As I spend a lot of time in the model I need it to be easy to read – easy to maintain – easy to change.

But the model is really multiple diagrams describing many perspectives. Some perspectives may seem almost eternal for the domain but some perspectives may be more short lived – created more for a specific question that was important yesterday but not so much in demand today.

All this boils down to me, and the other modelers in the team, making changes to existing diagrams and thus potentially effect multiple diagrams.

It is often the case that when I have the need to look at one specific diagram for the first time in months – it looks messy due to changes done by others (or myself). Since this is a common problem of life – decay due to environmental changes – I suspect that we must accept this fact and provide good tools for cleaning and restoring order.

I have had this ongoing background processes in my head : Can we auto clean things in the model? Can we auto layout?

In order to answer that we must first agree on what constitutes a good and clean model – and how can we distinguish that from an unclean or messy model.

These are my current conclusions – I am open for debate on this:

  • Keep classes of same color close
  • Keep classes with inheritance(generalization arrows) visible in the model even closer
  • Do 90 degree lines if at all possible
  • Do lines with as few turns as possible
  • Spread out line endings along the side of classes – no collisions
  • Avoid class overlaps
  • If a line from a class goes through the same class, move end to other side to avoid
  • If line from other classes cross a class – try to find a solution around instead
  • If a line has very shallow angle from a side of a class – consider to start from neighboring side to get a steeper angle
  • The total line length sum should be minimized
  • The total amount of line crossings should be minimized

This is what we aim for when improving the layout-tools in MDriven:

1+

Leave a Reply

Your email address will not be published. Required fields are marked *