Tuesday, May 22, 2007

Interfaces -The Contractual Agreements.

An Interface is a contractual agreement between the publishers of the interface and the subscribers of the interface.The publishers assures that they will not change the interface specification. The subscribers are agreed upon implementing the interface without fail in their component.




Where I see an Interface...?

As OOP is derived from the knowledge of how humans perceive things around them, we should be able to find it around us. I see the charging mobile phone-Nokia N73. I see interface there! There is an interface specified by Nokia for attaching charger so that even third party chargers in compliance with it can be plugged and used. I have seen a many cheap non-Nokia chargers in stores. what makes it possible? Interface Implementation. I felt two things are taken care here at least-Voltage Conversion and Shape. If not a better conversion of voltage, the circuits would have been burned. If no structural matching, It would have been tough to plug it there.



I have a PC. I can attach monitor to it-LG, DELL,PHILIPS etc.

The PC maker as well as Monitor manufacturer is agreed upon certain standards. So that two other concepts are originated....
  • Polymorphism
  • Concurrent & Third Party Component Development

I 'll discuss these in another post.


No comments: