The easiest way to learn design patterns by Fiodar Sazanavets

The easiest way to learn design patterns by Fiodar Sazanavets

Author:Fiodar Sazanavets [Fiodar Sazanavets]
Language: eng
Format: epub
Publisher: leanpub.com
Published: 2022-02-08T00:00:00+00:00


So, as you can see, we are using inbuilt operating system detector to conditionally choose the concrete implementation of the Factory. Then, we type a path to the file that we want to play and the software will play it. User doesn’t need to care what operating system the software is on. It will work exactly the same.

And this concludes our example of Factory Method implementation. Let’s now have a look at the specific benefits we gain from using this design pattern.

Benefits of using Factory Method



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.