Interface Design
<< Function Oriented Classes
Page 3: Object Oriented Classes
Object-Orientated classes have all the good things like encapsulation, inheritance and polymorphism. Object-Oriented interfaces are used in Java API's such as JDBC.
They offer FAT interfaces to maximise performance and flexibility. A lot of methods are often exposed that accept heavy architectural objects, such as Database connections. These so called API interfaces are implementation specific and require a lot of hand coding.
Here is an example Object Oriented file handler implementation, called FileObject:
public class FileObject
{
public setFile( File file ) {...}
public File getFile() {...}
public void setContent( String content ) {}
public String getContent() {...}
}
>> Next Page: Service Oriented Classes
<< Back to Design
<< Back to Software Reality
|