Separation of Concerns
Learn why it is important to keep components in a software as small as possible.
We'll cover the following
Inside an application, there are multiple components. Their code is divided into other subcomponents, such as modules or packages, and the modules into classes or functions, and the classes into methods. Throughout the course, the emphasis has been on keeping these components as small as possible, particularly in the case of functions—functions should do one thing and be small.
Working with smaller functions
Several reasons were presented to justify this rationale. Small functions are easier to understand, follow, and debug. They are also easier to test. The smaller the pieces in our code, the easier it will be to write unit tests for it.
Get hands-on with 1400+ tech skills courses.