Start learning with our library of video tutorials taught by experts. Get started

Foundations of Programming: Design Patterns
Illustration by Mark Todd

Foundations of Programming: Design Patterns

with Elisabeth Robson and Eric Freeman

Video: Welcome

>> Hi, I'm Eric Freeman and
Expand all | Collapse all
  1. 6m 7s
    1. Welcome
      1m 5s
    2. What you should know before watching this course
      3m 9s
    3. Using the exercise files
      1m 53s
  2. 5m 36s
    1. Understanding the need for design patterns
      57s
    2. What are design patterns?
      3m 1s
    3. Using design patterns
      1m 38s
  3. 20m 56s
    1. Understanding the pitfalls of inheritance and interfaces
      6m 47s
    2. Encapsulating code that varies
      2m 45s
    3. Programming to an interface
      3m 13s
    4. Setting behavior dynamically
      4m 41s
    5. Exploring the strategy pattern
      1m 48s
    6. Understanding why HAS-A is better than IS-A
      1m 42s
  4. 19m 32s
    1. Using the observer pattern in the real world
      1m 32s
    2. Exploring the observer pattern
      2m 19s
    3. Understanding the observer pattern
      1m 41s
    4. Implementing the observer pattern
      5m 43s
    5. Using Java's Observer and Observable classes
      2m 56s
    6. Implementing the observer pattern with Java's Observer and Observable classes
      3m 22s
    7. The advantages of loose coupling
      1m 59s
  5. 17m 35s
    1. Creating chaos with inheritance
      2m 43s
    2. Understanding the open-closed principle
      2m 21s
    3. Extending behavior with composition
      1m 40s
    4. Understanding the decorator pattern
      1m 59s
    5. Implementing the decorator pattern
      5m 44s
    6. Understanding decorators in Java libraries
      1m 29s
    7. Using java.io decorators
      1m 39s
  6. 11m 26s
    1. What is the singleton pattern?
      2m 1s
    2. Understanding the classic singleton pattern
      2m 22s
    3. Implementing the classic singleton pattern
      2m 18s
    4. Dealing with multithreading
      1m 31s
    5. Improving the singleton pattern implementation
      3m 14s
  7. 16m 57s
    1. What is a state machine?
      3m 46s
    2. Revisiting the design for a state machine
      1m 50s
    3. Understanding the state pattern
      4m 39s
    4. Implementing the state pattern
      5m 23s
    5. Comparing the state and strategy patterns
      1m 19s
  8. 17m 24s
    1. Encapsulating iteration
      1m 3s
    2. Exploring the iterator pattern
      4m 53s
    3. Implementing the iterator pattern
      5m 35s
    4. Using Java's built-in iterators
      2m 25s
    5. Implementing with Java's built-in iterators
      2m 19s
    6. Making sure classes have only one responsibility
      1m 9s
  9. 17m 42s
    1. Encapsulating object creation
      1m 49s
    2. Understanding the Simple Factory idiom
      1m 52s
    3. Implementing the Simple Factory idiom
      5m 18s
    4. Exploring the factory method pattern
      4m 28s
    5. Implementing the factory method pattern
      4m 15s
  10. 6m 17s
    1. Looking at what we've done and where to go from here
      3m 28s
    2. Additional resources
      2m 49s

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
please wait ...
Foundations of Programming: Design Patterns
2h 19m Intermediate Dec 13, 2013

Viewers: in countries Watching now:

Design patterns are reusable solutions that solve the challenges software developers face over and over again. Rather than reinventing the wheel, learn how to make use of these proven and tested patterns that will make your software more reliable and flexible to change. This course will introduce you to design patterns and take you through seven of the most used object-oriented patterns that will make your development faster and easier. Elisabeth Robson and Eric Freeman, coauthors of Head First Design Patterns, join forces to provide an overview of each pattern and examples of the pattern in action. Featured design patterns include the strategy, observer, decorator, singleton, collection, state, and factory method patterns.

Topics include:
  • 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
Subjects:
Developer Design Patterns Programming Foundations
Software:
Java
Authors:
Elisabeth Robson Eric Freeman

Welcome

>> Hi, I'm Eric Freeman and welcome to Foundations of Programming: Design Patterns. >> And I'm Elizabeth Robson. Together, Eric and I will be your tour guides for this course. >> So what are design patterns? They're solutions to common software design problems that occur over and over in software development. >> We'll start by showing you how to dynamically change the behavior of your classes with the strategy, decorator, and state patterns. Then we'll show you how to manage communication between objects with the observer pattern.

Next we'll show you how to manage object creation with the singleton pattern. And we'll show you how to encapsulate those aspects of your code that are likely to change with the iterator and factory patterns. >> I'll start off by giving you a broad overview of each design pattern to introduce the concepts and to describe how the pattern works. >> And then I'll dive a little deeper into the pattern, and show you how to implement a design in code. This is where you get to see the design patterns in action. >> We've got a lot to cover, so let's get started.

Find answers to the most frequently asked questions about Foundations of Programming: Design Patterns.


Expand all | Collapse all
please wait ...
Q: How do I import the exercise files in Eclipse?
A: Here are instructions for importing the files:
 
1) Save the download folder as any name you choose, such as DesignPatternsLynda. Place this folder in the default Eclipse project folder (the folder you choose when you start Eclipse).
2) Start Eclipse.
3) In Eclipse, choose File > New > New Java Project.
4) In the first New Project dialog box, use the folder name from step 1 as the project name. Check that the location path matches the default Eclipse project path and the name of the folder. (See NewProject.jpg.)

5) Click Next.
6) In this dialog box, leave all settings as is (see Step2.jpg):

7) Click Finish.
8) You should now have a project in Eclipse with the following structure (see EclipseProjectStructure.jpg):

9) To compile the code, open the folder you want to work with and choose the main class.
10) Choose Run > Run As > Java Application.
 
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Foundations of Programming: Design Patterns.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.