Sunday, June 1, 2008

Encapsulation and Abstraction








en·cap·su·late
Pronunciation: in-'kap-s&-"lAtFunction: verbDate: 1876

  1. to enclose in or as if in a capsule
  2. epitomize, summarize

- encapsulation /-"kap-s&-'lA-sh&n/ noun


Separation of the 'What' and the 'How'

This is what I think about most often when using encapsulation to manage complexity. I consider what services are required before exploring the details of how those services are to be implemented. There are many other definitions of what encapsulation means in our industry, two of my favorites are:

  • Encapsulation allows suppliers to present clearly specified interfaces around the services they provide. A consumer has full visibility to the procedures offered by an object and no visibility to its data.
  • Encapsulation is a way of packaging information in such a way as to hide what should be hidden and make visible what is intended to be made visible

No comments: