Chapter 5. Designing business logic in a microservice architecture

 

This chapter covers

  • Applying the business logic organization patterns: Transaction script pattern and Domain model pattern
  • Designing business logic with the Domain-driven design (DDD) aggregate pattern
  • Applying the Domain event pattern in a microservice architecture

The heart of an enterprise application is the business logic, which implements the business rules. Developing complex business logic is always challenging. The FTGO application’s business logic implements some quite complex business logic, especially for order management and delivery management. Mary had encouraged her team to apply object-oriented design principles, because in her experience this was the best way to implement complex business logic. Some of the business logic used the procedural Transcription script pattern. But the majority of the FTGO application’s business logic is implemented in an object-oriented domain model that’s mapped to the database using JPA.

5.1. Business logic organization patterns

5.2. Designing a domain model using the DDD aggregate pattern

5.3. Publishing domain events

5.4. Kitchen Service business logic

5.5. Order Service business logic

Summary

sitemap