📄 +
字号:
24335;计算技术要求有一ķ=
81;可以随着技术变化而=
演化的设计方法。呆=
6495;的设计方法是不合๦=
6;的。基于接口的设计&=
#26041;法代表了在减少未=
469;系统的维护费用上的=
;一个重要的进步。</span><sp=
an
lang=3DEN-US style=3D'mso-bidi-font-size:10.5pt;line-height:150%;color:#333=
333'><o:p></o:p></span></p>
<p class=3DMMTopic4><span style=3D'font-family:SimHei;mso-ascii-font-family=
:Arial'>构件规格</span></p>
<p class=3DMsoBodyTextFirstIndent style=3D'mso-char-indent-count:2.0;line-h=
eight:
150%'><span style=3D'mso-bidi-font-size:10.5pt;line-height:150%;font-family=
:SimSun;
mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Ro=
man";
color:#333333'>将构件的行为以=
968;种含义明确的方式描=
;述出来是非常重要的&#=
12290;但其中也存在这样Ç=
68;个问题:我们应如何=
描述构件才能保证其=
1547;义的精确性,同时๢=
5;种描述方法又要简单&=
#21644;直观,以利于构件=
340;使用者</span><span
lang=3DEN-US style=3D'mso-bidi-font-size:10.5pt;line-height:150%;color:#333=
333'>(</span><span
style=3D'mso-bidi-font-size:10.5pt;line-height:150%;font-family:SimSun;
mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Ro=
man";
color:#333333'>开发</span><span lang=3DEN-US style=3D'mso-bidi-=
font-size:
10.5pt;line-height:150%;color:#333333'>)</span><span style=3D'mso-bidi-font=
-size:
10.5pt;line-height:150%;font-family:SimSun;mso-ascii-font-family:"Times New=
Roman";
mso-hansi-font-family:"Times New Roman";color:#333333'>的使=
992;和理解。为了做到这=
;一点,往往需要以一&#=
31181;文本或者图形等形ó=
35;对构件加以描述,这=
就是我们所说的构件=
5268;格说明,构件的行ߒ=
6;描述包括以下内容:<=
/span><span
lang=3DEN-US style=3D'mso-bidi-font-size:10.5pt;line-height:150%;color:#333=
333'><o:p></o:p></span></p>
<p class=3DMsoBodyTextFirstIndent style=3D'margin-left:42.0pt;text-indent:-=
21.0pt;
mso-char-indent-count:0;line-height:150%;mso-list:l1 level1 lfo2;tab-stops:
list 42.0pt'><![if !supportLists]><span lang=3DEN-US style=3D'mso-bidi-font=
-size:
10.5pt;line-height:150%;font-family:Wingdings;mso-fareast-font-family:Wingd=
ings;
mso-bidi-font-family:Wingdings;color:#333333'><span style=3D'mso-list:Ignor=
e'>l<span
style=3D'font:7.0pt "Times New Roman"'> =
</span></span></span><![endif]><span style=3D'mso-bidi-font-size:10.5pt;
line-height:150%;font-family:SimSun;mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";color:#333333'>构件=
340;操作名称及其特征描=
;述的列表,描述中定&#=
20041;了操作的输入输出Ö=
42;数</span><span
lang=3DEN-US style=3D'mso-bidi-font-size:10.5pt;line-height:150%;color:#333=
333'><o:p></o:p></span></p>
<p class=3DMsoBodyTextFirstIndent style=3D'margin-left:42.0pt;text-indent:-=
21.0pt;
mso-char-indent-count:0;line-height:150%;mso-list:l1 level1 lfo2;tab-stops:
list 42.0pt'><![if !supportLists]><span lang=3DEN-US style=3D'mso-bidi-font=
-size:
10.5pt;line-height:150%;font-family:Wingdings;mso-fareast-font-family:Wingd=
ings;
mso-bidi-font-family:Wingdings;color:#333333'><span style=3D'mso-list:Ignor=
e'>l<span
style=3D'font:7.0pt "Times New Roman"'> =
</span></span></span><![endif]><span style=3D'mso-bidi-font-size:10.5pt;
line-height:150%;font-family:SimSun;mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";color:#333333'>构件=
340;功能、使用场景以及=
;版本的描述</span><span
lang=3DEN-US style=3D'mso-bidi-font-size:10.5pt;line-height:150%;color:#333=
333'><o:p></o:p></span></p>
<p class=3DMsoBodyTextFirstIndent style=3D'margin-left:42.0pt;text-indent:-=
21.0pt;
mso-char-indent-count:0;line-height:150%;mso-list:l1 level1 lfo2;tab-stops:
list 42.0pt'><![if !supportLists]><span lang=3DEN-US style=3D'mso-bidi-font=
-size:
10.5pt;line-height:150%;font-family:Wingdings;mso-fareast-font-family:Wingd=
ings;
mso-bidi-font-family:Wingdings;color:#333333'><span style=3D'mso-list:Ignor=
e'>l<span
style=3D'font:7.0pt "Times New Roman"'> =
</span></span></span><![endif]><span style=3D'mso-bidi-font-size:10.5pt;
line-height:150%;font-family:SimSun;mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";color:#333333'>构件=
340;使用环境、应被安装=
;的软件版本以及此软&#=
20214;已知的局限性的描Ű=
48;</span><span
lang=3DEN-US style=3D'mso-bidi-font-size:10.5pt;line-height:150%;color:#333=
333'><o:p></o:p></span></p>
<p class=3DMsoBodyTextFirstIndent style=3D'margin-left:42.0pt;text-indent:-=
21.0pt;
mso-char-indent-count:0;line-height:150%;mso-list:l1 level1 lfo2;tab-stops:
list 42.0pt'><![if !supportLists]><span lang=3DEN-US style=3D'mso-bidi-font=
-size:
10.5pt;line-height:150%;font-family:Wingdings;mso-fareast-font-family:Wingd=
ings;
mso-bidi-font-family:Wingdings;color:#333333'><span style=3D'mso-list:Ignor=
e'>l<span
style=3D'font:7.0pt "Times New Roman"'> =
</span></span></span><![endif]><span style=3D'mso-bidi-font-size:10.5pt;
line-height:150%;font-family:SimSun;mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";color:#333333'>通常=
773;况下该构件的性能及=
;可用性的描述</span><span
lang=3DEN-US style=3D'mso-bidi-font-size:10.5pt;line-height:150%;color:#333=
333'><o:p></o:p></span></p>
<p class=3DMsoBodyTextFirstIndent style=3D'margin-left:42.0pt;text-indent:-=
21.0pt;
mso-char-indent-count:0;line-height:150%;mso-list:l1 level1 lfo2;tab-stops:
list 42.0pt'><![if !supportLists]><span lang=3DEN-US style=3D'mso-bidi-font=
-size:
10.5pt;line-height:150%;font-family:Wingdings;mso-fareast-font-family:Wingd=
ings;
mso-bidi-font-family:Wingdings;color:#333333'><span style=3D'mso-list:Ignor=
e'>l<span
style=3D'font:7.0pt "Times New Roman"'> =
</span></span></span><![endif]><span style=3D'mso-bidi-font-size:10.5pt;
line-height:150%;font-family:SimSun;mso-ascii-font-family:"Times New Roman";
mso-hansi-font-family:"Times New Roman";color:#333333'>构件#=
268;格包括了对构件接口=
;的描述,对接口描述&#=
20165;仅概括地描述了客û=
43;应如何与构件进行交=
互,同时又隐藏了具=
0307;的技术细节。接口৻=
1;述了客户端所需的信&=
#24687;,使客户端的设计 =
773;不需要考虑接口提供=
;的服务是如何实现的&#=
8213;―甚至不需要考虑接=
;口的功能到底有没有&#=
23454;现。</span><span
lang=3DEN-US style=3D'mso-bidi-font-size:10.5pt;line-height:150%;color:#333=
333'><o:p></o:p></span></p>
<p class=3DMsoBodyTextFirstIndent style=3D'mso-char-indent-count:2.0;line-h=
eight:
150%'><span style=3D'mso-bidi-font-size:10.5pt;line-height:150%;font-family=
:SimSun;
mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Ro=
man";
color:#333333'>实际上,尽管接=
475;可以从构件规格说明=
;的角度来加以描述,&#=
20294;接口信息可以独立É=
10;任何对其加以实现的=
构件而存在。因为接=
1475;简洁而全面地描述ߚ=
2;特定环境中软件包的&=
#34892;为和责任――也就਷=
9;处于这种地位的任何&=
#26500;件都必须支持的行=
026;和责任。</span><span
lang=3DEN-US style=3D'mso-bidi-font-size:10.5pt;line-height:150%;color:#333=
333'><o:p></o:p></span></p>
<p class=3DMsoBodyTextFirstIndent style=3D'mso-char-indent-count:2.0;line-h=
eight:
150%'><span style=3D'mso-bidi-font-size:10.5pt;line-height:150%;font-family=
:SimSun;
mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Ro=
man";
color:#333333'>例如,假设有一 =
452;有用行为被定义为管=
;理一组人员的姓名和&#=
22320;址。其中可以包括ʍ=
06;设定某人的地址,查=
询这个人在此地址已=
2463;住了多少年,以及੣=
7;询某年之前这个人居&=
#20303;过的地址等功能。=
105;们可以将<span
class=3DGramE>这样这样</span>一组ඡ=
2;为成为接口</span><span
lang=3DEN-US style=3D'mso-bidi-font-size:10.5pt;line-height:150%;color:#333=
333'>IAddressManagement</span><span
style=3D'mso-bidi-font-size:10.5pt;line-height:150%;font-family:SimSun;
mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Ro=
man";
color:#333333'>。</span><span lang=3DEN-US style=3D'mso-bidi-font-siz=
e:10.5pt;
line-height:150%;color:#333333'><o:p></o:p></span></p>
<p class=3DMsoBodyTextFirstIndent style=3D'mso-char-indent-count:2.0;line-h=
eight:
150%'><span style=3D'mso-bidi-font-size:10.5pt;line-height:150%;font-family=
:SimSun;
mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Ro=
man";
color:#333333'>更进一步,假设=
004;个软件公司,</span><span
lang=3DEN-US style=3D'mso-bidi-font-size:10.5pt;line-height:150%;color:#333=
333'>X</span><span
style=3D'mso-bidi-font-size:10.5pt;line-height:150%;font-family:SimSun;
mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Ro=
man";
color:#333333'>软件公司和</span><span lang=3D=
EN-US
style=3D'mso-bidi-font-size:10.5pt;line-height:150%;color:#333333'>Y</span>=
<span
style=3D'mso-bidi-font-size:10.5pt;line-height:150%;font-family:SimSun;
mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Ro=
man";
color:#333333'>软件公司,他们=
998;别决定将开发地址管=
;理能力的构件,以便&#=
23558;其卖给某个应用系ń=
79;开发商,这样他们中=
的每一个都有了自己=
3545;</span><span
lang=3DEN-US style=3D'mso-bidi-font-size:10.5pt;line-height:150%;color:#333=
333'>IaddressManagement</span><span
style=3D'mso-bidi-font-size:10.5pt;line-height:150%;font-family:SimSun;
mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Ro=
man";
color:#333333'>接口的实现。假#=
774;,同时有一个应用程=
;序开发商正在开发一&#=
31181;个人信息管理系统ʌ=
92;此开发商发现自己需=
要地址管理的构件。=
6890;过查找,他发现</span><span
lang=3DEN-US style=3D'mso-bidi-font-size:10.5pt;line-height:150%;color:#333=
333'>X</span><span
style=3D'mso-bidi-font-size:10.5pt;line-height:150%;font-family:SimSun;
mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Ro=
man";
color:#333333'>公司和</span><span lang=3DEN-US
style=3D'mso-bidi-font-size:10.5pt;line-height:150%;color:#333333'>Y</span>=
<span
style=3D'mso-bidi-font-size:10.5pt;line-height:150%;font-family:SimSun;
mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Ro=
man";
color:#333333'>公司开发的可用=
500;件。由于两者都是基=
;于</span><span
lang=3DEN-US style=3D'mso-bidi-font-size:10.5pt;line-height:150%;color:#333=
333'>IaddressManagement</span><span
style=3D'mso-bidi-font-size:10.5pt;line-height:150%;font-family:SimSun;
mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Ro=
man";
color:#333333'>接口开发的,所=
197;他要选择到底是用哪=
;一个。最后从价格角&#=
24230;,他选择了</span><span
lang=3DEN-US style=3D'mso-bidi-font-size:10.5pt;line-height:150%;color:#333=
333'>Y</span><span
style=3D'mso-bidi-font-size:10.5pt;line-height:150%;font-family:SimSun;
mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Ro=
man";
color:#333333'>公司的产品。</span><span
lang=3DEN-US style=3D'mso-bidi-font-size:10.5pt;line-height:150%;color:#333=
333'><o:p></o:p></span></p>
<p class=3DMsoBodyTextFirstIndent style=3D'mso-char-indent-count:2.0;line-h=
eight:
150%'><span style=3D'mso-bidi-font-size:10.5pt;line-height:150%;font-family=
:SimSun;
mso-ascii-font-family:"Times New Roman";mso-hansi-font-family:"Times New Ro=
man";
color:#333333'>然而,另一个正=
312;为用
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -