From 0 to 1: Design Patterns - 24 That Matter - In Java
- 11.5 hours on-demand video
- 63 downloadable resources
- Full lifetime access
- Access on mobile and TV
- Certificate of Completion
Get your team access to 4,000+ top Udemy courses anytime, anywhere.Try Udemy for Business
- Identify situations that call for the use of a Design Pattern
- Understand each of 24 Design Patterns - when, how, why and why not to use them
- Distill the principles that lie behind the Design Patterns, and apply these in coding and in life, whether or not a Design Pattern is needed
- Spot programming idioms that are actually built on Design Patterns, but that are now hiding in plain sight
We - the course instructors - start with introductions. We are a husband-wife team, studied at Stanford, and spent several years working in top tech companies, including Google, Flipkart and Microsoft.
Next, we talk about the target audience for this course: Engineers and Product Managers, certainly, but also Tech Executives and Investors, or anyone who has some curiosity about technology.
By the end of this class, students will be able to: spot situations where design patterns lead to better designs, and deploy those patterns effectively. Product managers and executives will learn enough of the 'how' to be able intelligently converse with their engineering counterparts, without being constrained by it.
That's it for preliminaries - with this we plunge right in!
- "Design Patterns are canonical solutions to recurring problems". We start by understanding what Design Patterns are, and why these patterns are still so popular decades after they were first put together.
- Design Patterns, Libraries and Frameworks: A martial arts analogy illustrates the difference
- Broad Categories of Patterns: We also take a quick swing through the major categories of Design Patterns - creational, structural and behavioral.
Code should be open for extension but closed for modification. How can this be achieved? Well, there are 3 possible ways: inheritance, delegation, and composition.
Like children, code should only talk to friends, never to strangers!
Always rely only on abstractions, never on details. Oh - and don't call us, we'll call you. That's how Hollywood works, and that's how the Hollywood Principle reads.
Dependency Injection is a widely-used design technique that is closely related to the Strategy Design Pattern. This lecture details how dependency injection is used to specify complex user interfaces in Java FX using an XML representation called FXML. This is a common technique used in modern UI frameworks in Java.
Dependency Injection is a widely-used design technique that is closely related to the Strategy Design Pattern. This lecture continues detailing the use of dependency injection to specify complex user interfaces in Java FX, and then ties back to the Strategy Design Pattern
The Singleton Pattern is very elegant in its construction, but there are important nuances that we should be aware of, specifically related to multi-threading and to class loaders in Java. In this lecture, we explore how a concurrency-related Design Pattern called Double-Checked Locking can come in handy while implementing the Singleton in a multi-threaded environment.
The Adapter Pattern is often used in converting data from one representation to another: we understand how an adapter can help with loose coupling of classes. Also, classes need not be rewritten to support additional interfaces, a new adapter is all that is needed.
The Adapter Pattern is simple: an adapter takes in an object (usually singular) of one interface, and gives back another object (also singular) of another interface.
Models contain data, views define the UI, and controllers respond to user input and update the model and the view. We see how this plays out in a Media Player application.
- There are no pre-requisites other than curiosity - about Design, about Patterns, about Life :-)
- Prerequisites: Basic understanding of Java
- Taught by a Stanford-educated, ex-Googler, husband-wife team
- More than 50 real-world examples
This is an intensely practical, deeply thoughtful, and quirky take on 24 Design Patterns that matter.
Let’s parse that.
- The course is intensely practical, bursting with examples - the more important patterns have 3-6 examples each. More than 50 real-world Java examples in total.
- The course is deeply thoughtful, and it will coax and cajole you into thinking about the irreducible core of an idea - in the context of other patterns, overall programming idioms and evolution in usage.
- The course is also quirky. The examples are irreverent. Lots of little touches: repetition, zooming out so we remember the big picture, active learning with plenty of quizzes. There’s also a peppy soundtrack, and art - all shown by studies to improve cognition and recall.
- Lastly, the patterns matter because each of these 24 is a canonical solution to recurring problems.
- Decorator, Factory, Abstract Factory, Strategy, Singleton, Adapter, Facade, Template, Iterator, MVC, Observer, Command, Composite, Builder, Chain of Responsibility, Memento, Visitor, State, Flyweight, Bridge, Mediator, Prototype, Proxy, Double-Checked Locking and Dependency Injection.
- The only GoF pattern not covered is the Interpreter pattern, which we felt was too specialized and too far from today’s programming idiom; instead we include an increasingly important non-GoF pattern, Dependency Injection.
- Examples: Java Filestreams, Reflection, XML specification of UIs, Database handlers, Comparators, Document Auto-summarization, Python Iterator classes, Tables and Charts, Threading, Media players, Lambda functions, Menus, Undo/Redo functionality, Animations, SQL Query Builders, Exception handling, Activity Logging, Immutability of Strings, Remote Method Invocation, Serializable and Cloneable, networking.
- Dependency Inversion, Demeter’s Law, the Open-Closed Principle, loose and tight coupling, the differences between frameworks, libraries and design patterns.
- Yep! Engineers - from street-smart coders to wise architects - ought to take this course. After this class, you'll look at software design with a new pair of eyes.
- Yep! Product Managers ought to take this course - you will learn to understand the 'how' of Software Design without being constrained by it.
- Yep! Technology executives and investors who don't write code ought to take this course - after this you will always have an intelligent point-of-view on software, and won't find your eyes glazing over when its time to talk nitty-gritty
- Computer Science majors (undergrad or grad) - if you are among the folks that make 'real world example Observer Pattern' such a common search phrase on Google, this is precisely the place for you.
- Yep! Journalists, Wall Street types or IP lawyers seeking to understand recurring patterns of problems and solutions in technology.
- Yep! If you are prepping hard for software engineering interviews :-)
- Nope! This course is not right for you if you are looking for a Programming 101 course. That's not because there are pre-requisites, but simply because a Programming 101 course focuses on syntax, and on doing, while this course focuses on design, and on thinking.