So this one completes the hat-trick on blogs related to differences in succession.
Today during our discussion about defining service orchestrations we came up with the argument about the difference between Encapsulation and Information hiding. I cover abstraction here as a bonus 😉
Abstraction – in a nutshell is making visible what you want the external world to see and keeping the other details behind the wraps. Abstraction, as a process, denotes the extracting of the essential details about an item, or a group of items, while ignoring the inessential details. It hides the complexity. It is a technique by which we decide what information to hide and what to expose.
Information hiding – is making inaccessible certain details which would not affect other parts of the system. Just hiding it so that it is not exposed.
Encapsulation – is like enclosing in a capsule. That is enclosing the related operations and data related to an object into that object.If encapsulation was “the same thing as information hiding,” then one might make the argument that “everything that was encapsulated was also hidden.” This is obviously not true. For example, even though information may be encapsulated within record structures and arrays, this information is usually not hidden and is available for use. Encapsulation is just getting a set of operations and data together which belong together and putting them in a capsule.
Abstraction, information hiding, and encapsulation are different but related. Abstraction is a technique that helps us identify which specific information should be visible, and which information should be hidden. Encapsulation is the technique for packaging the information in such a way as to hide what should be hidden, and make visible what is intended to be visible. Encapsulation can be thought of as the implementation of the abstract class.
vikashazrati
Saturday, June 20, 2009
My colleague Sharad Ramachandran mentioned a very interesting thing. He mentioned that at sufficient level of abstraction everything is simple. No, we were not talking about technology at that time but some life related matters but the quote held onto me. And, it is so true, even the most complex problems seem simple enough when they are abstracted enough. But then as they say, the devil is in the details.
Carlos Morales
Wednesday, July 29, 2009
I humbly have to diverge from your definition of abstraction. Abstraction, from my perspective, is not about what to be visible for the external world but what you want to be visible in your model for whoever that happens to be interested in it. When one creates a model out of something in the real world we say we are ‘abstracting’ that entity. By abstracting we imply removing unnecessary details or things that are of no relevance for the problem we want to tackle. Within this context, abstraction is the process of deciding what to include in the model and what not to in order to build a model that a) correctly reflects the entity in the real world and, at the same time b) allows our programs to deal with only the relevant details.
Hope this enriches your own perspective.
Respectfully,
Carlos
vikashazrati
Thursday, July 30, 2009
May be I did not understand that completely but I think your concept and mine are related as both of them talk about hiding what is not essential or hiding in your model what you do not want consumers [who are interested in the model] to see.
so in essence i agree with
Please let me know if you meant anything else.
regards | Vikas
Kayla Dueno
Wednesday, February 3, 2010
First-rate work. You have got a brand-new devotee. Please keep up the fabulous work and I look forward to more of your newsworthy posts.
muhammad nawaz
Sunday, January 9, 2011
This is alright..
But what is on higher level like abstraction and then under it comes encapsulation and information hiding.??