Design principles

A software design principle is a rule or set of rules that work as a guide for software developers and push them towards smart and maintainable solutions. In other words, design principles are conditions that code must fulfill to be considered objectively well designed.

Most senior developers and experienced programmers know about software design principles and it's very likely that, independently of whether they practice TDD, they are applying them to their daily work. The TDD philosophy encourages programmers—even beginners—to follow some principles and good practices that make code cleaner and more readable. Those practices are enforced by the Red-Green-Refactor cycle.

The Red-Green-Refactor cycle advocates for small feature increments by introducing one test that fails at a time. Programmers add code fragments, as concise and short as possible, so neither the new test or the old ones do not fail anymore. And ultimately, they refactor the code, which consists of cleanup and improvement tasks such as duplication removal or code optimization.

As a result of the process, the code becomes easier to understand and safer to modify in the future. Let's take a look at some of the most popular software design principles.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.100.89