
Master design patterns across creational, structural, and behavioral categories, including singleton and factory. Explore flyweight, adapter, command, dependency injection, inversion of control, Java EE patterns, and movie ticket use case.
Download a zip of course slides containing a keynote file for Mac and a PowerPoint file for Windows, for quick revision during interviews or presentations within your organization.
Install Java 8 or JDK 8 by downloading Java SE Development Kit from first link, accept the license, and run the OS-specific installer (exe on Windows, dmg on Mac, Linux/Solaris).
Install spring tool suite, download the package for your os, unzip, and launch sts. Create and set your workspace to begin developing spring-based projects.
Configure the Spring Tool Suite to use the correct JDK by pointing the standard VM to your JDK home, and remove JRE entries to prevent Maven and Java compilation issues.
Master Java design patterns with a hands-on course covering core patterns, dao projects, intercepting filter, and movie tickets use case.
Complete each section's assignment on your own and submit for review via the lecture resources. Download the PDF with code and configuration as a reference, and work from scratch.
Master design patterns such as dependency injection, inversion of control, and presentation layer patterns, with Spring Boot knowledge, and learn to create a Spring Boot project using Spring Tool Suite.
Identify design patterns as reusable solutions to recurring problems within a given context, tracing civil engineering origins and GOF influence, illustrated by singleton and model-view-controller patterns.
Capture the complete design experience by identifying problems and documenting solutions. Reuse solutions across projects, improve structure, and establish a common language with patterns like mvc and singleton.
Identify if a problem matches a catalog design pattern and reuse its solution; otherwise document a candidate pattern and track recurrence across projects to become a design pattern.
Explore Java design patterns by examining GoF core catalog and the Java EE catalog. Learn creational, structural, and behavioral patterns such as singleton, factory, abstract factory, builder, prototype.
Explore how the Java EE pattern catalog maps to presentation, business, data access, and integration layers, with patterns like intercepting filter, front controller, MVC, context object, business delegate, and DAO.
Learn how the singleton pattern ensures one instance of a class is shared across the application, with a property reader, a logger, and a data source with connection pool.
Examine a UML diagram of the dateutil singleton class, featuring a private constructor, a static instance field, and a public static getInstance method to return the single object.
Implement the singleton pattern by declaring a private constructor and a static method to obtain the instance, with a static member and exploring eager, static block, and lazy initialization.
Create a Dateutil singleton class in java by defining a private constructor, a static getInstance method, and a static instance field that initializes only when null.
Test a Java singleton by creating a test class with a main method, invoking getInstance from a private constructor, and confirming two references point to the same object using ==.
Explore eager and lazy initialization in the singleton pattern, using static variables and static blocks to create a dateutil instance. Learn when to prefer lazy initialization for singleton use.
Ensure a singleton remains thread safe when multiple threads call getInstance, preventing multiple instances by using synchronized access or a synchronized code block. Apply a class level lock on dateutil.class.
Improve multi-threading logic in singleton by performing a null check before locking, lock only if the instance is null, and mark the static variable as volatile.
Demonstrate that serializing and deserializing a singleton yields a different instance, and outline making the class serializable with object streams while hinting at a fix in the next lecture.
Explore how to solve singleton problem during deserialization by implementing readResolve in your classes to return the same instance from the object input stream, with readResolve kept protected or private.
To protect singletons, implement the Cloneable interface and override the clone method to throw CloneNotSupportedException, preventing cloning by any client or subclass.
Shows how the Java reflection API can break a singleton by accessing private constructors and creating a second instance, then hints that enums fix this in the next lecture.
Explore using a Java enum to implement a singleton that resists reflection, accessed via enum singleton demo.instance, with a name field demonstrating state management.
Explore how the factory pattern hides object creation in a creational design, illustrated by car, chocolate, and toy factories and by JDBC drivers and a pizza store.
Demonstrates the factory pattern UML class diagram by identifying product types, defining a base interface, and letting the factory create concrete implementations such as veg and cheese pizzas for clients.
Implement a pizza store usecase by defining a pizza interface with prepare, bake, and cut, creating cheese, chicken, and veggie pizzas, and preparing for the factory pattern next lecture.
Create a test class to exercise pizza store by instantiating veggie and chicken pizzas and running the Java application to observe preparing, baking, and cutting, with factory class introduced next.
Move pizza creation into a pizza factory class with a static create pizza method that takes a string type and returns a pizza, enabling reuse and removing the if-else ladder.
Master the factory design pattern and the abstract factory pattern as a factory of factories. See how document builder and DAO factories manage object creation.
Illustrate the abstract factory uml diagram with two factories—the xml dao factory and the db dao factory—both implementing a dao factory interface and a dao maker selecting the right factory.
Implement the abstract factory design pattern by creating dao interfaces and concrete xml and db daos, plus xml and db dao factories and a dao abstract factory for end-to-end testing.
Create a factory of factories that produces dao factories, then test the pattern with a client test class. Switch between xml and db dao factories to save employees or departments.
Explore the template method pattern, a behavioral design that uses a base template method while child classes override read and process data, and the base render method displays data consistently.
Implement a template method design pattern using a base class with a render method that calls abstract read data and process data methods overridden by xml and csv renderers.
Introduce the template method design pattern by implementing an abstract data renderer with a concrete render and abstract read data and process data, plus XML and CSV renderers.
Explore building a test class as a view for the template method, using an xml data renderer to render and process data with debugging, and switchable csv rendering.
Explore the adapter pattern and how it bridges mismatched interfaces, like a power adapter. See a weather adapter that converts a zip code to a city to fetch weather data.
Demonstrates the adapter pattern in UML by letting a weather UI fetch weather through an adapter that translates zip codes to cities and calls the weather finder.
implement the adapter pattern by creating a weather finder interface and an impl that returns a city's weather, and build a weather user interface to display temperature.
Implement the adapter pattern with a weather adapter that converts a zip code to a city and retrieves temperature via the weather finder, so the UI relies on the adapter.
Explore the flyweight design pattern to reduce memory usage by reusing shape objects in a paint app, using a shape interface with circle and rectangle implementations.
This lecture introduces the flyweight pattern by building a simple paint app with a shape interface and two shapes, circle and rectangle, each implementing draw.
Create a paint app that draws circles and rectangles using a render method, a shape array, and runtime polymorphism, then reduce object creation with the flyweight pattern.
Learn to solve problems with the flyweight pattern by isolating extrinsic state, passing it as method parameters, and using a factory to create circles and rectangles for drawing.
Apply the flyweight pattern by identifying extrinsic state for circles and rectangles, pass it as draw parameters, and build a factory to cache shape objects.
Explains a flyweight factory with a getShape method that creates circles or rectangles and caches them in a hash map for reuse.
Update the paint app by implementing the flyweight pattern: use a shape factory and a hash map to create only two objects, circle and rectangle, and draw with extrinsic state.
Explore the UML class diagram for a paint app, where circle and rectangle implement a shape interface, and a flyway design pattern factory reuses shapes with extrinsic state for drawing.
Explore the command design pattern, encapsulating a request as an object and decoupling the invoker, client, and receiver, illustrated by a TV remote example.
Explore the command design pattern with a UML class diagram, showing the client, invoker, and receiver (television) interacting through a command interface and concrete on and off commands.
Implement the command pattern by creating a television receiver, command interface, on and off commands, and a remote control invoker to execute commands.
Explore the command pattern by modeling a person, a television receiver, and a remote control invoker to execute on and off commands.
The ONLY course that covers the all the important java core and web design patterns!!
---
Sample of the reviews:
The concepts are explained in simple and efficient manner. Its easy to understand and since real world scenarios are used as examples able to better relate and retain the concepts learnt. - suriya n
So far, course seems like a perfect match of what i wanted to learn, and I love the hands on aspect! Looking forward to continuing! Thank you! :- Stacey D McCauley
Amazing info, resources, and very concise and in depth knowledge that I thought would never be in any online video/tutorial as well as the categories of it. I think the Singleton is a bad design pattern, but other than that this course is perfect - Nicholas Powell
Respond
---
All source code is available for download
Responsive Instructor - All questions answered within 24 hours
Professional video and audio recordings (check the free previews)
----
Do you have the knowledge of java and want to master java design patterns, then this course is for you.If you are an experienced java developer who wants to fill in any gaps in your knowledge of java design patterns and learn the common design language to communicate with other developers then this course is for you too.
Patterns are reusable solutions to recurring problems arising during software development.This course will introduce you to the important Core(Gang Of Four) and Java EE design patterns.You will understand what each pattern is ,why we need it and then work on implementing it hands on.
The goal of this course is to help you master the concepts of java design patterns,why we need them and implement them from scratch.By the time you finish this course, you will have gained the understanding of Java Design Patterns ,i.e Creational Patterns,Structural Patterns and Behavioral Patterns.You will also learn the Dependency Injection and Inversion Of Control Patterns.You will master the different layers that make up a java EE application and how the design patterns fit in to those layers.You will implement Presentation Layer patterns such as Front Controller ,Model View Controller (MVC) .You will also work with Data Access Object Pattern to connect and work with databases.You will then use all of those together along with business layer patterns to work on a small use-case/project.
What Will I Learn?
Learn what design patterns are and why we need them
Understand and implement the Creational Patterns
Understand and implement the Behavioral Patterns
Understand and implement the Structural Patterns
Use Dependency Injection and Inversion of Control Patterns
Master the Java EE presentation layer patterns
Implement a mini project using the MVC and Business Layer Patterns
All in simple and easy steps