This chapter discusses the use of factories—objects that make other objects. Although factories are presented in the Gang of Four book, their use in design is not discussed fully.
• Discusses why the use of factories can greatly simplify your design and code.
• Explains the proper steps of seeing first what your objects are and then deciding how to create and/or manage them.
Usually, when I am designing objects, I am concerned with their behavior: what the objects do and how other objects tell them to do it. But I also need to be concerned about figuring out when a ...