Which php design pattern is more powerfull? [closed]
I want to know that from all the 5 common pattern for the php (The factory pattern, The singleton pattern,The observer pattern,The chain-of-command pattern,The strategy pattern) which one is more recommended , powerful and easy to use as well ?
The one that best fits the problem at hand. Design patterns are tools, not a way of life.
Have you read anything about them? They are solving completely different problems - is like you would compare apples with grapes - which one of them better?
Each pattern is as powerfull as the programer who is building the application at hand. Unskilled programers tend to use the patterns is an incorrect way, or not the actual mentioned way a pattern should be used.
Each pattern is equally "strong" or usefull if used and applied in the right situation and right coding enviorment.
Learn all 5 of them, read about them and ask of search for specific usages for them .
精彩评论