A quick refresher to OO Concepts – Abstraction

Abstraction

Abstraction is the process of identifying the relevant details (and ignoring the irrelevant details) of a concept for a particular purpose.

What do we mean by relevant details of a concept? Well, layers of details of a concept is really endless. For example, details about the person (concept) can go on and on. Name, date of birth, sex, education,color of eyes, color of hair, height, weigh, employer, driving license, medical history, employment history, work experience, nationality, ethnic background, .. (you can keep going ) are some of the details of a person. But not all of this details are required for a software system (particular purpose). The relevant details of a person when abstracted as student would be name,age, address etc (work experience or driving license details etc are not relevant here). The relevant details of a person when abstracted as Employee would be name,age, address, education, previous employment history etc (ethnic background , color of hair, eyes are irrelevant details here). So, abstraction is the process of identifying relevant details about a concept.

Abstraction is a natural mental process. People understand the world by constructing mental models of portions of it. People try to understand things so that they can interact with them. A mental model is a simplified view of how something works so that you can interact with it.

Mental models are usually simpler than the system(concept) it mimics. For example, a map is the model of a territory. The map is simpler than territory (it doesn’t include all the details thats on territory). In otherwords, a map abstracts only the relevant details of a territory. A road map will contain the details about locations and driving directions. A topographical map will contain details about landscape.

Some more information about abstraction can be found on my blog entry What is Data Abstraction?

A very detailed information can be found here –Abstraction, Encapsulation, and Information Hiding

Advertisements