
53: SOLID Elixir with Ilya Averyanov
Thinking Elixir Podcast
00:00
Open, Closed for Modification
When we want to introduce some new functionality, a good example is logging. We shouldn't put log messages into our existing functions everywhere. A good example is phoenix plugs. We do not write like a ring file in every handler of every request. We don't put these messages into the modules where we handle some parting of HTTP protocol. We just add a plug and this plug contains all the new functionality that we need. For example, the very plug library, when we add new plug with logging, we do not modification old programming. We added it to the pipeline when we need and we have all the required logging. It's completely independent from all our code, but our library is constructed
Transcript
Play full episode