1、软件体系结构1. 简介,孙志岗, ,2,2018/9/21,“软件体系结构”你早就知道,Client/ServerThree-tierP2PDistributed, ,3,2018/9/21,“建筑体系结构”, ,4,2018/9/21,“建筑体系结构”, ,5,2018/9/21,SA的定义,“There is no standard, universally-accepted definition of the term, for software architecture is a field in its infancy, although its roots run deep in
2、software engineering. ”http:/www.sei.cmu.edu/architecture/definitions.html, ,6,2018/9/21,SA的定义,Booch, Rumbaugh, and Jacobson, 1999:An architecture is the set of significant decisions about the organization of a software system, the selection of the structural elements and their interfaces by which t
3、he system is composed, together with their behavior as specified in the collaborations among those elements, the composition of these structural and behavioral elements into progressively larger subsystems, and the architectural style that guides this organization-these elements and their interfaces
4、, their collaborations, and their composition (The UML Modeling Language User Guide, Addison-Wesley, 1999)., ,7,2018/9/21,SA的定义,Perry and Wolf, 1992:A set of architectural (or, if you will, design) elements that have a particular form. Perry and Wolf distinguish between processing elements, data ele
5、ments, and connecting elements, and this taxonomy by and large persists through most other definitions and approaches., ,8,2018/9/21,SA的定义,Garlan and Shaw, 1993:.beyond the algorithms and data structures of the computation; designing and specifying the overall system structure emerges as a new kind
6、of problem. Structural issues include gross organization and global control structure; protocols for communication, synchronization, and data access; assignment of functionality to design elements; physical distribution; composition of design elements; scaling and performance; and selection among de
7、sign alternatives., ,9,2018/9/21,SA的定义,后人精简Garlan and Shaw的定义为:体系结构 = 组件 + 连接件 + 约束Architecture = Components + Connectors + Constrains, ,10,2018/9/21,SA之重要,最早指出SA的重要性的是大师Edsger Dijkstra(1930-2002)“.the larger the project, the more essential the structuring!”(1968),http:/www.cs.utexas.edu/users/EWD/h
8、ttp:/www.cs.utexas.edu/users/EWD/ewd01xx/EWD196.PDF, ,11,2018/9/21,程序=?,程序 = 算法 + 数据结构(1960s )程序 = 子程序 + 子程序(1970s )对象 = 算法 + 数据结构程序 = 对象 + 对象(1980s)程序 = 组件 + 连接件(1990s), ,12,2018/9/21,SA之重要,好的软件体系结构,是好的软件的必要条件。“Good architectural design has always been a major factor in determining the success of a
9、 software system.”, ,13,2018/9/21,SA在SE中的地位,Guide to the Software Engineering Body of Knowledge (SWEBOK)from http:/www.swebok.org/ IEEE, ,14,2018/9/21,Software Structure and Architecture, ,15,2018/9/21,什么是“工程”?,定义有很多,通常来说:用最少的代价解决问题 . 目的是处理实际的难题 . 以科学知识为手段 . 建造工具 . 服务于人类目标:使普通人能做以前只有专家圣手才能做的事情, ,16,
10、2018/9/21,工程的进化, ,17,2018/9/21,工程化的步伐, ,18,2018/9/21,规范化循环,专门的解决方法,土方法,规范化,模型与理论,新的问题,实践提高, ,19,2018/9/21,SA的先哲, ,20,2018/9/21,SA发展,1980s使用非正式的框图依靠专家的特定经验不规范、多样地使用体系结构模式和风格1990s认识到了体系结构的价值开发过程中要求体系结构文档,并开始体系结构评审产品化、商业化的体系结构标准和组件集成框架开始出现规范化体系结构设计中的词汇、符号和工具软件体系结构的书籍和课程2000s?, ,21,2018/9/21,好的体系结构,与大多数
11、好的设计一样是一系列相容的原理和技术的产物,在项目的各个阶段保持一致在各种变化面前表现出弹性在产品的整个生命周期中充当向导重用成熟的工程知识, ,22,2018/9/21,DeRemer 和 Kron 说(1976),“Structuring a large collection of modules to form a “system” is an essentially distinct and different intellectual activity from that of constructing the individual modules.”“Correspondingly, we believe that essentially distinct and different languages should be used for the two activities.”,