Join Elisabeth Robson for an in-depth discussion in this video What you should know before watching this course, part of Programming Foundations: Design Patterns.
In this course, we expect that you already have some object-oriented programming experience. It doesn't necessarily have to be experience with Java, but you do need experience using objects. And to understand concepts such as, abstraction, inheritance, and polymorphism. We'll also assume that you know the basics of class diagrams. We won't go crazy with full-blown UML diagrams but we will use class diagrams to indicate abstract versus concrete classes and relationships like inheritance and composition.
If these topics sound new to you, you might want to start by viewing The Fundamentals of Programming: Object-Oriented Design. Even though we use Java as our main language in this course, our true focus is on the patterns. For each pattern, we'll learn about the motivation of the pattern, the general design of the pattern, and how that pattern is applied at the class and object level. Of course, at some point, we need to make it real, so that's where we'll employ Java on a simple but real world example. Even if you aren't familiar with Java, you should be able to follow along.
What we really want is for you to take away from this course the best practices you can apply to any object-oriented design or language. If you're testing the examples, it doesn't matter what platform you're using as long as you can run Java on your computer. Whether that's Macintosh, Windows, or Linux, you can follow along with the examples we'll be working with in this course. We do expect you to know your way around a computer and that you know how to install and run Java on your chosen operating system. We'll be using Eclipse to demonstrate editing, compiling, and running our Java examples.
But you don't need Eclipse. You can use another IDE or even run Java at the command line. And all the examples should work fine. As we said, we'll be using some simple UML-like diagrams to show the structure of each design pattern. We don't expect you to know UML. You'll be able to get the basic idea of how a design pattern works from the simple diagrams that we'll explain as we go. One thing that you should know is that design patterns are a deep subject. It can take repeated exposure for you to absorb all the concepts in design patterns.
Remember, many of these patterns were developed over a long period of working with object-oriented designs. So as we go through this course, don't worry if you don't fully understand a pattern the first time. If you feel like you're getting it at, say 80%, then keep going. You can always come back and watch the videos again to help it all sink in even more the second time around. We also encourage you to try to apply these patterns to your own problems. If you're working on a programming project of your own or one at work, take a look at the problems you're solving there.
Are there places where you could apply the pattern? You may also want to revisit this course several months from now after you've had a chance to put some of the patterns into practice. You'll probably find new ways to understand design patterns, along with new ways to think about how you apply them in your code.
- What are design patterns?
- Encapsulating code that varies with the strategy pattern
- Setting behavior dynamically
- Implementing the observer pattern
- Creating chaos with inheritance
- Extending behavior with composition
- Dealing with multithreading and the singleton pattern
- Revising the design for a state machine
- Encapsulating iteration with the collection pattern
- Encapsulating object creation with the factory method pattern