SeelabFhdo / lemma

Home of the Language Ecosystem for Modeling Microservice Architecture (LEMMA)
MIT License
33 stars 8 forks source link

Enable modeling of hidden complex types #1

Open frademacher opened 5 years ago

frademacher commented 5 years ago

Currently, complex types, i.e., data structures, list types, and enumerations, cannot be hidden. This is currently only supported for data fields in data structures.

I would fit the semantics of DDD's Bounded Contexts to enable the explicit specification of domain concepts ("complex types" in the wording of the modeling languages) that are not shared with other contexts and are thus hidden. However, hiding of complex types should not only be possible, if they are contained in a context, but also if they are declared on the top-level namespace, i.e., directly in a domain model file w/o any namespace, or in a version. The syntax should look like this:

  1. Complex type defined in context:

    context MyContext {
    hide structure MyStructure { ... }
    }
  2. Complex type defined in version:

    version MyVersion {
    hide list MyList { ... }
    }
  3. Top-level defined complex type:

    hide enum MyEnumeration { ... }

Hidden complex types should not directly be usable outside of their surrounding namespace in their defining domain model. In particular, they are not usable to type parameters of microservice operations. However, a hidden complex type can be exposed if it is used in a non-hidden complex type to type data fields.