ideanl

ideanl

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?

Showing Posts 1 to 5

blatyo

blatyo

Conduit Core Team

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.

Exadra37

Exadra37

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:

AstonJ

AstonJ

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:

pragdave

pragdave

Author of Programming Elixir

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…

peerreynders

peerreynders

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.

— All posts loaded —

Where Next? Top

Trending in Chat/Questions Top

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews