Design Pattern is a common topic in talks, forums and even in a 15 min break conversation at work. You can find a lot of stuff on books or the internet about it and a lot of examples using rubber ducks 🦆, coffee shop ☕ and pizza stores 🍕.When I started studying I usually understand the pattern but I had a lot of trouble, thinking about how to apply them to my code. I understand that the Factory pattern is used to create objects but why do I need it? Do I really need a Factory to create my objects?My goal with this post is to bring some real examples of some design patterns that I used in my projects.StrategyThe strategy pattern enables selecting an algorithm at runtime. Instead of implementing a single algorithm directly, code receives runtime instructions as to which in a family of algorithms to use.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

swift,design-patterns,ios