Back to articles
Seeing the problem: An Introduction to Separation of Concerns
How-To

Seeing the problem: An Introduction to Separation of Concerns

via Dev.tocakoko

Separation of concerns is one of the first topics that comes up when we want to move from writing code that simply works to writing code that is structured well. At first, I thought it only meant splitting code into smaller functions so it looked cleaner, was easier to reuse, and had less duplication. If a function looked too long, I would cut some lines out and move them into another function. If a piece of code looked too complex, I would do the same. For years, I wrote code mostly based on instinct and personal preference without really asking whether there was a better way to think about structure. I did not seriously question where a responsibility should live, what a function should truly own, or whether splitting code actually improved the design. Then I started my journey in LUR to rethink the way I write code, and relearning separation of concerns became one of the first things I focused on. From that learning process, i made an article series What I’m Learning About Writing B

Continue reading on Dev.to

Opens in a new tab

Read Full Article
9 views

Related Articles