网页是序列图中的对象吗?

发布于 2024-11-17 03:23:46 字数 145 浏览 7 评论 0原文

我正在为在线购物车创建序列图。我正在隔离该图所需的对象。

客户与登录页面交互并购买产品。

我可以将登录页面作为对象或类吗?它不是业务逻辑,也不是用户创建的对象。我很困惑是否应该使用它。

任何详细说明如何选择对象的链接都值得赞赏。

I am in process of creating a sequence diagram for an online shopping cart. I am isolating which objects are needed for the diagram.

The customer interacts with login page and purchases product.

Can I take the login page as an object or class? It is not a business logic and not a user created object. I am confused whether I am supposed to use it or not.

Any links for detailing how to select objects is appreciated.

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

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

发布评论

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

评论(4

我是有多爱你 2024-11-24 03:23:46

您可以在序列图中包含浏览器,但不应包含 UI 详细信息。您应该只拥有可以通过浏览器发起的请求。这个图就是一个很好的例子:

http://click.apache.org/docs/user-guide/htmlsingle/images/ajax/ajax-request-sequence-diagram.png

You can include the browser in the sequence diagram but you should not include UI details. You should just have the requests that can be initiated via the browser. This diagram is a good example:

http://click.apache.org/docs/user-guide/htmlsingle/images/ajax/ajax-request-sequence-diagram.png

微凉徒眸意 2024-11-24 03:23:46

UML 序列图用于表示或建模系统的对象或组件之间的消息流、事件和动作。对于此登录应该是系统的组件(作为一个类)而不是页面。对象将是尝试登录的用户。我建议您通过此链接了解序列图简介 -
序列图简介

以及登录序列图

登录页面序列图

UML sequence diagrams are used to represent or model the flow of messages, events and actions between the objects or components of a system. For this login should be the component of the system (as a class) rather then a page. Object will be ur user who tries to login. i would recommend you to go through this link for sequence diagram intro -
intro to sequence diagram

and for the login sequence diagram

sequence diagram of login page

孤千羽 2024-11-24 03:23:46

是的。但是,它可以同时是业务逻辑对象和界面/GUI 对象。

您可以将逻辑和接口代码分离到不同的类/对象中。

YES, it is. But, it can be a business logic object and a interface / GUI object, at the same time.

You could, separate the logic and the interface code into different classes / objects.

束缚m 2024-11-24 03:23:46

在我看来,您正在尝试显示购买产品的对象之间的交互顺序。

在这种情况下,网页或视图不应出现在图表中。页面/视图是与用户交互的一种方式,可能会显示为对实际处理购买请求的端点的外部调用。因此,序列图中的第一个/最左边的对象可能是接收此调用的控制器/端点。

In my view you are trying to show the sequence of interactions between objects for purchase of a product.

In this case the web page or the view should not be in the diagram. The page/view is a means of interaction with the user and might be displayed as an external call to a endpoint which will actually deal with a purchase request. So, probably the first/left-most object in your sequence diagram will be the controller/endpoint which receives this call.

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