Factory Design Pattern in Spring boot app

preview_player
Показать описание
In this video I have implemented Factory design pattern in spring boot and explained best practices of implementing Factory design.
This video cover real time use of Factory pattern and Hashmap.
This is the part 1 of the video where I explained in one way to implement Factory Pattern there will be part 2 to explain other way of doing the same.
Git hub link of this project is as below.
Рекомендации по теме
Комментарии
Автор

Hello, how are you?… I came across this video looking for a good implementation of Factory Method pattern in Springboot.

This is not the factory method design pattern of GOF. This is a Simple Factory, programming idiom.

This doesn’t follow SOLID principles. Your implementation is open for modification.
(If you have to add a new vehicle you have to modify your factory. )

You are partly correct. You have Vehicle interface (product) and its concrete classes.
But You don’t have an abstract class (for creator) and it’s concrete classes. (Eg: BicycleCreator class sub class for Creator). Then your factory will be closed for modification and open for extension. Yay SOLID

Looking forward for the video! Thank you!

rafijlouis
Автор

Really well explained. I was looking for these kinds of examples & explanations. Thank you, bro.

thinagharraj
Автор

Clearly explained.. thanks mate.. can you try explaining all design pattern as it is most important concept

srikanthk
Автор

Could you please guide on how to write junit test class for this using mockito?

karthikapratap
Автор

in postman url was wrong you give localhost:port : is missing

raghuls
Автор

Can you point out the flow of this project..

adarshmohan
Автор

Man you don't even know how base URL looks like and typed localhost/8080 instead of localhost:8080

shubhampal
welcome to shbcf.ru