This means that the interface should not have direct access to the domain objects. Why is the cart ID used and not the cart object itself? Are we not doing object-oriented design? The point is that the domain objects are encapsulated by the controller. When the order is ready to be completed, the interface sends to the controller the IDs of the customer and of the shopping cart (remember that the shopping cart is not yet associated to any customer).Īs the controller does not have state (transient memory), each operation sent to it that refers to the shopping cart must refer to its number ( cartId). It is the interface that holds the customer identification at this point. One point to notice is that as the controller has no transient memory, it does not register the information of who is shopping. At that point, if the user is not already identified an exception would be raised, as explained later. The order will be created only when the user chooses to stop shopping (finishing the order). Therefore, a shopping cart is created instead of an order at the initialization of that sequence diagram. For example, the fact that a user must be identified only when the order is finished prevents the system from creating an order before that point (if the order is really a concept that must be associated to a customer). System sequence diagram for the main flow of use case Order books using a stateless strategy.įrom this point it can be seen that the team is making a transition from analysis to design, because design decisions must be made in order to accommodate the requirements.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |