Apache Commons

Handling complex object state with design

Some APIs that implement a complex object state management often violate the single responsibility principle and make the usage very difficult. When you do all aspects of the complex state management in one inferface the interface’s methods must be invoked in the chronological correct order. Such APIs are hard to understand and to integrate. What we really want are APIs that guide the client code programmers in such situations. Lets take a look at an API that breaks the single responsibility principle and let us think about the consequences for the client code programmer. If you take a look at the FTPClient API of apache commons you can see that all… Read More »Handling complex object state with design