Data Abstraction vs Encapsulation

It’s common for people to be confused by data abstraction and encapsulation and treat the concept of abstraction as encapsulation or information hiding. That’s not the case. The following definitions come from ISO/IEC/IEEE 24765:2017 Systems and software engineering — Vocabulary.

Data Abstraction

  1. process of extracting the essential characteristics of data by defining data types and their associated functional characteristics and disregarding representation details
  2. result of the process in (1)

Encapsulation

  1. software development technique that consists of isolating a system function or a set of data and operations on those data within a module and providing precise specifications for the module
  2. concept that access to the names, meanings, and values of the responsibilities of a class is entirely separated from access to their realization [IEEE 1320.2-1998 (R2004) IEEE Standard for Conceptual Modeling Language Syntax and Semantics for IDEF1X97 (IDEFobject), 3.1.54]
  3. the idea that a module has an outside that is distinct from its inside, that it has an external interface and an internal implementation

Information Hiding

  1. software development technique in which each module’s interfaces reveal as little as possible about the module’s inner workings and other modules are prevented from using information about the module that is not in the module’s interface specification
  2. containment of a design or implementation decision in a single module so that the decision is hidden from other modules

Leave a Reply