{"id":1094,"date":"2010-04-20T11:12:00","date_gmt":"2010-04-20T03:12:00","guid":{"rendered":"\/?p=1094"},"modified":"2010-04-20T11:12:00","modified_gmt":"2010-04-20T11:12:00","slug":"1094","status":"publish","type":"post","link":"https:\/\/blog.vimge.com\/archives\/other\/1094.html","title":{"rendered":"\u611f\u609fUML\u4e2d\u7684\u7985\u7406"},"content":{"rendered":"
\u4ee5\u524d\u542c\u8bf4\u5fb7\u56fd\u7684\u6700\u9ad8\u5b66\u4f4d\u53ea\u6709\u54f2\u5b66,\u4e0d\u77e5\u9053\u662f\u4e0d\u662f\u5fb7\u56fd,\u662f\u4e0d\u662f\u8fd9\u6837,\u5475\u5475,\u770b\u4e86\u4e00\u7bc7\u6587\u7ae0\u778e\u4e86\u51e0\u53e5,\u7565\u8868\u609f\u610f,\u6709\u611f.<\/p>\n
UML\u6765\u505a\u4e00\u4e9b\u8bbe\u8ba1\u65f6\uff0c\u5f00\u53d1\u4eba\u5458\u4f1a\u89c9\u5f97\u81ea\u5df1\u597d\u50cf\u4e0d\u4f1a\u5199\u7a0b\u5e8f\u4e86\u3002\u7684\u786e\u7528UML\u964d\u4f4e\u4e86\u5f00\u53d1\u6548\u7387\uff0c\u597d\u5904\u5374\u5e76\u4e0d\u663e\u89c1\u3002\u4e8e\u662f\u6211\u4eec\u770b\u5230\u4e86\u5728\u6559\u79d1\u4e66\u4e2d\u5927\u91cf\u5730\u91c7\u7528UML\uff0c\u770b\u5230\u4e86\u7528UML\u89e3\u91ca\u522b\u4eba\u7684\u7cfb\u7edf\u8bbe\u8ba1\u3002<\/p>\n
\u7b14\u8005\u662f\u4eceC++\u5f00\u59cb\u5b66\u4e60\u9762\u5411\u5bf9\u8c61\u7a0b\u5e8f\u8bbe\u8ba1\u7684\uff0c\u5e76\u88abIO\u6d41\u548cBorland Turbo Vision\u8fd9\u6837\u7684OO\u8bbe\u8ba1\u6240\u6298\u670d\uff0c\u60ca\u53f9\u4e8eOO\u7f16\u7a0b\u7684\u4f18\u96c5\uff0c\u4e8e\u662f\u81f4\u529b\u4e8e\u5b66\u4e60OO\u7f16\u7a0b\u3002<\/p>\n
\u5f53\u6211\u81ea\u4ee5\u4e3a\u5728OO\u7f16\u7a0b\u4e0a\u5c0f\u6709\u5fc3\u5f97\u65f6\uff0c\u5728\u7f51\u4e0a\u770b\u5230\u4e86\u5173\u4e8eUML\u7684\u4ecb\u7ecd\u3002\u5f00\u59cb\u4e86\u89e3UML\u65f6\uff0c\u6211\u7684\u5fc3\u60c5\u662f\u590d\u6742\u7684\u3002\u539f\u6765\u8f6f\u4ef6\u662f\u8fd9\u6837\u8bbe\u8ba1\u51fa\u6765\u7684\uff1f\u5982\u679c\u771f\u50cfBooch\u6240\u8bf4\uff0c\u90a3\u4e48\u6211\u4eec\u4e00\u76f4\u5728\u9020\u72d7\u7a9d\uff0c\u4e00\u76f4\u4e0d\u77e5\u9053\u600e\u6837\u9020\u5927\u53a6\uff1f\u4e8e\u662f\u6709\u4e86\u5b66\u4e60UML\u7684\u51b2\u52a8\u3002\u4f46\u662f\u968f\u7740\u5b66\u4e60\u7684\u6df1\u5165\uff0c\u4ea7\u751f\u4e86\u65b0\u7684\u95ee\u9898\u3002UML\u5f88\u96be\u638c\u63e1\uff0c\u5c3d\u7ba1\u6709“\u7cbe\u901aUML”\u4e4b\u7c7b\u7684\u4e66\u3002\u4ec5\u4ee5\u7528\u4f8b\u56fe\u6765\u8bf4\uff0c\u66fe\u5728BBS\u8bba\u575b\u4e0a\u9047\u5230\u65e0\u6570\u7684\u4eba\u4e0d\u77e5\u9053\u600e\u6837\u5408\u9002\u5730\u753b\u7528\u4f8b\u56fe\u3002UML\u4e0d\u4f46\u96be\u638c\u63e1\uff0c\u800c\u4e14\u5f88“\u80a4\u6d45”——\u5b83\u53ea\u662f\u4e00\u79cd\u8868\u793a\u6cd5\u800c\u5df2\u3002\u5b83\u53ea\u662f\u4e00\u79cd\u8bed\u8a00\uff0c\u800c\u7528\u8fd9\u79cd\u8bed\u8a00\u8bf4\u51fa\u7684\u8bdd\u5230\u5e95\u6c34\u5e73\u5982\u4f55\uff0c\u663e\u7136\u53d6\u51b3\u4e8e\u8bf4\u8bdd\u4eba\u7684\u5176\u4ed6\u7d20\u517b\u3002<\/p>\n
UML\u548cOO\u601d\u60f3\u54ea\u4e2a\u91cd\u8981\uff1f\u6ca1\u6709OOA\/OOD\u7684\u6df1\u539a\u529f\u5e95\uff0c\u5b66UML\u6709\u4f55\u7528\uff1f\u5f53\u6211\u8bd5\u7740\u7528UML\u6765\u505a\u4e00\u4e9b\u8bbe\u8ba1\u65f6\uff0c\u89c9\u5f97\u81ea\u5df1\u597d\u50cf\u4e0d\u4f1a\u5199\u7a0b\u5e8f\u4e86\u3002\u7528UML\u964d\u4f4e\u4e86\u6211\u7684\u5f00\u53d1\u6548\u7387\uff0c\u597d\u5904\u5374\u5e76\u4e0d\u663e\u89c1\u3002\u53e6\u5916\u8fd8\u6709\u4e00\u4e9b\u5176\u4ed6\u7684\u95ee\u9898\u4e5f\u5728\u56f0\u6270\u7740\u6211\uff0c\u4f8b\u5982\uff1a\u5982\u4f55\u4ee5\u7528\u4f8b\u9a71\u52a8\u7684\u65b9\u5f0f\u8bbe\u8ba1\u4e00\u4e2a\u7c7b\u4f3cSwing\u8fd9\u6837\u7684\u7c7b\u5e93\uff1f\u4e3a\u4ec0\u4e48\u4e66\u4e0a\u7684\u4f8b\u5b50\u4e3e\u6765\u4e3e\u53bb\u90fd\u662fATM\u673a\uff1f\u4e3a\u4ec0\u4e48\u8fd9\u4e48\u591a\u4f18\u79c0\u7684\u5f00\u653e\u6e90\u4ee3\u7801\u8f6f\u4ef6\uff0c\u51e0\u4e4e\u6ca1\u6709\u58f0\u79f0\u662f\u4ee5\u8fd9\u79cd\u65b9\u5f0f\u6765\u8bbe\u8ba1\u5f00\u53d1\u7684\uff1f\u6211\u7f6e\u7591\u662f\u5426\u8fd9\u79cd\u65b9\u5f0f\u771f\u7684\u6709\u4ef7\u503c\u3002<\/p>\n
\u8bed\u8a00\u751a\u81f3\u4f1a\u675f\u7f1a\u601d\u60f3\u3002\u7ef4\u7279\u6839\u65af\u5766\u5e94\u8be5\u662f\u6301\u8fd9\u79cd\u89c2\u70b9\u7684\u3002\u5965\u5a01\u5c14\u5728\u4ed6\u7684\u540d\u8457\u300a1984\u300b\u4e2d\u6709\u4e00\u6bb5\u63cf\u8ff0\uff0c\u8bf4\u660e“\u65b0\u8bdd”\u5bf9\u601d\u60f3\u7684\u63a7\u5236\u3002UML1.x\u7684\u7248\u672c\u5bf9\u5b9e\u9645\u53ef\u80fd\u7684\u8bbe\u8ba1\u505a\u4e86\u8bb8\u591a\u7b80\u5316\uff0c\u4f7f\u6211\u5bf9UML\u6709\u4e00\u79cd“\u65b0\u8bdd”\u7684\u611f\u89c9\u3002\u6211\u5934\u8111\u4e2d\uff0c\u66fe\u4e00\u5ea6\u628aUML\u4e0e“\u7b26\u53f7\u66b4\u529b”\u76f8\u8054\u7cfb\u3002<\/p>\n
\u636e\u8bf4Kent Beck\u4ece\u6765\u4e0d\u753bUML\u56fe\uff0c\u6700\u591a\u753b\u70b9\u7b80\u5355\u7684CRC\u5361\u7247\uff0c\u7ecf\u5e38\u662f\u76f4\u5954\u7f16\u7801\u800c\u53bb\u3002\u4f46\u5f88\u591a\u4eba\u90fd\u4e0d\u6000\u7591\u4ed6\u662f\u4f4d\u4f18\u79c0\u7684OO\u8bbe\u8ba1\u5e08\u3002\u4e8e\u662f\u6211\u5927\u90e8\u5206\u65f6\u95f4\u601d\u8003\u7684\u90fd\u662f\u6d4b\u8bd5\u9a71\u52a8\uff0c\u4f9d\u8d56\u6ce8\u5165\uff0c\u4ee3\u7801\u5373\u8bbe\u8ba1\u8fd9\u7c7b\u95ee\u9898\uff0c\u4e0eUML\u6e10\u884c\u6e10\u8fdc\u3002<\/p>\n
\u673a\u7f18\u51d1\u5de7\uff0c\u6211\u8bfb\u8fc7\u4e00\u70b9\u4f5b\u7ecf\u548c\u6545\u4e8b\u3002\u7ed9\u6211\u7559\u4e0b\u5f88\u6df1\u5370\u8c61\u7684\u662f\uff0c\u7985\u5b97\u516d\u7956\u60e0\u80fd\u662f\u4e0d\u8bc6\u5b57\u7684\u3002\u7985\u5b97\u7684\u5341\u516d\u5b57\u5fc3\u4f20\u662f“\u6559\u5916\u522b\u4f20\uff0c\u4e0d\u7acb\u6587\u5b57\u3002\u76f4\u6307\u4eba\u5fc3\uff0c\u89c1\u6027\u6210\u4f5b”\u3002\u800c\u6b63\u662f\u8fd9\u4f4d\u4e0d\u8bc6\u5b57\u7684\u516d\u7956\uff0c\u8981\u6c42“\u4e0d\u7acb\u6587\u5b57”\u7684\u5927\u5fb7\uff0c\u4ed6\u7684\u8bb2\u7a3f\u88ab\u6574\u7406\u6210\u4e86\u552f\u4e00\u4e00\u90e8\u7531\u4e2d\u56fd\u4eba\u5199\u7684\u88ab\u79f0\u4e3a\u7ecf\u7684\u4f5b\u6559\u5178\u7c4d——\u516d\u7956\u575b\u7ecf\u3002\u975e\u5e38\u77db\u76fe\u7684\u4e00\u4ef6\u4e8b\u3002\u575b\u7ecf\u8bb0\u8f7d\uff0c\u60e0\u80fd\u8fd8\u672a\u51fa\u5bb6\u65f6\uff0c\u542c\u5230\u6709\u4eba\u8bfb\u300a\u91d1\u521a\u7ecf\u300b\uff0c“\u60e0\u80fd\u4e00\u95fb\uff0c\u5fc3\u660e\u4fbf\u609f”\u3002\u8fd9\u5c31\u662f“\u7c4d\u6559\u609f\u5b97”\u3002\u516d\u7956\u4e4b\u540e\uff0c\u7985\u5b97\u8fdb\u5165“\u4e0d\u7acb\u6587\u5b57”\u7684\u65e0\u5b57\u7985\u65f6\u4ee3\u3002\u89c6\u8bed\u8a00\u4e3a\u969c\u9053\u4e4b\u672c\uff0c\u89c6\u8bfb\u7ecf\u4e3a\u78e8\u7816\u6210\u955c\u3002\u7136\u800c\u6ca1\u6709\u6587\u5b57\u7ec8\u7a76\u4e0d\u4fbf\uff0c\u5230\u4e86\u5317\u5b8b\uff0c\u7531\u4e8e\u7985\u5b97\u706f\u5f55\u7684\u5927\u91cf\u520a\u884c\uff0c\u53c2\u7a76\u516c\u6848\u4e4b\u98ce\u65e5\u76db\uff0c\u6587\u5b57\u7985\u7531\u4e4b\u800c\u8d77\u3002“\u4e0d\u7acb\u6587\u5b57”\u4e4b\u7985\u53d8\u6210\u4e86“\u4e0d\u79bb\u6587\u5b57”\u4e4b\u7985\u3002<\/p>\n
\u5ffd\u7136\u95f4\u6211\u4eff\u4f5b\u660e\u767d\u4e86UML\u5b58\u5728\u7684\u610f\u4e49\uff1a\u8bf4\u4e0d\u53ef\u8bf4\u4e4b\u8bf4\u3002“\u91ca\u8fe6\u56db\u5341\u4e5d\u5e74\u8bf4\uff0c\u672a\u66fe\u8bf4\u7740\u4e00\u5b57\u3002”\u4f5b\u66f0\uff1a\u4e0d\u53ef\u8bf4\u3002\u660e\u660e\u4e0d\u53ef\u8bf4\uff0c\u504f\u53c8\u8bf4\u4e86\u90a3\u4e48\u591a\u3002<\/p>\n
\u4ee5\u524d\u66fe\u7ecf\u8ba4\u4e3a\uff0c\u8bbe\u8ba1OO\u7cfb\u7edf\u638c\u63e1\u4f4f\u4e00\u4e2a\u8981\u70b9\u5c31\u884c\uff0c\u5373“\u9053\u6cd5\u81ea\u7136”\u3002\u7136\u540e\u5c31\u662f“\u8fd0\u7528\u4e4b\u5999\uff0c\u5b58\u4e4e\u4e00\u5fc3”\u3002\u5728\u8fd9\u4e2a\u7406\u8bba\u7ed3\u6784\u91cc\uff0c\u4f3c\u4e4e\u662f\u6ca1\u6709UML\u5b58\u5728\u7684\u4f4d\u7f6e\u3002\u6bd5\u7adf“\u9053\u53ef\u9053\uff0c\u975e\u5e38\u9053”\u3002\u4f46\u662f\u4f5b\u7ecf\u7ed9\u4e86\u6211\u542f\u53d1\uff0c\u8fd9\u4e9b\u7ecf\u4e66\u5728\u7ffb\u6765\u8986\u53bb\u82b1\u4e86\u5f88\u591a\u529b\u6c14\u8bb2\u4e00\u4e9b\u672c\u6765\u8bb2\u4e0d\u660e\u767d\u7684\u4e1c\u897f\u3002“\u4e0d\u7acb\u6587\u5b57”\uff0c\u662f“\u8bf4\u4e0d\u5f97”;“\u4e0d\u79bb\u6587\u5b57”\uff0c\u662f“\u8bf4\u4e0d\u5f97\u7684\u4e1c\u897f\u5982\u4f55\u53bb\u8bf4”\u3002\u5bf9\u4e8e\u8fd9\u79cd\u96be\u4ee5\u8a00\u8bf4\u7684\u4e1c\u897f\uff0c\u4eba\u4eec\u5e38\u5e38\u91c7\u7528\u5bd3\u8a00\u6216\u53d1\u751f\u5728\u522b\u4eba\u8eab\u4e0a\u7684\u6545\u4e8b\u6765\u8bf4\u660e\uff0c\u5373\u628a\u62bd\u8c61\u7684\u9053\u7406\u5f62\u8c61\u5316\u5730\u91ca\u51fa\u3002<\/p>\n
UML\u6240\u505a\u7684\u6b63\u662f\u76f8\u540c\u7684\u4e8b\uff0c\u4e8e\u662f\u6211\u4eec\u770b\u5230\u4e86\u5728\u6559\u79d1\u4e66\u4e2d\u5927\u91cf\u5730\u91c7\u7528UML\uff0c\u770b\u5230\u4e86\u7528UML\u89e3\u91ca\u522b\u4eba\u7684\u7cfb\u7edf\u8bbe\u8ba1\u3002\u4e5f\u8bb8\u6211\u4eec\u80fd\u901a\u8fc7\u5b66\u4e60\u6559\u79d1\u4e66\u4e2d\u7684UML\u548c\u522b\u4eba\u8bbe\u8ba1\u7684UML\u5b9e\u73b0“\u7c4d\u6559\u609f\u5b97”\u3002<\/p>\n
UML\u4e5f\u662f\u4e00\u79cd\u60f3\u50cf\u529b\u7684\u57f9\u8bad\uff0c\u8ba9\u60a8\u5728\u4e00\u5207\u90fd\u8fd8\u6ca1\u6709\u7684\u65f6\u5019\uff0c\u751f\u52a8\u5730\u60f3\u8c61\u51fa\u7cfb\u7edf\u5c06\u6765\u7684\u6837\u5b50\u3002\u4e00\u4e2a\u4f1f\u5927\u7684\u8bbe\u8ba1\u5e08\uff0c\u5fc5\u662f\u5177\u6709\u8d85\u51e1\u60f3\u50cf\u529b\u7684\u4eba\u3002UML\u662f\u6e21\u6cb3\u7684\u7b4f\uff0c\u5bf9\u4e8e\u5df2\u5728\u6cb3\u5bf9\u5cb8\u7684\u4eba\uff0c\u81ea\u7136\u4e0d\u9700\u8981;\u5bf9\u4e8e\u672a\u6e21\u800c\u60f3\u6e21\u7684\u4eba\uff0c\u5374\u662f\u975e\u5e38\u9700\u8981\u7684\u4e1c\u897f\u3002\u6b64\u65f6\u6211\u7684\u611f\u89c9\u5c31\u662f:“\u5411\u6765\u6789\u8d39\u63a8\u79fb\u529b\uff0c\u4eca\u65e5\u81ea\u5728\u6c34\u4e2d\u884c\u3002”<\/p>\n