The text of this article is not in this database — only its details are. Read it on the old site: Strategy Pattern Definition and Contrived Example
4 Comments
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.
The text of this article is not in this database — only its details are. Read it on the old site: Strategy Pattern Definition and Contrived Example
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.
Dinesh BeniwalPosted Dec 26, 2014, 10:48 PM
Good start Leslie, welcome to C# Corner.
Leslie McCutcheonPosted Dec 26, 2014, 4:11 PM
Thank you very much for the feedback. Sam Hobbs you make very interesting and valid points and I am sure it would be very useful in certain circumstances to model an application based on a more traditional OOP methodology. I can see a few "instances" where the natural categorization would not really work in a computer object hierarchy if you favour today's best practices. For example convergent evolution, when two separate species lineages develop similar form/function/behaviour. I completely agree with you though, it is very difficult to decide how your solution will be structured. I try to stick with the KISS approach of creating simple but extendible object hierarchies as the only thing that is certain in any program is change and unfortunately no matter how hard we try we cant (and wouldn't want to) anticipate every possibility.
Sam HobbsPosted Dec 26, 2014, 3:43 PM
Note that animals are categorized into a phylum, class, order, family, genus and species. I wonder if that is useful for computer object hierarchy. I realize that you are using animals just as an example. Perhaps the point of what I am saying is the difficulty of deciding how to categorize things and the comparison with the solution that has received very much attention.
Hemant SrivastavaPosted Dec 26, 2014, 11:31 AM
Quite informative and interesting! Yes I really enjoyed reading this article.