The Importance of the Single Responsibility Principle
Understand the importance of single responsibility principle through an example.
We'll cover the following
The downside to ignoring the single responsibility principle
Those who are familiar with C# will recognize that every C# application has a file that serves as an entry point, which is usually called the Program.cs
file.
Now, let’s imagine a basic console application that’ll read an input text from any specified text file, wrap every paragraph in HTML p
tags, and save the output in a new HTML file in the same folder that the input file came from. If we put the entire logic into a single file, it would look something like this:
Get hands-on with 1400+ tech skills courses.