Friday, September 18, 2009

Encapsulation

Technorati Tags: ,

Click here for the beginning of this series 

2. Encapsulation: Encapsulation is from Encapsulate meaning to cover or wrap. This is the process of hiding the complexity of a resource by using a simple interface. This can be seen on our computers all the time as we use the operating system[OS] or an application without actually keying in commands and data in the form of 0’s and 1’s which is the only thing a computer actually works with due to the fact that 0 is the off state and 1 the on state. The operating system does this using a layer that sits between the actual hardware and the applications/other parts of the OS. This allows us to run a program written for windows on any machine running on the windows OS in spite of the motherboard, processor, and other hardware components being different; this is also called Hardware Abstraction. Since the interaction is confined to the user interface or the Applications Programming Interfaces [API] there is less complexity. Another example would be how the Java Runtime Environment [JRE] creates the same “container” inside multiple Operating Systems enabling a Java developer to write a program that can run on any OS platform.

No comments:

Post a Comment