Hi You know, some of the GOF patterns like Singleton or prototype are pretty simple. But some of them like factory method is clearly complicated.
What is your advise for understanding them quickly?
Thank you
Hi You know, some of the GOF patterns like Singleton or prototype are pretty simple. But some of them like factory method is clearly complicated.
What is your advise for understanding them quickly?
Thank you
Try reading Head First Design Patterns first. You'll find it's a much gentler introduction if GOF is over your head.
Anyway if you decide to read GOF book. Code the examples from the book. Practice a lot, then things get easier and easier.
Note, never try to force yourself to implement a pattern, just because you want to have it or 'cause it seems to be "cool" to use it. In most of such cases it will just add complexity. A pattern should naturally fit into your code and give you benefits such as reusability, higher testability, better maintainability,...
Generally speaking though, I find that learning patterns increases your coding skills dramatically.
Have fun
Design Patterns can be complex and I have met a lot of people who have misunderstood some details as they could not see the diffence between some patterns and where to use them.
You can learn much from books, casts or tutorials on the web. Any programming language or some best pracices on tools, go for the web. But on Design Patterns, look for a senior developer, who has some time. Talk with him, let him explain. Show him some code and ask him, which pattern could make your life easier in future. This helps you probably more than reading books.
I've been saying this the last few days a lot, but read these 2 ebooks, plenty of good info on how to design/develop/improve code.
imho the reason why is so easy to struggle with all the different patterns, is when you see them as a lot of unrelated pieces with no shared goal. The above ebook on SOLID is more about the principles involved, so you can see a clear story on what you gain.