Parameters and functions answer the question of how you would like to parameterize. Context answers the question of what parametrization can depend on. And least but not last -- domain answers the question of what you would like to parameterize.
Indeed, domain model is what we want to be configurable.
Imagine, we want to configure life insurance products:
We can use Domain definition to define types for our domain, for instance:
Next, we can use Domain configuration to configure domain elements and their attributes:
Now, application connected to Hyperon can use any defined logic solely through domain layer. These are sample scenarios:
We recommend not to use parameters and functions directly in application's code. Instead we advise to use parameterization only through domain layer. Such approach, which we call polymorphic configurations, makes application even better separated from business logic. Read Using domain to see more details.
Following image shows an example of domain configuration.