­­

Chapter 4 : How to transform Entities into the right Classes ?

Once defined, Entities can be implemented with or without Object Oriented tools which allow to benefit from mechanisms like inheritance.
The same Entity can be implemented with several Classes. Example: the Entity “Order” is implemented with the Class “Order header” and the Class “Order Line”. The Class “Order Line” is owned by the Class “Order Header”. It means that Entities and Classes are not he same: how to go from Entities to Classes?
Transform relations carrying information into Attributes or Classes
Be careful not to be too generic : when an Entity is difficult to analyze, one easy Solution is to define a very general Entity and give it many different meanings, like a list of “Person+ the Role they play”. Try to be pore precise at design time to avoid useless complexity for Developers who use the Entity.
If a Class becomes too large, split into several Classes.
Build and certify the Class Model which presents Entities with relations and inheritance links.
Define precise Relations.
Implement a Role as a Class or an Attribute.
Prefer several Classes rather then different Perspectives of the same Entity