軟件架構(gòu)的視角骗污,視點及利益相關(guān)者

系統(tǒng)必然是復(fù)雜的崇猫,如何清晰準備的描述一個系統(tǒng),是架構(gòu)工作的困難之處需忿。有兩個架構(gòu)觀點诅炉,雖然各有側(cè)重,但是殊途同歸屋厘,都是軟件架構(gòu)的基本方法涕烧。需要注意的是,這兩個架構(gòu)觀點對視圖的定義和理解略有不同汗洒,視點應(yīng)該就是視圖议纯。

“4+1”視圖模型

面對復(fù)雜和不確定的業(yè)務(wù)需求,為了避免盲人摸象的局面溢谤,使用視圖和視點的方法是比較有效的瞻凤。Philippe Kruchten在他的文章《Architectural Blueprints—The “4+1” ViewModel of Software Architecture》詳細介紹“4+1”視圖模型憨攒。在這個模型中,視圖是指從不同的利益相關(guān)者的角度來描述系統(tǒng)阀参,利益相關(guān)者可以是最終用戶肝集,開發(fā)者,也可以是項目經(jīng)理蛛壳。由此杏瞻,4個視圖就分別是邏輯視圖,開發(fā)視圖炕吸,進程視圖和物理視圖伐憾。另外“+1”的視圖是選擇一些用例和場景來描述架構(gòu)勉痴。

4+1視圖模型

開發(fā)視圖:開發(fā)視圖是從程序員赫模,以及軟件管理的角度來描述系統(tǒng)。這個視圖也被稱為實現(xiàn)視圖蒸矛,往往使用UML組件圖來描述系統(tǒng)構(gòu)成瀑罗。

邏輯視圖:邏輯視圖主要描述系統(tǒng)為最終用戶提供的功能。一般對應(yīng)于UML工具的類圖雏掠,狀態(tài)圖等斩祭。

物理視圖:物理視圖是從一個系統(tǒng)工程師的角度來描述系統(tǒng)。這個視圖關(guān)切軟件組件在物理層拓撲結(jié)構(gòu)以及組件之間的物理連接乡话,通常也被稱為部署視圖摧玫。UML工具中稱為部署圖。

進程視圖:進程視圖處理系統(tǒng)的動態(tài)方面绑青,比如系統(tǒng)的進程之間如何通信以及運行時的行為诬像,比如并發(fā),分布式闸婴,集成坏挠,性能,擴展性等邪乍。UML工具用活動圖來表示降狠。

場景視圖:場景視圖使用一些用例或者場景來描述進程和對象之間的交互,并且用來驗證架構(gòu)設(shè)計庇楞,也是架構(gòu)原型的測試起點榜配。

使用視點和視角與利益相關(guān)者合作

使用視點和視角與利益相關(guān)者合作的觀點是由NickRozanski和Eoin Woods在《軟件系統(tǒng)架構(gòu):使用視點和視角與利益相關(guān)者合作(原書第2版)》一書中闡述的。如果說有哪本書可以作為軟件架構(gòu)的教科書的話吕晌,那么非此書莫屬蛋褥。什么是架構(gòu)?為什么架構(gòu)在工作中至關(guān)重要聂使?如何確定架構(gòu)的利益相關(guān)者以及他們的關(guān)切壁拉?如何在實現(xiàn)和需求之間尋找平衡谬俄?如何和利益相關(guān)者溝通你的架構(gòu)并且展示你的架構(gòu)滿足了他們需求?如何集中精力在架構(gòu)關(guān)鍵點上而不犧牲性能和可靠性弃理?作為架構(gòu)師你最重要的活動是什么溃论?這些問題,都會在書中獲得答案痘昌。

全書的三個重要概念分別是視圖钥勋,視點和利益相關(guān)者。利益相關(guān)者是構(gòu)建系統(tǒng)的所有人辆苔,而這些人的需求是復(fù)雜多樣算灸,相互重疊甚至是相互沖突的。架構(gòu)師的主要工作就是要知道如何與利益相關(guān)者一切工作驻啤,并且創(chuàng)造一個滿足所有人需求的架構(gòu)菲驴。視點(視角)是基于利益相關(guān)者的關(guān)切,結(jié)構(gòu)化的描述架構(gòu)和定義架構(gòu)的方法骑冗。視圖是視點的補充赊瞬,主要作用是分割關(guān)切點,但主要關(guān)注跨結(jié)構(gòu)的質(zhì)量屬性而不是結(jié)構(gòu)本身贼涩。

利益相關(guān)者

架構(gòu)的利益相關(guān)者不僅僅只是那些使用軟件的人巧涧,包括構(gòu)建,測試遥倦,運維等所有對軟件系統(tǒng)有興趣的人谤绳。

A?stakeholder?inthe architecture of a system is an individual, team, organization, or classesthereof, having an interest in the realization of the system.

架構(gòu)師如果在設(shè)計初期漏掉一個利益相關(guān)者,那么比如在未來付出代價袒哥。架構(gòu)還需要在不同的利益相關(guān)者之間缩筛,沖突的需求之間做出可靠,合理的抉擇统诺。需要注意的是歪脏,架構(gòu)師本人也是一個利益相關(guān)者,必須代表自己充分的發(fā)出聲音粮呢。

