由于设计模式,我应该在序列图之前创建类图吗? [英] Should I create Class Diagrams before Sequence Diagrams because of Design Patterns?

查看:82
本文介绍了由于设计模式,我应该在序列图之前创建类图吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

早上好,



我正处于一个项目的初始阶段,我有一个存在的疑问,我以前没有意识到。也许是因为这是我的第一个认真的项目。



根据我过去在大学学到的有关UML的知识...人工制品通常按照显示的顺序创建:



1.用例图

2.序列图

3.协作图

4.设计类图



问题是,我一直在深入研究UML设计模式,我知道我想要使用其中的3个或4个在我的应用程序中完全适合我。它们具有修复类图模式以及它们之间如何链接不同的类。在设计类图之前创建序列和协作图。我对序列图或协作图的理解是你应该对应用的解决方案感到满意,但我觉得在创建Design类图之前我不习惯创建这些图。我必须强制序列和协作图使用模式本身所需的类吗?这对我来说并不自然。我应该创建一致的类图吗?



非常感谢。

Good morning,

I'm in the inception phase with a project and I have an existential doubt that I didn't realize before. Maybe because this is my first serious project.

According what I learnt in the past at the university about UML... the artefacts are normally created in the order shown:

1. Use Case Diagrams
2. Sequence Diagrams
3. Collaboration Diagrams
4. Design Class Diagram

The thing is, I've been deeping into UML design patterns and I know I want to use 3 or 4 of them that suits me perfectly in my app. They have a fix class diagram schema and how the different classes are linked between them. Sequence and collaboration diagrams are created prior to Design Class diagram. What I understand about a Sequence diagram or collaboration diagram is the idea that you should be comfortable with the solution applied but I feel I am not comfortable creating those diagrams before to do the Design class Diagram. Must I force the Sequence & collaboration diagrams to be using the classes required by the pattern itself? That's no natural to me. Should I create firstable Class Diagram?

Thank you very much.

推荐答案

这些是指南。您可以弯曲其中一些以满足您的需求。

然而,序列图很有用,因为它们将提供程序流程。
These are guidelines. You can bend some of them to suite your needs.
However, sequence diagrams are useful since they will provide the flow of your program.


谢谢,



我将尝试通过类图以某种方式绘制它,然后我将创建适合它的序列图。



干杯
Thanks,

I will try to paint it somehow by a Class diagram and then I'll create the sequence diagrams to fit it.

Cheers


这篇关于由于设计模式,我应该在序列图之前创建类图吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