Reputation: 813
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.
Upvotes: 4
Views: 3853
Reputation: 4143
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.
Upvotes: 1
Reputation: 4272
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
Upvotes: 1
Reputation: 493
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
Upvotes: 2
Reputation: 13549
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.
Upvotes: 0