Fl4m3Ph03n1x

Fl4m3Ph03n1x

Any Elixir resources for framework agnostic architectures?

Background

I have been reading quite a lot about design and architecture in Elixir and overall FP. My latest incursions took to me the Onion Architecture and the Functional Core / Imperative shell:

Only to find out that there is no real consensus among the community. From what I understand the community overall likes decoupling but it is still finding and architecture that works.

Question

That post is however quite old, as well as the resources they link to ( some of them are from 2015 ). I was wondering if there are any books, courses and material over all where I can learn software design and architecture in Elixir ( using the Actor model perhaps together with a layered architecture ) that don’t use frameworks, like Phoenix. I am looking for something more … agnostic. mainly because I see Phoenix is used mainly for webapps.

Any recommendations?

Most Liked

gregvaughn

gregvaughn

The best architecture book I’ve ever read in my 25 year career is Designing for Scalability with Erlang/OTP but as the title implies, the examples are all in Erlang. The good news is it all applies in Elixir since we share OTP and BEAM, but you’ll have to invest the time to at least be able to read basic Erlang (which isn’t hard).

peerreynders

peerreynders

If I understand what you are saying, you seem to be unclear why so much “reusability” seems to revolve around Behaviors instead of functions.

Read Chapter 3. Behaviors on Google’s sample.

Processes interact through messages, not function invocations therefore process skeletons are implemented as Behaviors.



gregvaughn

gregvaughn

Very good points overall @MrDoops, but I’d like to offer one clarification.

phoenix_html defines a protocol called FormData and implements it for Ecto.Changeset to minimize that coupling. I don’t believe F# has protocols, so it wasn’t an option in the book. Elixir copied that idea from Clojure.

peerreynders

peerreynders

I suspect that you are now venturing into an area where focusing on Elixir-specific resources is going to isolate you from potentially useful information. Then there is the other consideration that these information sources will tend to require more work on your part to transfer value into the Elixir realm.

Given that you have already had some exposure to Scott Wlaschin, [Functional Programming] Domain Modeling Made Functional (Pragprog) (F#) may be worthwhile even if it is in F# rather than Elixir (one discussion that precipitated from it). Chapter 3 is actually called “Functional Architecture”.

Then of course there is [Erlang] Designing for Scalability with Erlang/OTP (O'Reilly) (ebooks.com, Google). While there are no “prescriptive architectures” being discussed as such, it does give you insights on the principles that the BEAM design was based on which in turn builds a better understanding which “architectural approaches” compliment or fight it.

Strangely enough sources like Principles of Service Design have some interesting tidbits (i.e. not everything is relevant) simply because it moves beyond dogmatic object thinking. E.g. Service Autonomy as aspect of a bounded context.

And a lot of the material you see today still draws from Pattern-Oriented Software Architecture, Volume 1, A System of Patterns, Patterns of Enterprise Application Architecture and Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions.

The issue is that advice is now going to be much less focused and prescriptive because of an increasingly significant “it depends” factor. For example where an Elixir solution is deployed is going to exert different architectural and design pressures.

Fl4m3Ph03n1x

Fl4m3Ph03n1x

I take it you bought the course? What were your impressions?

Interesting, which patterns do they talk about?

@peerreynders My greatest fear is not being able to transport what I learn into Elixir. I guess I could try Domain modeling made functional, since I have watched quite a number of conferences from Scott and I don’t think F# is too different from Elixir.

If I had to pin point it, I would say that my greatest issue right now is not understanding why Elixir is so focused on Mocks when it can use Functional DI (which I have been using in JS for years now) and I am still not clear on how this approach would affect my work.

At the end of the day I really want a project easy to change/modify and understand. I know there isn’t a silver bullet but I guess I am hoping for some guideline.

Thanks for the resources!

Where Next?

Popular in Chat/Questions Top

maz
I’m getting this error: ## ** (Ecto.Query.CompileError) Tuples can only be used in comparisons with literal tuples of the same size fro...
New
LegitStack
I’m not a hugely experienced programmer, just a few years. So I’m looking for resources to learn about a topic but I can’t seem to find m...
New
markdev
What are the best beginner resources for learning Elixir and OTP (not Phoenix) in 2018?
New
shansiddiqui94
Hello all, I recently did my first app in Phoenix and Liveview, many thanks to all the users who assisted me. I found that the tutorial ...
New
dopomecana
The title of this topic may sound silly at the first glance. But why I trying to ask you guys is how to go to the next level? I am curre...
New
svetarosemond
I’m planning on purchasing Elixir in action second edition, and I was wondering if anyone could tell me based off the first edition, does...
New
AstonJ
It finally feels like I’ve got some time to catch up on my reading - though I am sure lots of people will be wondering the same: what are...
New
QueenSvetlana
My bookstore has Introducing Elixir: Getting Started In Functional Programming and the front cover says the book uses Elixir 1.4. The cur...
New
Fl4m3Ph03n1x
Background After following the communitiy suggestion, I bought the Elixir in Action 2nd Edition book and I am about to finish it now. I ...
New
koen_vb
Hi, I was looking for a pointer of how I could most easily start with phoenix regarding deploying it to something like linode or google c...
New

Other popular topics Top

axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 45766 226
New
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 27727 240
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
magnetic
Hey :wave:t3: Elixir community, I’ve been learning Elixir, and working on some side projects. My editor of choice is VSCode, and althoug...
New

We're in Beta

About us Mission Statement