Software engineering has been using interfaces for over 25 years. The distinction between interfaces and implementations is an important issue of object-oriented software system design. Java supports this distinction, yet for many developers, in particular with a C++ or Smalltalk background, the proper use of interfaces may not be intuitive right from the beginning. This article briefly discusses the general distinction between interfaces and classes as interface implementations, and then describes how to deal with interface inheritance and how to factor implementations to maximize code reuse. The implementation of a simple CORBA-based naming service is used as an ongoing example.
Dirk Riehle and Erica Dubach. "Working with Java Interfaces and Classes: How to Maximize Design and Code Reuse in the Face of Inheritance." Java Report 4, 10 (October 1999). Page 34pp.
The paper is available as a PDF file.
Copyright (©) 1999 Dirk Riehle, Erica Dubach, and SIGS Publications. All Rights Reserved.