Abstraction in Software Design
Abstraction makes complex systems simple. Let’s analyze a car. A car is a very complex system made up of a lot of components. When you look at a car, you only see the relevant details, while the irrelevant ones are hidden away.
Irrelevant in this sense doesn’t mean useless, but not our area of interest. For instance, if I want to operate the steering, I am not concerned with the small stuff that enables the steering to function, I really don’t want to know the mechanism for turning the steering left or right, I just want to turn it and let it turn so the mechanism is irrelevant to me in this sense.
If I have to know the whole mechanism of a car to operate it then it becomes too complex.
Abstraction is a fundamental concept in software design that plays a pivotal role in creating complex and scalable software systems. It is the process of simplifying complex reality by modeling classes of objects or systems in a high-level manner while ignoring irrelevant details.
In essence, abstraction allows software engineers to focus on what's essential, hiding the underlying complexity and making systems more manageable and maintainable.
Abstraction is majorly about doing 2 things
How do we hide the irrelevant details? By extracting them into a separate class or function. Coding is really hard without abstraction, Imagine implementing a car system without abstraction
Recommended by LinkedIn
Abstraction provides a high-level view of a system or a problem domain. This perspective enables developers to focus on the most critical aspects, such as functionality, without getting bogged down by implementation details. This is particularly valuable during the initial design phase.
Abstraction promotes modularity by dividing a system into smaller, self-contained modules or classes. These modules can be reused in various parts of the application, reducing redundancy and improving code maintainability. When changes are required, developers can update the abstracted components without affecting the entire system.
Not all abstraction is good, a badly structured abstraction in software design can make things worse so always follow the right approach and do not over-engineer things.
Benefits of abstraction:
Abstraction is really important in software engineering. It prevents redundancy, makes the code scalable, and helps in implementing complex systems.
What are your thoughts? Have you been designing with/without abstraction in mind? Will you start observing this principle?
This is one of the best explanations of abstraction I've seen. Well done, Lawrence!
While reading through this post, It became more clearer why LAYERED ARCHITECTURE is used, because of its supports for modularity and separation of concerns. So the architecture came in from the Abstraction Principle🤔. Thanks bro✌️