...

/

Different Input Models for Different Use Cases

Different Input Models for Different Use Cases

Learn how using different input models for different use cases helps us write maintainable code.

Same input model

We might be tempted to use the same input model for different use cases. Let’s consider the use cases “Register Account” and “Update Account Details”. Both will initially need almost the same input, namely some account details like a description of the account.

The difference is that the “Update Account Details” use case also needs the ID of the account to be able to ...