提到软件的架构,就不能回避”架构模式”这个概念了,深谙面向对象的架构师总会在适当的情景下使用适当的架构模式来设计系统的框架;
而那些反对面向对象,崇尚”KISS”原则的Linux Geek总是会对此不屑一顾。当然,对于同一件事情,不同的人有不同的看法,所以”面向模式”还是”非面向模式”不应当有好坏之分,只是不同的人在不同的技术背景和架构方式下的选择,重要的是”选择一种方法,尽可能好的架构系统”。
万事万物都有其内在的规律,于是《设计模式》这本书的作者就从软件开发的过程中抽象出了23种常用的解决问题的设计模式。
对于架构师而言,受限于所处的领域以及知识结构,所了解的架构模式也是很有限的,所以,可能在大多数情况下,对于一个系统的架构更多的是基于自己已知的架构模式中所作的选择,可能并不是最优的。要想突破自身架构能力的局限而在设计过程中去选用更好的架构模式,就需要对大多数的架构模式有所了解,这样在必要的情况下可以进行权衡和取值。这里向大家推荐如下的经典”面向模式的软件架构”系统书籍:
Pattern-Oriented Software Architecture: A System of Patterns, Volume 1
POSA1 is the first volume in the POSA series and was published in 1996. This book represents the progression and evolution of the pattern approach into a system of patterns capable of describing and documenting large-scale applications. The patterns presented in this book span several levels of abstractions from high-level architectural patterns and medium-level design patterns to low-level idioms.
Pattern-Oriented Software Architecture: Patterns for Concurrent and Networked Objects, Volume 2
POSA2 is the second volume in the POSA series and was published in 2000. The 17 patterns in POSA2 form the basis of a pattern language that addresses issues associated with concurrency and networking. This material represents a range of patterns from idioms to architecture designs. The patterns cover core elements of building concurrent and networked systems: service access and configuration, event handling, synchronization, and concurrency. All patterns present extensive examples and the pattern known uses are presented in various programming languages, including C++, C, and Java.
Pattern-Oriented Software Architecture: Patterns for Resource Management, Volume 3
POSA3 is the third volume in the POSA series and was published in 2003. It uses patterns to present techniques for implementing effective resource management in a system. The patterns are covered in detail, making use of several examples, and, as in previous POSA volumes, directions are given on how to implement the presented patterns. Additionally, the volume presents a thorough introduction into resource management, and two case studies where the patterns are applied to the domains of ad hoc networking and mobile radio networks. The patterns are grouped by different areas of resource management and hence address the complete lifecycle of resources: resource acquisition, coordination and release.
Pattern-Oriented Software Architecture: A Pattern Language for Distributed Computing, Volume 4
POSA4 is the fourth volume in the POSA series and was published in 2007. It describes a pattern language for distributed computing that guides readers through the best practices and introduce them to key areas of building distributed software systems. POSA4 connects hundreds of stand-alone patterns, pattern collections, and pattern languages from the existing body of literature found in the POSA series. Such patterns relate to and are useful for distributed computing to a single language. The book provides a consistent and coherent holistic view on the craft of building distributed systems.
Pattern-Oriented Software Architecture: On Patterns and Pattern Languages, Volume 5
POSA5 is the fifth volume in the POSA series and was published in 2007. It offers an in-depth look of what patterns are, what they are not, and how to use them successfully. This book addresses the question of what a pattern language is and compares various paradigms in the pattern concept, including pattern compounds, pattern complements, pattern collections, pattern stories, and pattern sequences.