Applying DDD for Improved Phoenix Contexts

276
clicks
Applying DDD for Improved Phoenix Contexts
German Velasco introduces Phoenix contexts and explains how, despite their introduction in Phoenix 1.3, developers still face confusion when defining and applying them correctly in Elixir applications. The generic nature of Phoenix contexts only gives a direction but lacks guidance for successful implementation. He proposes using DDD concepts to create defined Phoenix contexts based on their roles within the application. Velasco walks through different types of Phoenix contexts, such as DDD's bounded contexts, entities, and aggregates, providing a perspective to organize Elixir modules. He outlines the process of engaging with domain experts to understand the problem space and identify subdomains that reflect the appropriate contexts within the solution space. Velasco outlines how this approach differs from database-driven or schema-driven design and emphasizes the importance of capturing the domain language through ubiquitous language. Additionally, he touches on architectural designs, suggesting queries and workflows to manage interactions between bounded contexts. The goal is to achieve better-structured applications with clear, context-driven modules and operations that align with domain practices.

© HashMerge 2024