Home / Series / Clean Code In The Browser / Aired Order / Season 1 / Episode 2

The Single Responsibility Principle, Part 1

In the first part of "Clean Code in the Browser" Episode 2, we start talking about the "S" in the SOLID Principles: the Single Responsibility Principle. First, we discuss the meaning of software "best" practices. Everyone knows those are the practices that we're all supposed to be using, but is that always the truth? We dive into the Single Responsibility Principle, identifying what it means, why it matters, and how we can apply it specifically to JavaScript. Picking up from some code we started in Episode 1, we use SRP as our guide for refactoring code structure and finding the right place for each piece of logic to live. Finally, we explore how Command Query Separation can be a complimentary technique to SRP for reducing the scope and role of individual methods and functions. We work our way through another code example, finding opportunities to use both SRP and Command Query Separation to avoid code churn and cohesion. This episode had so much content that we had to split it int

English
  • Originally Aired May 1, 2017
  • Runtime 54 minutes
  • On Other Sites Official Website
  • Created December 12, 2021 by
    christoph1qq
  • Modified December 12, 2021 by
    christoph1qq