Really nice and worth for gaining knowledge.Thanks for that. Humble request you to make videos on the other missed Design Patterns as well. Many Thanks.
Hi Naveen,I am preparing a introductory video set for freshers in my team and I have selected many of your basic online lessons. Thank you for the videos..real time saver for me.👏 One question: what's the background behind the hello aliens greetings and object names in your video? Nation wants to know.🧐
Hey .. i m new in this learning journey of Design Pattern . This video was really helpful but i m confused in this one thing , who is this "client" ? I m sure its not the end user .. is it someone who's gonna use that result to work further? A fellow programmer ?
It is the Factory Design Pattern. The Simple Factory uses the Factory Design pattern with one caveat. In this example he is simply demonstrating abstracting away the creation of a product from the client. Extending it to the Factory Design Pattern means instead of simple abstracting away the creation, you're controlling the creation and management of that newly created product. Such as Spring and bean creation. So not exactly the same thing, you're right, but it is a demonstration of one element of the Factory Design Pattern.
Hi Naveen, when we are adding OS obj = osf.getInstance("something"), it means we are modifying the client class and we need to compile it. How is this different from directly creating object of IOS class?
When you'll create a full project ... Then this string will be taken from the user from the frontend and based on that we r creating object and returning it. So user doesn't need to create object , he only needs to type the string and thus object creation stays hidden!
Those who think Windows is not dying and still it holds >=75% market, please have a look on the package he created. Mr. Alien is talking about phones not desktops :) .
The only thing you are missing, is why? as in, you could use the args[] to pass the OS type at run time, depending on what OS you are running, therefore having a dynamic application based on what is passed to it by the caller
It very nice, but do you think your OperatingSystemFactory class is violation of "Open Closed Principle"? I think we should use other way instead if-else
i think its better to package all 3 OS with interface and make those classes default rather public and then make a public factory there in the same package without if/else. that would be more secure
In ur explain u can take also template design pattern need to modification required just create one super template class and here declare all the abstract method and override it but in future any thing modification required then only go to the super class and modified without any ur os and android class
This guy has a lot of great videos, learned a lot from his videos. Although for this one, and some of his videos he doesn't really explain the purpose clearly, why would you do that? why bother? also factory classes for most implementations I saw , then getInstance method is static, makes sense, you don't need to create new factory every time you want some object. Also some best practices would help, like some implementations I see enum as the param type of getInstance.
When you say that your exposing to the client the implementation () e.g when you do new Windows(); or new Android():, what does that mean? Who is the client? How does the client see the code? Isn't that the user who is using your application? Please clarify
Factory design pattern = if you are creating object on the basis of some condition(here based on the parameter that is passed) then it is known as factory design pattern.
I was watching kudvenkat video and there this factory method was explained as Simple Factory and there was different code for Factory Method, so is this true that it's Simple Factory Method?
Nice video... I have a question about inheritance and polymorphism. I am creating a static method in child class which have private constructor. And the parent class have same private constructor and stayic method. Parent class extends GrandParent class which have public constructor with 3 arguments. My problem is the error shown in child class for making its own constructor. Can you please show me any direction.
Why will it not change clint class u are still passing string as input in fiture u want new object then u need another string so it changes clint … however if there is a change in contruction of object of previously existing then only it will not change clint code
Didn't understand from line 5 in OperatingSystemFactory.java.....We generally declare methods directly why r u creating as public Os getinstnce()......plz explain
1lakh views and not even 1k+ likes... Guys don't just watch the video and go... At least show some respect to this guy and his work.
I guess reason is being his opinion about Windows 😀
Simple and straightforward explanation, this gonna stick with me forever as a Dev. Thx Nev
That happy realization that its "instance" not intance :D
🤣🤣
Thanks for very easy to grasp explanation! It was actually much easier than we think if presented right. Kudos!
I have watch many videos for this . finally got a simple understanding explanation for factory design pattern. tysm
Clear, simple, nice and effective way to teach Factory Design Pattern! Super helpful to me!
Its simpler to understand than other videos in youtube
Really nice and worth for gaining knowledge.Thanks for that. Humble request you to make videos on the other missed Design Patterns as well. Many Thanks.
Hi Naveen,I am preparing a introductory video set for freshers in my team and I have selected many of your basic online lessons. Thank you for the videos..real time saver for me.👏
One question: what's the background behind the hello aliens greetings and object names in your video? Nation wants to know.🧐
Hey .. i m new in this learning journey of Design Pattern . This video was really helpful but i m confused in this one thing , who is this "client" ? I m sure its not the end user .. is it someone who's gonna use that result to work further? A fellow programmer ?
Thanks.. excellent and simple .. way understanding .. for a layman
your video is crystal clear i got my understanding right from you thank you!
What you have described is not the Factory Method Design Pattern. I think you're describing the Simple Factory which isn't an actual design pattern.
yes
It is the Factory Design Pattern. The Simple Factory uses the Factory Design pattern with one caveat. In this example he is simply demonstrating abstracting away the creation of a product from the client. Extending it to the Factory Design Pattern means instead of simple abstracting away the creation, you're controlling the creation and management of that newly created product. Such as Spring and bean creation. So not exactly the same thing, you're right, but it is a demonstration of one element of the Factory Design Pattern.
People who have disliked his videos are those who are using Windows mobiles :p
Or perhaps they disliked it because it's not accurate. What's described is not the Factory Method Design Pattern.
@@risteardob2095 what is it then?
😂 you mean, they gonna die
This is the most straightforward implementation I've seen so far. Thanks a lot.
Your sense of Humour is Amazing. Windows OS: " I'm about to die" lol
Thank you! wonderful explanation.
Absolute life saver, so much clearer than my lecture
This is a really nice and simple to understand explanation, thank you so much!
Yes it is, because this isn't Factory Method :)
3:44
even I also laughed so hard on that....
But it is not dying does it ? It still holds 75 pc market share today in desktop os
I really liked your comments about the mobile operating systems :D btw nice explanation , keep it like that !
Thankyou very much sir. Really to the point explanation.
Really a awesome video I got clear knowledge about design patterns especially factory design patterns.🙏🙏
Hi Naveen, when we are adding OS obj = osf.getInstance("something"), it means we are modifying the client class and we need to compile it. How is this different from directly creating object of IOS class?
When you'll create a full project ... Then this string will be taken from the user from the frontend and based on that we r creating object and returning it.
So user doesn't need to create object , he only needs to type the string and thus object creation stays hidden!
Can you please also tell how can we use it with @Autowire
I want to be able to switch between the two databases using factory pattern.
7 years later and I am still watching it.
What you have said in this video is a simple factory..
Thank you Navin, it is clear and precise
Those who think Windows is not dying and still it holds >=75% market, please have a look on the package he created. Mr. Alien is talking about phones not desktops :) .
The only thing you are missing, is why? as in, you could use the args[] to pass the OS type at run time, depending on what OS you are running, therefore having a dynamic application based on what is passed to it by the caller
It very nice, but do you think your OperatingSystemFactory class is violation of "Open Closed Principle"? I think we should use other way instead if-else
What if we use hashmap for that ?
i think its better to package all 3 OS with interface and make those classes default rather public and then make a public factory there in the same package without if/else. that would be more secure
Thank you so much sir for explaining design patterns
To the point. It really helped me. Thanks so much!
how much do you hate windows?
Naveen Reddy : yes
Easy and quick explanation like other java pattern examples. Thanks for your hard work you put in to make us understand.
amazing
very easily explained
Thank You for the clear explanation.
Nice and simple to understand 👍👍👍👍
Good for cross browser testing during automation testing using java
Thanks a lot clear explanation.❤
Excellent example! Keep it up.
Awaiting for more...!! Amazing... thank you!
I like your humor as well as teaching skills :D
Thank you ,It is clear, Please let me know if we have a video for abstract factory design pattern
Think you sir. This is very helpful.
@
Everything Summed up in a nicely compact informative Session
In ur explain u can take also template design pattern need to modification required just create one super template class and here declare all the abstract method and override it but in future any thing modification required then only go to the super class and modified without any ur os and android class
Thank you for this 🙏
Hi Navin, Can you take video for Abstract Factory design pattern ?
Awesome
Really amazing explanation..
This guy has a lot of great videos, learned a lot from his videos. Although for this one, and some of his videos he doesn't really explain the purpose clearly, why would you do that? why bother? also factory classes for most implementations I saw , then getInstance method is static, makes sense, you don't need to create new factory every time you want some object. Also some best practices would help, like some implementations I see enum as the param type of getInstance.
Nice tutorial...I suggest you add abstract factory design pattern
THANKS SO MUCH
This happens when you make a video without studying about the real pattern.
Nice Explanation
When you say that your exposing to the client the implementation () e.g when you do new Windows(); or new Android():, what does that mean? Who is the client? How does the client see the code? Isn't that the user who is using your application? Please clarify
@ridhwaan any The client is the class using the objects of the different OS
Think of this code as DLL and client is consuming that DLL
Factory design pattern = if you are creating object on the basis of some condition(here based on the parameter that is passed) then it is known as factory design pattern.
Super bro👍
Nice one , cleared a lot about FDP Thank you
Thank You, Naveen!
Could you please explain abstract factory pattern and difference between factory and abstract
Can you add real life video example with spring ? …switching between databases auto wiring with factory
Nice explanation bro!!!
I watch all your ads on all videos
Very nice and simple tutorial....good job..
skip to 3:44 and thank me later :000
Great tutorial, thank you
PERFECT !!
as the usual, clear and nice explanation
great job sir
Thanks!
ekdam mast samjhaya hai thank you :)
Thank you!!!!
Hi Sir, thanks for presenting this topic in such an understandable manner!
This is very similar to Facade Pattern! whats the difference between them ?
nice explanantion....... very helpful
amazing explanation
Nice attempt Naveen. But purpose of using it is not clear?
Can we create this getInstance method as a static method in OS interface?
What if we want to add more Operating systems but don't want to make changes in OperatingSystemFactory. Is there any way to do this?
Shouldnt we implement singleton also here for maximum optimisation
Thank bhai
I was watching kudvenkat video and there this factory method was explained as Simple Factory and there was different code for Factory Method, so is this true that it's Simple Factory Method?
its good if OperatingSystemFactory is made singleton instead of using new operator in client code, isn't it?
2:35 Android does not implement OS interface. Mistake but seems you correct it later
Thank you
factory design pattern is only use to the minimal modification is required but again we are not achieving the complete loosely couple
thanks a lotttttttttttttttttttttttttttttttttttttttttttttttttttttttt
Very good human in the planet
Nice video...
I have a question about inheritance and polymorphism. I am creating a static method in child class which have private constructor. And the parent class have same private constructor and stayic method. Parent class extends GrandParent class which have public constructor with 3 arguments.
My problem is the error shown in child class for making its own constructor.
Can you please show me any direction.
Let’s say I have an optional parameter for 1 type of object.
What do I do now ?
Why will it not change clint class u are still passing string as input in fiture u want new object then u need another string so it changes clint … however if there is a change in contruction of object of previously existing then only it will not change clint code
Can you please make videos on decorator and strategic design pattern
In operating system factory why didn't we import android iOS, Windows packages?
Good content and explanation buddy
What you call importing the package is importing the class.
Didn't understand from line 5 in OperatingSystemFactory.java.....We generally declare methods directly why r u creating as public Os getinstnce()......plz explain
Windows.. about to die; Lol; love it.
your extra space and wrong spelling in the video just drives me crazy.
Thanks