创建领域模型

发布于 2024-09-03 14:37:38 字数 184 浏览 7 评论 0原文

我已经创建了一个小型应用程序的用例,现在我必须创建该应用程序用例的域模型以及将在此应用程序中实现哪些功能。我以前没有领域建模和 UML 方面的经验,请建议我创建领域模型的步骤或任何建议,我是否必须对面向对象的概念有非常扎实的了解才能创建领域模型? 该应用程序简单,创建在线投票/投票系统,具有注册帐户、帐户确认电子邮件、会员资格、创建投票、发送投票等功能

I have created a use case of a small application and now I have to create a Domain Model of that use cases of the application and which functions will be implemented in this application. I have no previous experience in Domain Modeling and UML, please suggest me steps to create the domain model or any suggestions, Do I have to have a very solid understanding of Object oriented concepts for creating domain model?
The application is simple and creates online poll/voting system and have functions like Register Account, Confirmation Email of account, Membership, Create Poll, Send Poll etc

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

江湖彼岸 2024-09-10 14:37:38

在 UML 中,域模型就是类图,要创建类图,您必须对面向对象编程有深入的了解,因为您使用类的方法和属性来设计类。首先,采取现实世界的方法。思考“民意调查在现实生活中如何运作?”。例如,民意调查需要诸如“哪一个是最好的星际迷航系列?”之类的问题。所以你必须在班级投票中创建一个属性问题。然后你需要方法来添加投票,所以这个方法可以是 AddVote()...等等。

阅读 wiki 上的 UML 和 OOP。

希望这有帮助。

Well in UML the Domain Model is the Class Diagram, and to create a Class Diagram you have to have a firm understanding of object oriented programming, since you design the classes with their methods and properties. To get started, take the real world approach. Think "How does a poll work in real life?". For example, a poll needs a question like "Which one is the best star trek series?". So you have to create a property question on the class poll. Then you need methods, to add a vote, so this method could be AddVote()... etc. etc.

Read up on UML and OOP on wiki.

Hope this helps.

喵星人汪星人 2024-09-10 14:37:38

您肯定需要一些知识或至少是面向对象设计和分析的基础知识。您可以通过多种不同的方式根据用例中的对象创建域模型。在统一过程方法(由 UML 作者创建)中,您首先通过使用行为 UML 图描述可能的交互来创建用例实现来详细说明用例。另一种方法是通过 CRC(类责任卡)方法。我想到的最简单的方法,但同时不是那么有效,是在使用交互的文本描述详细说明用例之后,将所有找到的名词(系统的一部分)声明为类,将动词声明为其方法。

You surely need some knowledge or at least basics of object oriented design and analysis. There are many different ways you can create domain model in terms of objects from use cases. In the Unified Process methodology (which is created by authors of UML) you firstly detail use cases by creating use case realizations mostly by describing possible interactions using behavioural UML diagrams. Another way to do this is by the CRC (class responsibility cards) method. The simplest approach I herad of, but not so effective at the same time, is just after detailing use cases using textual description of the interactions declaring all found nouns, which are part of the system, as your classes and verbs as their methods.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文