The ìnitiateDeleteUser() (again a bad name since it does really delete the user) would be enough here. Personally I would not show the object and its destruction unless it is important (for memory management and/or security). And as written it's the termination of another lifeline which when invoking an operation would contradict as it would need to destruct itself afterwards. If you send with a signature that operation would be called and the object would have to destroy itself after finishing. However, there is not mention to have a stereotype/keyword «destroy» along with the message. So that leaves a bit space for interpretation. It would be a plain message (arrow) followed by the X to mark the end of object life. There is no mention of a stereotype or keyword to be used. The message designating the termination of another lifeline. An object deletion Message (messageSort equals deleteMessage) must end in a DestructionOccurrenceSpecification.Ī deleteMessage is an attribute of the MessageSort enumeration:.I ran through the specs and found these paragraphs below chapter 17.4 Messages: Have you ever seen a data model where each class is postfixed with Model?Ī bit more about deletion. Though MVC seems to imply you call your classes with the according postfix I don't think that's a good idea for the M. Maybe your UserModel is the User itself? In that case you should think about better naming of your model elements. The «destroy» in any case looks wrong since you do not send a deletion message towards UserModel to end its life but just send a normal message. Sequence diagrams are a popular dynamic modeling solution in UML because they specifically focus on lifelines, or the processes and objects that live simultaneously, and the messages exchanged between them to perform a function before the lifeline ends. If it's crucial to show the deletion of the User object you could show an additional Delete message towards another User lifeline. Whether or not you want to show the deletion of that very object depends on which detail you need/want to show. Since there is an operation deleteUser() exposed from UserModel I would suppose that this class manages a list of users (likely User objects) and it would therefor delete one of those.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |