O'Reilly logo

Component Development for the Java™ Platform by Stuart Dabbs Halloway

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 1. From Objects to Components

Well-written Java programs are both object-oriented and component-oriented. This chapter characterizes the differences between object and component perspectives, and then it demonstrates these differences by taking a program design that is object-oriented and modifying it to be component-oriented as well.

Consider an example problem domain of contact management systems. One important facet of this domain is the ability to find contacts based on a variety of different criteria. Listing 1-1 shows a partial listing for the Contact and FindContact interfaces.

Listing 1-1. Contact and FindContact Interfaces
 package contacts; public interface Contact { public String getLastName(); public void setLastName(String ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required