Any good books or resources for project maintainability?

I have come from an OOP background with usage of recognized design patterns for large projects that aids in maintainability. However, I am now interested in the blackbox nature of functional programming and specifically Elixir programming. I struggle to find resources teaching patterns for maintainability and readability of a large codebase. The best I’ve seen is references to libraries such as credo, excoveralls, dialyxir, etc. Does anybody know of some book or resource that does a good job explaining how to organize and keep maintainable large functional programming (specifically elixir) projects?

1 Like

A lot of the topics in OO programming apply just as well in FP. With that in mind, I’d recommend domain driven design by Eric Evans and working effectively with legacy code by michael feathers.

1 Like

I also come from an OOP background where I regularly use the Resource Action pattern to write Solid and Clean Code but the MVC pattern used for example in Phoenix completely violates it.

The best software architecture I found until now is present in the book Programming Elixir 1.6 and the Elixir for Programmers video course and both have as author @pragdave .

I strongly recommend you to take a look to both and see how the approach results in a more clean and decoupled architecture :slight_smile:


I second PragDave’s book and course too - his course is one of the best courses I have ever done - here’s my review :003:

1 Like

This is why the mantra is "–no-ecto’. There’s no excuse for putting any model-related stuff in a Phoenix application, unless you miss Rails…


In terms of “large projects” I don’t think there is anything equivalent to Designing for Scalability with Erlang/OTP: Implement Robust, Fault-Tolerant Systems:

  • Chapters 3-4 deals with the process level (for example extracting generic behaviours)
  • Chapters 5-7 deals with OTP level details
  • Chapter 8 deals with supervision
  • Chapter 9 deals with (OTP) applications
  • Chapter 10 deals with special processes and custom behaviours
  • Chapters 11-12 deals with releases
  • Chapters 13-16 touches on various topics pertaining to distributed and unattended system architectures.

Now granted this is all presented in the context of the Erlang ecosystem but most lessons apply to systems built with Elixir as well.

It still boils down to:

  • choosing the right boundaries, be it at the function, module, process, or application granularity
  • managing the number, kind, and direction of any dependencies
  • designing effective collaborations, coordinations, and protocols.

Thinking like an Erlanger

… and when comes to these “principles” and “patterns” it is always important to consider:

The SOLID Design Principles Deconstructed

“Patterns” primarily establish a nomenclature for some generalized solution approaches as they may apply to certain circumstances with the intent of making communication between developers more efficient, effective and clear. Secondarily they can also serve as case studies for the design guidelines they are based on.

The term originates from pattern language - not some kind of software equivalent of sewing patterns.