Are you familiar with design patterns and in particular, the
factory method design pattern? I'm just learning about them now and find them fascinating. A useful book if you are somewhat new to all this like me is the
"Head First Design Patterns". The most famous and seminal book on this subject is
"Design Patterns" by "the Gang of Four" (Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides).
A decent web page on this can be found
here.