I've always been a fan of learning design patterns. There like the puzzle pieces of programming you fit together to make this run smoothly and code look sexy as hell.
So lets get this conversation rolling.
- What are some of your most used patterns?
- What have you learned from that code design pattern?
- Have you picked up on any new design patterns and if so what have they taught you?
1) For me its been the repository pattern since I write c# for work. It separates my controller/view code from the database layer by providing interface abstractions to the data layer. I quite enjoy it since it keeps things fairly separate and easy to change.
2) What I've learned from this is that code changes... a lot. Its tough to predict what design pattern to use, and you should never go in with the mind set of using a design pattern, thats the domain or business layers job. I've also learned about really making your code as agnostic and dumb to other modules/namespaces etc from each other so you don't start tripping over your feet once you are waist deep in software.
3) Lately I've been reading up on DCI in Ruby and the Metaphor pattern in Rails.
More about the metaphor pattern
Edited by Andre Dublin, 15 August 2013 - 02:23 AM.