Single Responsibility Principle - what does it mean to you and your Elixir apps?

Thank you for recommending elixir for programmers by Dave Thomas. The course is fantastic and very insightful. The more I learn about FP and Elixir the more my eyes are becoming opened to a better way of writing programs.

I really like the idea of SRP. I usually start with a function that does too much and then chop it up into little digestible chunks, i.e. multiple function definitions

I also really really like Microservices. Of course you shouldn’t go crazy with it but apps being split into components makes a lot of sense to me. I’ve worked on monolithic apps where things were just out of control and unmanageable. I think Elixir is tailor made for SRP and microservice style development. One thing I’m unsure about is the database layer. I know Dave thinks Phoenix should only be a web interface and know nothing about the database but databases can be complicated to configure and use as a microservice.

1 Like