Creational Design Patterns in Java
3.8 (28 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
3,657 students enrolled

Creational Design Patterns in Java

Creational design patterns in Java
3.8 (28 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
3,657 students enrolled
Created by Somnath Musib
Last updated 8/2019
English
English [Auto]
Current price: $16.99 Original price: $24.99 Discount: 32% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 1 hour on-demand video
  • 5 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Design Patterns
Course content
Expand all 6 lectures 56:41
+ Introduction
1 lecture 02:04

In this lecture, we discussed about design patterns and different types of them - Creational, Structural and Behavioral patterns. We then further discussed types of creational design patterns.

Preview 02:04
+ Singleton
1 lecture 16:58

This video tutorial talks about Singleton design pattern in Java. A singleton is required in an application if  there is a need of only one instance of that type. For example, in Java Virtual Machine, Runtime is singleton as there must be only one runtime instance in a JVM.


Singleton can be implemented in multiple ways:-

  • Eager Initialization

  • Lazy Initialization

  • Lazy Initialization (Thread Safe)

  • Lazy Initialization (Double checking)

  • Bill Pugh Implementation

  • Enum Implementation

There are several ways singleton can be exploited and singleton implementation must take care of these issues:-

  • Serialization

  • Reflection

  • Clone

Preview 16:58
+ Factory Design Pattern
1 lecture 07:14

This video lecture talks about factory design pattern in Java. As the name suggests, a factory is generally used to create object of specific types. In general, there are interface or abstract classes as the parent class and multiple sub-classes  implements/extends parent type behavior and provide more specific behavior. A factory can create all these sub types.

Preview 07:14
+ Builder Design Pattern
1 lecture 07:55

This video lecture talks about builder design pattern in Java. A builder design is a creational design pattern and is used to build objects. It is specifically useful when the object has many optional parameters. Through builder pattern, we can force the user to provide only the mandatory parameters and then provide optional setter method to  add optional parameters based on the need.

Builder Design Pattern
07:55
+ Prototype Design Pattern
1 lecture 05:42

This video lecture discusses prototype design pattern in Java. As the name suggests, it is used to create objects from a prototype. It is useful in situations when creating the actual object directly is costly. For example, each object creation may fetch data from network or database severs and thus requires time to prepare the object. With prototype design pattern we can create the base object and keep the data ready. For each subsequent object references, we clone the existing object and return to the caller.

Prototype Design Pattern
05:42
+ Abstract Factory Design Pattern
1 lecture 16:48

This video talks about abstract factory design pattern. An abstract factory pattern is factory of factories. In factory pattern, we have seen how we can create specific types of objects which belongs to a particular parent type. This design pattern takes the same concept one level further. In abstract factory pattern we create factory from multiple factory options and then get the required object from the selected factory.

Abstract Factory Design Pattern
16:48
Requirements
  • Should have basic knowledge in Java
Description

In this series, we discuss design patterns in Java. We focused on what is design pattern and different types of pattern. We then closely looked into the Creational design patterns. We talked about Singleton, Factory, Builder, Prototype and Abstract Factory design patterns. Each design pattern is discussed with real life examples and demonstrated with live coding.

Who this course is for:
  • Anyone