您在序列图中寻找什么来表明系统架构良好?
您在方法调用序列中寻找哪些良好实践指示习惯用法(如序列图所示)?
What good-practice-indicating idioms do you look for in a sequence of method invocations, as depicted on sequence diagrams?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
寻找泄露秘密的中央控制器。 一个精心设计的系统往往会在类之间均匀分配职责。 相反,一个分解不良的系统往往会出现一个序列图,其中有许多消息传入或传出中间的一个类,该类疯狂地获取消息、做出决策、调用下属以及通常运行所有事情。
并非巧合的是,该控制器类也往往很大,具有大量过程代码,并且通常看起来像戴着滑稽帽子的 FORTRAN。
Look for the telltale central controller. A well-factored system will tend to have an even allocation of responsibilities among the classes. A poorly factored system instead tends to have a sequence diagram with many messages going to or from a class in the middle, which is frantically getting messages, making decisions, calling underlings, and generally running everything.
Not coincidentally, that controller class also tends to be big, have lots of procedural code, and generally look like FORTRAN in a funny hat.
我会说与良好的软件工程相同:
I would say the same as for good software-engineering: