# Advanced Functional Programming with Elixir: 1 struct per bounded context

**URL:** <https://forum.devtalk.com/t/advanced-functional-programming-with-elixir-1-struct-per-bounded-context/212921>\
**Category:** PragProg Customers\
**Tags:** question, book-advanced-functional-programming-with-elixir\
**Created:** [30 August 2025 05:57 UTC](https://forum.devtalk.com/t/advanced-functional-programming-with-elixir-1-struct-per-bounded-context/212921 "2025-08-30T05:57:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chrichton](https://forum.devtalk.com/user_avatar/forum.devtalk.com/chrichton/32/2724_2.png) [@Chrichton](https://forum.devtalk.com/u/Chrichton)\
**Post date:** [30 August 2025 05:57 UTC](https://forum.devtalk.com/t/advanced-functional-programming-with-elixir-1-struct-per-bounded-context/212921/1 "2025-08-30T05:57:55Z")

</div>

I read chapters 1-3 so far.  
I noted that the FunPark-Project has exactly one struct (domain-object) per bounded context.

I would be interested in a discussion about how to decide which domain-objects belong to which bounded context.

Thanks for writing this book, that shows DDD with elixir + very important concepts.

Cheers from Heiko

---

<div class="post-metadata">

**Author:** ![JKWA](https://forum.devtalk.com/user_avatar/forum.devtalk.com/jkwa/32/7693_2.png) [@JKWA](https://forum.devtalk.com/u/JKWA)\
**Post date:** [31 August 2025 18:33 UTC](https://forum.devtalk.com/t/advanced-functional-programming-with-elixir-1-struct-per-bounded-context/212921/2 "2025-08-31T18:33:53Z")

</div>

Hi back from Seattle! You bring up something I hadn’t considered. I trimmed each bounded context down to a single struct, but of course, in a real system, they’d include multiple structs and their interactions.

I’m using DDD to talk about organization so polymorphism doesn’t feel like magic and modules don’t turn into grab bags of random functions. But it probably makes sense to add a note that the bounded contexts are overly simplified.
