xxi
Preface
Welcome to the journey. It is my privilege to present Java Design Patterns. Before jumping into the topic,
I want to highlight a few points about the topic and contents:
#1. You are an intelligent person. You have chosen a topic that can assist you throughout your career. If
you are a developer/programmer, you need these concepts. If you are an architect at a software organization,
you need these concepts. If you are a college student, you need these concepts—not only to achieve good
grades but also to enter into the corporate world. Even if you are a tester who needs to take care of the white
box testing or simply to know about the code paths of the product, these concepts will help you a lot.
#2. This book is written in Java, but the focus is not on the language construct of Java. I has made the
examples simple in such a way that if you are familiar with any other popular language (C#, C++, etc.) you
can still easily grasp the concept. Except in a few special places, I have made his best effort to follow the
naming conventions used in Java.
#3. There are many books on this topic or a related topic. Then why was I interested in adding a new one
in the same area? The true and simple answer for this question is: I found that the materials on this topic are
scattered. In most cases, many of those examples are unnecessarily big and complex. I always like simple
examples. He believes that anyone can grasp an idea with simple examples first. And when the concept is
clear, readers are motivated to delve deeper. I believe that this book scores high in this area. The examples
used here are simple. I didn’t want to make the book fat, but he did want to make it concise and simple. He
wants to grow interest about this topic in your mind—so that, you can also motivate yourself to continue the
journey and to dig further with the concepts in your professional fields.
#4. Each of the topics is divided into seven parts—the definition, the core concept, a real-life example, a
computer/coding world example, a UML class diagram, a sample program with a high-level view in Package
Explorer and output of the program. So, even before you enter into the coding parts, you will be able to form
some impression in your mind. These examples are chosen in such a way that you will be able to get back to
the core concepts with these examples whenever you need to do so.
#5. Please remember that you have just started the journey. You have to consistently think about these
concepts and try to write codes, and only then will you master this area. I was also involved (and am still
involved!) in the journey. The sources/references are only a small part of this journey. I went through a large
number of materials and ultimately he picked up those which made his concept clearer. So, he is grateful to
the authors of those sources because those resources helped him ultimately to clear his doubts and increase his
interest in the topic. I am also grateful to his family and friends for their continuous help and support.
#6. Though the patterns described here are broadly classified into three categories—creational,
structural, and behavioral—all similar patterns are not grouped together here, so before you start with the
examples, concepts, and definition, you can test your understanding—which category is your pattern falling
under. Also, you can start with any pattern you like.
#7. No book can be completed without the reader’s feedback and support. So, please share your
comments and feedback to truly complete this book and enhance my work in the future.
#8. Always check for the most updated version available in the market. I have decided to highlight the
key changes at the beginning of the book. So that you can also update your copy accordingly whenever a
new update appears in this book.
—Vaskaran Sarcar
www.it-ebooks.info