0

I'm building my project with Visual Paradigm and I have some use cases that implements the CRUD pattern.

As specified in the book Use Cases: Patterns and Blueprints, Övergaard and Palmkvist suggest to implement a single use case as one of the best ways to handle this type of use cases. There is a different flow for each action: one operation is considered as the main flow, the others as extending flows.

The question is: considering that I'm using Visual Paradigm, which is the best way to write the relative sequence diagram of a similar use case?

  • 1
    Please define "best" for your case. – candied_orange May 15 at 13:04
  • How can I write the sequence diagram? The correct way. – aculf May 15 at 13:45
  • Show it to someone else and see if they understand what you’re trying to say. – candied_orange May 15 at 14:20
  • 1
    It's not enough to get a "Ah yes, I understand" but when they explain what they think to see matches what you thought when creating it. – qwerty_so May 16 at 21:46
2

The debate of whether covering a CRUD requirement with one high-level Manage xxx use-case or four more detailed use-cases Create xxx, Read/Retrieve xxx, Update xxx, Delete xxx is not new.

Alistair Cockburn, one of the signatory of the Agile Manifesto, already addressed this topic in the first edition of his book "Writing effective use-cases" in October 2000. It facilitates keeping the big picture in mind when working with the users. But when it comes to the design and implementation, we need more details. So the level of detail of sequence diagrams may be more detailed than in the corresponding use-case.

A first remark: there is no requirement of a one-to-one mapping between use-cases and sequence diagrams. A sequence diagram illustrates an interaction which is scenario based on the exchange of some messages. It does not have to be exhaustive, especially if you want to keep them readable. So if you have very different flows, the simplest way would be to make different sequence diagrams for the very different flows. In the idea of UML fathers, the traceability is backwards (so several sequence diagrams may provide different details for the same use-case).

Now, if you managed to design your system having a common flow and seing CRUD operations as extensions, you may do it likewise for the sequences: either with one diagram using the alt and opt combined fragments for the extension points, or with separate sequence diagram for each extension, or a combination of both.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.