The architect must ensure that there isadequate stakeholder representation across the board, including nontechnologystakeholders (such as acquirers and users) and technology-focused ones (such asdevelopers, system administrators, and maintainers).

根據(jù)角色列出利益相關(guān)者和他們關(guān)切如下:

Acquirers

Oversee the ?procurement of the system or product

Assessors

Oversee the ?system’s conformance to standards and legal regulation

Communicators

Explain the ?system to other stakeholders via its documentation and training materials

Developers

Construct and ?deploy the system from specifications (or lead the teams that do this)

Maintainers

Manage the ?evolution of the system once it is operational

Production ?Engineers

Design, ?deploy, and manage the hardware and software environments in which the system ?will be built, tested, and run

Suppliers

Build and/or ?supply the hardware, software, or infrastructure on which the system will run

Support Staff

Provide ?support to users for the product or system when it is running

System ?Administrators

Run the system ?once it has been deployed

Testers

Test the ?system to ensure that it is suitable for use

Users

Define the ?system’s functionality and ultimately make use of it

視點

在系統(tǒng)設(shè)計過程中婿失,有一些問題是繞不開的:

架構(gòu)的主要功能組件是什么?

系統(tǒng)內(nèi)組件之間是如何交互的啄寡?組件與外部如何交互豪硅?

系統(tǒng)的信息如何管理,存儲和表示挺物?

為了支持系統(tǒng)的這些功能懒浮,需要什么樣的硬件和軟件組件?

需要提供什么的運維功能?

需要提供哪些開發(fā)砚著,測試次伶,支持,培訓(xùn)環(huán)境稽穆?

這么多問題冠王,如何理出頭緒?單一視角很難描述一個復(fù)雜系統(tǒng)架構(gòu)舌镶。

和“4+1”視圖模型一樣柱彻,視點就是用結(jié)構(gòu)化的多視點方式來解決上面一連串問題。

It is not possible tocapture the functional features and quality properties of a complex system in asingle comprehensible model that is understandable by and of value to allstakeholders.

視點(視圖)

在“4+1”視圖模型之后餐胀,IEEE Standard 1471更是通過標準的方式推廣這種架構(gòu)方法哟楷。

A?viewpoint?isa collection of patterns, templates, and conventions for constructing one typeof view. It defines the stakeholders whose concerns are reflected in theviewpoint and the guidelines, principles, and template models for constructingits views.

下面是一些視點及其定義,供參考否灾。

Context

Describes ?the relationships, dependencies, and interactions between the system and its ?environment (the people, systems, and external entities with which it ?interacts). Many architecture descriptions focus on views that model the system’s ?internal structures, data elements, interactions, and operation. Architects ?tend to assume that the “outward-facing” information — the system’s runtime ?context, its scope and requirements, and so forth – is clearly and ?unambiguously defined elsewhere. However, you often need to include a ?definition of the system’s context as part of your architectural description.

Functional

Describes ?the system’s functional elements, their responsibilities, interfaces, and ?primary interactions. A Functional view is the cornerstone of most ADs and is ?often the first part of the description that stakeholders try to read. It ?drives the shape of other system structures such as the information ?structure, concurrency structure, deployment structure, and so on. It also ?has a significant impact on the system’s quality properties such as its ?ability to change, its ability to be secured, and its runtime performance.

Information

Describes ?the way that the architecture stores, manipulates, manages, and distributes ?information. The ultimate purpose of virtually any computer system is to ?manipulate information in some form, and this viewpoint develops a complete ?but high-level view of static data structure and information flow. The ?objective of this analysis is to answer the big questions around content, ?structure, ownership, latency, references, and data migration.

Concurrency

Describes ?the concurrency structure of the system and maps functional elements to concurrency ?units to clearly identify the parts of the system that can execute ?concurrently and how this is coordinated and controlled. This entails the ?creation of models that show the process and thread structures that the ?system will use and the interprocess communication mechanisms used to ?coordinate their operation.

Development

Describes ?the architecture that supports the software development process. Development ?views communicate the aspects of the architecture of interest to those ?stakeholders involved in building, testing, maintaining, and enhancing the ?system.

Deployment

Describes ?the environment into which the system will be deployed, including capturing ?the dependencies the system has on its runtime environment. This view ?captures the hardware environment that your system needs (primarily the ?processing nodes, network interconnections, and disk storage facilities ?required), the technical environment requirements for each element, and the ?mapping of the software elements to the runtime environment that will execute ?them.

Operational

Describes ?how the system will be operated, administered, and supported when it is ?running in its production environment. For all but the simplest systems, ?installing, managing, and operating the system is a significant task that ?must be considered and planned at design time. The aim of the Operational ?viewpoint is to identify system-wide strategies for addressing the ?operational concerns of the system’s stakeholders and to identify solutions ?that address these.

視圖

