This seems an extreme question probably but I'm wondering anyhow:
Can all business logic be decomposed as a (declarative) state diagram on simple crud operations and conditionals?
Already a lot of lower-level domain logic can, and ofen is declaratively defined with ORM-mappings for instance, handling things like:
- domain-model schema
- validation
- uniqueness constraints
- ACL/ Role-based authorization, etc
Of course higher-level domain logic exists that often involves coordinating between multiple Domain Objects.
However, it seems ultimately:
- This high level business logic really is just a workflow that can be modeled as a state-machine (or probably more extensive as a extended petrinet)
- in which all branching is based on conditional logic on some state (i.e: domain object attributes)
- the outcome would be a statechange, i.e: a change to domain object attributes (simple crud operations).
If this is the case, could all domain logic be declaratively defined, given a DSL that would support the above workflow, conditional, and CRUD constructs?
If you dismiss this braindump please be insightful while doing so :)