Head First. Design patterns (Head First. Design patterns) (Category Architecture)
Today I wanted to recall this book about design patterns, which came out in the Head First series and looks like a comic book:) Eric Freeman, former CTO Disney Online and co-creator of the entire Head First series. The book itself came out in the middle. 2000It quickly became a hit with developers. It is understood in simple language. 23 Classical design patterns. The authors applied a “visually rich format designed with the brain in mind,” providing the text with many illustrations, jokes and exercises. Instead of a dry theory, there are living examples and puzzles. The unique style of presentation made the study of patterns fascinating. Compare this pitch to the classic.Object-oriented design patternsFrom Gang of Four (Gangs of Four:)
The patterns in Head First are explained in vivid metaphors from real life. For example, the strategy pattern is illustrated by the behavior of different ducks у, and the Decorator pattern by the additions to the basic coffee recipe у️. This approach helped readers immediately see the practical benefits of templates. Not surprisingly, the book has already helped hundreds of thousands of developers build design skills.
Now the main ideas of the book remain relevant, although the languages themselves have changed. Therefore, in 2019 An updated edition came out this year. Many patterns are still at the core of modern software: some are embedded in languages. (iterators, event observers)Others are implemented in frameworks. The book is also valuable because it teaches the basic principles of OO design. (For example, “program at the interface rather than implementation level” and “prefer composition over inheritance”). These ideas formed the basis of later rules like SOLID and did not lose their importance.
Of course, something has changed over the years. Some classic techniques are implemented differently today – for example, Singleton is increasingly being replaced by addiction injection, and lambda functions have made it easier to use Strategy. But the concepts themselves haven’t gone away: understanding templates still helps build flexible architecture and supported code.
In general, if we talk about the development of patterns, then some of the classic patterns of Gang of Four were criticized by experts for the fact that many of them only compensate for the limitations of languages. So, Peter Norwig found out that 16 from 23 GoF patterns are actually unnecessary or simplified when implemented on Lisp. But at the same time, new template catalogs for different areas have appeared. Templates have penetrated to the level of architecture: Enterprise Patterns for corporate systems, Integration patterns These are the corpus systems, and then microservices patterns for cloud services. Today, engineers widely use patterns such as the Gateway API, Circuit Breaker and Event Sourcing - standard solutions to typical distributed system problems.
As a result, Eric Freeman’s book remains a great guide for those who want to learn how to design applications. The book shows that you can learn architectural techniques easily and with a smile. And knowing patterns is the baggage that will enable an engineer to confidently build complex systems both yesterday and today.
#Patterns #Software #SoftwareArchitecture #SoftwareDevelopment #Architecture #SystemDesign