視點的方式本質(zhì)是做減法卖擅,分割關(guān)注點,單點突破坟冲,而視圖是用來做加法的磨镶,并且達到一加一大于二的效果溃蔫。這就是架構(gòu)的質(zhì)量屬性健提!由于用戶對質(zhì)量屬性的漠視,架構(gòu)往往成為項目管理鐵三角中用來犧牲和放棄的對象伟叛。在軟件實現(xiàn)過程中私痹,質(zhì)量屬性也往往被作為非功能需求而放棄。而這往往是架構(gòu)失敗的根源统刮。

An?architectural perspective?is a collection of activities,tactics, and guidelines that are used to ensure that a system exhibits aparticular set of related quality properties that require consideration acrossa number of the system’s architectural views.

因此紊遵,視圖期望提供一個質(zhì)量屬性框架,促使架構(gòu)師重新審視架構(gòu)中各個視點的設(shè)計和實現(xiàn)侥蒙。也就是在視點中應(yīng)用視圖暗膜。

視圖

一些視圖及其定義,供參考:

Accessibility

The ?ability of the system to be used by people with disabilities

Availability and Resilience

The ?ability of the system to be fully or partly operational as and when required ?and to effectively handle failures that could affect system availability

Development Resource

The ?ability of the system to be designed, built, deployed, and operated within ?known constraints around people, budget, time, and materials

Evolution

The ?ability of the system to be flexible in the face of the inevitable change ?that all systems experience after deployment, balanced against the costs of ?providing such flexibility

Internationalization

The ?ability of the system to be independent from any particular language, ?country, or cultural group

Location

The ?ability of the system to overcome problems brought about by the absolute ?location of its elements and the distances between them

Performance and Scalability

The ?ability of the system to predictably execute within its mandated performance ?profile and to handle increased processing volumes

Regulation

The ?ability of the system to conform to local and international laws, quasi-legal ?regulations, company policies, and other rules and standards

Security

The ?ability of the system to reliably control, monitor, and audit who can perform ?what actions on what resources and to detect and recover from failures in ?security mechanisms

Usability

The ?ease with which people who interact with the system can work effectively

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末鞭衩,一起剝皮案震驚了整個濱河市学搜,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌论衍,老刑警劉巖瑞佩,帶你破解...
    沈念sama閱讀 206,968評論 6 482
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異坯台,居然都是意外死亡炬丸,警方通過查閱死者的電腦和手機,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 88,601評論 2 382
  • 文/潘曉璐 我一進店門蜒蕾,熙熙樓的掌柜王于貴愁眉苦臉地迎上來稠炬,“玉大人焕阿,你說我怎么就攤上這事∈灼簦” “怎么了捣鲸?”我有些...
    開封第一講書人閱讀 153,220評論 0 344
  • 文/不壞的土叔 我叫張陵,是天一觀的道長闽坡。 經(jīng)常有香客問我栽惶,道長,這世上最難降的妖魔是什么疾嗅? 我笑而不...
    開封第一講書人閱讀 55,416評論 1 279
  • 正文 為了忘掉前任外厂,我火速辦了婚禮,結(jié)果婚禮上代承,老公的妹妹穿的比我還像新娘汁蝶。我一直安慰自己,他們只是感情好论悴,可當我...
    茶點故事閱讀 64,425評論 5 374
  • 文/花漫 我一把揭開白布掖棉。 她就那樣靜靜地躺著,像睡著了一般膀估。 火紅的嫁衣襯著肌膚如雪幔亥。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 49,144評論 1 285
  • 那天察纯,我揣著相機與錄音帕棉,去河邊找鬼。 笑死饼记,一個胖子當著我的面吹牛香伴,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播具则,決...
    沈念sama閱讀 38,432評論 3 401
  • 文/蒼蘭香墨 我猛地睜開眼即纲,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了博肋?” 一聲冷哼從身側(cè)響起低斋,我...
    開封第一講書人閱讀 37,088評論 0 261
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎束昵,沒想到半個月后拔稳,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 43,586評論 1 300
  • 正文 獨居荒郊野嶺守林人離奇死亡锹雏,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 36,028評論 2 325
  • 正文 我和宋清朗相戀三年巴比,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點故事閱讀 38,137評論 1 334
  • 序言:一個原本活蹦亂跳的男人離奇死亡轻绞,死狀恐怖采记,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情,我是刑警寧澤,帶...
    沈念sama閱讀 33,783評論 4 324
  • 正文 年R本政府宣布吊洼,位于F島的核電站,受9級特大地震影響既棺,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜懒叛,卻給世界環(huán)境...
    茶點故事閱讀 39,343評論 3 307
  • 文/蒙蒙 一丸冕、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧薛窥,春花似錦胖烛、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,333評論 0 19
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至罢杉,卻和暖如春趟畏,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背屑那。 一陣腳步聲響...
    開封第一講書人閱讀 31,559評論 1 262
  • 我被黑心中介騙來泰國打工拱镐, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留,地道東北人持际。 一個月前我還...
    沈念sama閱讀 45,595評論 2 355
  • 正文 我出身青樓,卻偏偏與公主長得像哗咆,于是被迫代替她去往敵國和親蜘欲。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當晚...
    茶點故事閱讀 42,901評論 2 345

推薦閱讀更多精彩內(nèi)容