As software gets more complex over time, it becomes harder to change, slowing the rate of development.
Software design is the process of defining the responsibilities of software components as well as how they interact together. The aim of software design is to make it easy to implement future changes in code.
Diagrams are often used in software design to represent a system’s components, data, and interactions.
The principles YAGNI, KISS, and DRY all emphasize keeping the design of a system as simple as possible to reason about and adapt.
Software architecture describes a model of a system, broken down into components and a description of how those components fit together.
UML is means of creating a design diagram to visualize the properties of a software component and can be used to document objects at the name, method, and attribute level.
Object-Oriented Programming (OOP) is a design paradigm that organizes code into separate objects that interact with each other. OOP has four primary aspects: encapsulation, abstraction, inheritance, and polymorphism. Each plays a role in making a software system adaptable to change.
Abstraction is the concept of representing a complex series of steps and actions through another “higher level” concept.
Inheritance is the concept of a subclass acquiring the attributes and methods of a superclass.
In object-oriented programming, polymorphism is the ability to access the behavior of multiple subclasses through the shared interface of a superclass.
UML class diagrams contain the names of classes, attributes, method signatures, and relationships among objects.
According to the Single Responsibility Principle (SRP), components should have only one reason to change.
New functionality should be able to be added to a system through the creation of new classes rather than the modification of existing ones.
Software should use interchangeable parts. Any usage of a subclass should be able to be substituted for its superclass.
Classes should depend on abstract rather than concrete classes. Concrete classes should not interact with other concrete classes when possible.
MVC is a software design pattern that organizes an application into three types of components (Model, View, and Controller) based on their functionality.
In the MVC pattern, the View handles the application’s visual presentation. The View components display the Model’s data and communicate user actions to the Controller.
In the MVC pattern, the Controller defines the behavior of an application and communicates with both the Model and the View. Controller components are responsible for communicating with the Model and handling user interactions from the View.
Following the MVC pattern adds complexity to a project’s organization, but separating concerns offers the developer more flexibility in implementing each component and simplifies making changes later on.