March 31, 2004

Program to an interface not an implementation.

One of the tenets of the GOF is to program to an interface, not an implementation.

So what does that mean? An object's interface is the collection of methods that can be called. If you exploit a creational pattern, you will be using an interface to a an abstract class to instantiate a concrete class, instead of directly instantiate the implementation of the concrete class.

Posted by Elyse at March 31, 2004 7:40 AM | TrackBack
Comments
Post a comment









Remember personal info?