Contents
- 1 What do you need to know about DDD microservices?
- 2 Where to draw the boundaries in a microservice?
- 3 Why do we need local authorization for microservices?
- 4 What are the approaches to authentication in microservices?
- 5 How does DDD help you understand the complexity in the domain?
- 6 Can a domain entity derive from a base class?
- 7 How to implement multiple user types with Django?
- 8 Why do we need DTOs and repositories in DDD?
What do you need to know about DDD microservices?
Design a DDD-oriented microservice. Domain-driven design (DDD) advocates modeling based on the reality of business as relevant to your use cases. In the context of building applications, DDD talks about problems as domains.
Where to draw the boundaries in a microservice?
Where to draw the boundaries is the key task when designing and defining a microservice. DDD patterns help you understand the complexity in the domain. For the domain model for each Bounded Context, you identify and define the entities, value objects, and aggregates that model your domain.
When to design a domain model for a microservice?
Design a domain model for each microservice or Bounded Context that reflects understanding of the business domain. This section focuses on more advanced microservices that you implement when you need to tackle complex subsystems, or microservices derived from the knowledge of domain experts with ever-changing business rules.
Which is the right approach to building microservices?
Using the right approach to building microservices it’s more about the software’s architectural design, providing a structure of practices to take design decisions that help in software projects that have complicated domains. It focuses on the area of a specific business to gain a better understanding of what the domain is all about.
Microservices can be accessed from multiple applications and clients and they might have different data needs so global authorization becomes a limiting factor on what each application can see. With local authorization, microservices can make sure that the client application is only authorized to see what it needs to see.
What are the approaches to authentication in microservices?
There are three approaches that we can follow: Different authentication mechanisms can be implemented for each microservice. The code gets bulkier. The probability of each service using different authentication is very low so code gets duplicated. The developer needs to know the permission matrix and should understand what each permission will do.
How is Azure Active Directory used in microservices?
When the API Gateway centralizes authentication, it adds user information when forwarding requests to the microservices. If services can be accessed directly, an authentication service like Azure Active Directory or a dedicated authentication microservice acting as a security token service (STS) can be used to authenticate users.
What are the dependencies between the DDD layers?
Dependencies between layers in DDD Dependencies in a DDD Service, the Application layer depends on Domain and Infrastructure, and Infrastructure depends on Domain, but Domain doesn’t depend on any layer. This layer design should be independent for each microservice.
How does DDD help you understand the complexity in the domain?
DDD patterns help you understand the complexity in the domain. For the domain model for each Bounded Context, you identify and define the entities, value objects, and aggregates that model your domain. You build and refine a domain model that is contained within a boundary that defines your context.
Can a domain entity derive from a base class?
Domain entities should not have any direct dependency (like deriving from a base class) on any data access infrastructure framework like Entity Framework or NHibernate. Ideally, your domain entities should not derive from or implement any type defined in any infrastructure framework.
When does DDD issue a soft Edit Message?
DDD will issue a soft edit message when ROPA information is missing. On May 15, 2021, DDD will have a new billing template that incorporates Referring, Ordering, Prescribing, Attending (ROPA) information that will ensure compliance with AHCCCS requirements.
Is it bad to have multiple user types?
You can still have multiple user types, but generally speaking it’s a bad idea to store authentication information across multiple models/tables. Treat this model as an account rather than a user. Meaning, all users need an account to log in.
How to implement multiple user types with Django?
Never user the built-in Django User model directly, even if the built-in Django User implementation fulfill all the requirements of your application. At least extend the AbstractUser model and switch the AUTH_USER_MODEL on your settings. Requirements always change.
Why do we need DTOs and repositories in DDD?
Perhaps one of the hardest aspects towards learning DDD is being able to determine just what that tool is needed for the particular task. In DDD, the Repositories, Data Mappers and DTOs are a critical part of the entity lifecycle that enable us to store, reconsitute and delete domain entities.
How are services designed in the DDD World?
Services in the DDD world should be designed around a coordination activity. After all, the original definition was that services are designed to coordinate between aggregates, or between aggregates and external services. But that’s not what I typically see, I typically see Java Spring-style DDD services where we have an entity Foo, and then: