Originally posted by Alvin chew: hi, wondering how to you guy choosing pattern, is it based on scenario? so before choose, do your have a very deep understanding on every pattern before choose the best suit pattern?

Yes, it's supposed to be based on a scenario you're facing. The idea is to look for known solutions for a problem you have, not to look for a problem to apply your known solution to.

Originally posted by Alvin chew: is it possible the IDE will support pattern as well ?

Yes, to some degree. For example, Rational's XDE has some kind of "design pattern wizards" that you can use to convert your source code to use patterns etc. based on templates. I have to say I'm very sceptical regarding those features -- it makes it too easy for a developer new to design patterns to auto-apply design patterns all around the codebase without giving it any thought and essentially making the codebase "instant legacy" a bit like many GUI builders have done.

Originally posted by Alvin chew: hi, wondering how to you guy choosing pattern, is it based on scenario? so before choose, do your have a very deep understanding on every pattern before choose the best suit pattern?

One definition of a pattern is a known solution to a recurring problem, so identifying it is some kind of scenario.

I think that to be good at refactoring to, towards or away from patterns you need to understand design smell and design solutions. You can learn about smell by studying the Coding Smells chapter in my book and in Fowler's Refactoring. I can't stress enough how important it is to understand these smells. Without knowing what is wrong with designs, it is really hard to know how to improve them. Once you get comfortable with the smells, you can then study the patterns literature. Some say that it is easier to learn patterns by studying pattern-directed refactorings, like the few you'll find in Fowler's Refactoring and the many you'll find in my book. However, it is also useful to study books like Design Patterns, or well-written patterns workbooks, like the ones by Steve Metsker. I know there are many books for us all to read -- yet it really is vital to read the best patterns and refactorings texts, for they address the very heart of design.