Design patterns criticism sources

后端 未结 7 611
梦毁少年i
梦毁少年i 2020-12-30 01:13

I was reading the design patterns page on Wikipedia, particularly the \"Criticism\" section.

Could you point me to some articles or books about shortcomings of desig

7条回答
  •  一整个雨季
    2020-12-30 01:47

    Having lived through the times when the GoF book was published (ca 1995), I recall reading that a major impetus (or at least a reason for so much attention), was that OOD was still new to most developers. There was a dearth of understanding of how to make Objects at all.

    So this book came out showing some common patterns of making classes and how they worked together.

    So a criticism to this: it may not be as relevant now as it was then. Back then, and for a few years afterward there were not as many frameworks (especially in Java) as there would come to be in the years afterward. Now, you can find a lot of examples of good Object Oriented code. Wouldn't it be nice if some authors took snapshots of very good OO codebases aside, and wrote books about why they think they are so wonderful?

    To me, the best use of these patterns is to know them when you see them, understand the drawbacks (see 'Visitor Pattern' and note which parts of the system are more easily expanded), and take those lessons as you write your own code.

提交回复
热议问题