Record Your Rationale

本文强调了在软件架构设计中记录决策理由的重要性。通过记录为何选择特定方案及其涉及的权衡,可以确保所有相关人员理解设计背后的原因。此外,这些文档有助于未来的决策调整及项目的交接。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Record Your Rationale

Timothy High

THERE iS MuCH dEBATE in the software development community about the value of documentation, especially with regard to the design of the software itself. The disagreements generally cluster around the perceived value of doing a “big upfront design,” and the difficulties of maintaining design documenta- tion synchronized with an ever-changing code base.
One type of documentation that ages well, doesn’t require much effort, and almost always pays off is a record of the rationale behind decisions that are made regarding the software architecture. As explained in Mark Richards’s axiom “Architectural Tradeoffs,” the definition of a software architecture is all about choosing the right tradeoffs between various quality attributes, cost, time, and other factors. It should be made clear to you, your managers, developers, and other software stakeholders why one solution was chosen over another and what tradeoffs this entailed. (Did you sacrifice horizontal scal- ability in the name of reducing hardware and licensing costs? Was security such a concern that it was acceptable to increase the overall response time in exchange for data encryption?)
The exact format of this documentation can vary according to what is appro- priate for your project, from quick notes in a text document, wiki, or blog, to using a more formal template to record all aspects of each architectural decision. Whatever the form and format, the documentation should answer the basic questions “What was that decision we made?”, and “Why did we make that decision?”. A secondary question that is often asked and should be documented is “What other solutions were considered, and why were they rejected?” (actually, the question usually asked is, “Why can’t we do it my way?”). The documentation should also be searchable so that you can easily find it whenever it’s needed.

This documentation may come in handy in a number of situations:
• As a means of communication to developers regarding important archi- tectural principles that should be followed
• To get the team “on the same page,” or even head off a mutiny, when devel- opers question the logic behind the architecture (or even to humbly accept criticism if it turns out a decision doesn’t hold up under scrutiny)
• To show managers and stakeholders exactly why the software is being built the way it is (such as why an expensive piece of hardware or software is necessary)
• When handing off the project to a new architect (how many times have you inherited a piece of software and wondered exactly why the designers did it THAT way?)
However, the most important benefits that come from this practice are:
• It forces you to be explicit about your reasoning in order to verify that your foundations are solid (see the next axiom “Challenge Assumptions— Especially Your Own”).
• It can be used as a starting point to re-evaluate a decision when the condi- tions that influenced it have changed.
The effort required to create this documentation is equivalent to jotting down a few notes whenever you have a meeting or discussion on the subject. What- ever the format you choose, this is one type of documentation that is worth the investment.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值