AE
Ash Elixirβ€’2y ago
BrianT

Is Ash well suited to Domain Driven Design

Hi everyone. First up, I'm new to Elixir and Ash and expect a steepish though enjoyable learning curve. 🀞 (I have lots of experience in other languages: Java, Go, Python, C#, VB :D, SQL etc.) I'm redesigning a complex solution that has ~8 "micro" services (mostly Go and Java), uses Drools (with dynamic code generation) for complex business rules, Apache Pulsar for messaging, Postgres databases, Angular SPA... In fact, it's TOO complex and unmanageable for a very small team, (1-2 ppl) and for various reasons the solution was never completed and released! I've been following DDD principles and have a good handle on the domains, actors, bounded contexts, messages/events etc. During my Elixir research I came across Ash and thought it might be a good fit for my current problem domain and team size of 2. In the Ash Get Started tutorial there is a quote "It might be helpful to think of an Ash API as a Bounded Context (in the Domain Driven Design sense)" Does this indicate that Ash is particularly well suited to solutions following DDD patterns? If so, does anyone have any pointers on material I can read to help? Many thanks guys, in advance. πŸ™‚
4 Replies
ZachDaniel
ZachDanielβ€’2y ago
Hello! I would say that there are many parallels between ash and DDD, and that the design patterns of DDD can fit well inside an Ash application. With that said, Ash isn’t designed to work with any specific β€œism” or design pattern necessarily. I can’t think of any higher level design material like that unfortunately, but perhaps others here can provide their own context/feedback πŸ™‚
BrianT
BrianTOPβ€’2y ago
Thanks very much Zach for the quick response! When I read about aggregates in Ash I started head scratching πŸ˜„ and looking for more details re: DDD in the docs. I realise now they are different concepts. Ash looks really amazing, but I'm concerned I'll be taking on too much when learning Elixir/Phoenix at the same time.
ZachDaniel
ZachDanielβ€’2y ago
Its possible πŸ˜„ A lot of it really depends on what you're going to be doing as well. Ash isn't necessarily targeted towards beginners in the Elixir ecosystem, but its also not...not targeted towards beginners πŸ˜† I think there is something to be said for learning a programming language before learning a framework. For example, there were lots of people who learned "Ruby on Rails" before they learned Ruby, and so were unable to distinguish between the two in the future. With that said, Ash also solves for a whole host of mistakes that are very easy to make, especially for those unfamiliar with building applications in Elixir. I think the thing you'd want to ask yourself is wether or not you want to explicitly "learn Elixir", or if you want to build your technology and are comfortable learning a mix of Elixir and Ash concepts on the fly. The hardest issue you will face with little Elixir experience is properly evaluating Ash and Elixir independently. There is no easy solution there πŸ˜„ The elixir community is great, both in terms of the help you'd get here with Ash stuff, and the help you'd get elsewhere in the elixir slack/discord/forums. I don't necessarily want to convince you either way, just hopefully can provide some context to let you make the best choice for yourself πŸ˜„
BrianT
BrianTOPβ€’2y ago
Thanks again for the reply Zach! One thing I have noticed with Ash and the Elixir ecosystem is that the communities are awesome!!! ❀️ I'm looking forward to the journey.

Did you find this page helpful?