amacgregor
Software design patterns and reference architectures
I’m doing a bit of research and writing on software design patterns and reference architectures relevant to Elixir applications.
Often it seems the discussion around architecture and design patterns seems to be dominated by the idea that they are irrelevant in the context of functional programming, and while this might be true for the original GoF patterns; I feel there is still a few useful patterns yet to be fully explored in the realm of Elixir.
Top of mind, and highly colored by my background:
- Flow-Based programming to build robust and scalable data pipelines
- Event Sourcing for use cases where traceability is highly important
What other patterns could be useful or are you currently using? Would love to hear from other developers what is currently being used in production and with that amount of success.
Most Liked
dimitarvp
Now that I completely agree with. I was there when the infamous “Java enterprise architects” ran rampant and ripped companies off of millions of dollars so I definitely have some PTSD about it. ![]()
Yes and no. If you use some well-known Elixir flavour of doing things (like configuring implementations and using dynamic dispatch) from the get go then this allows you to juggle a lot of complexity in the future. All that’s necessary is being a little clever at the start – but not too clever so as to lock yourself into a certain paradigm that might indeed turn out to be ill-advised 300k coding lines later.
I am not disagreeing with you – I am simply adding the nuance that we have it easier in FP. I’ve had to refactor and re-adapt huge Java and Ruby codebases in the past and that’s basically a perfect way to want to commit suicide.
amacgregor
That’s an excellent point.
Agreed, and I can relate, and that is the thing I found when looking into Desing patterns in FP or elixir; GoF is pretty redundant and not neat because as you say we have it easier with FP.
ericsteen
Indeed. Helps to go back to first principles. Thanks for pointing this out, since a behavior is just dynamic dispatch polymorphism, as “strategies” can be combined, mixed, and matched. Eureka!
Popular in Discussions
Other popular topics
Chat & Discussions>Discussions
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #hex
- #security









