开发者

Is a webpage an object in sequence diagram?

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.


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


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


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