Skip to main content
Share Your Experience: Take the 2024 Developer Survey
43 votes
Accepted

Clean Architecture - Too many Use Case Classes

Do I really have to make 24 use cases? Only if everything you write is CRUD. Refer to the diagram below: Your assertion is that you will have six different entities, and 4 methods (Create, Read, ...
Robert Harvey's user avatar
28 votes

Clean architecture - How do I deal with use case reuse?

A use case is not a method. A use case is not an object. A use case is not a layer. A use case is a story about a user, using the software, in a particular case. So it should come as no surprise ...
candied_orange's user avatar
11 votes

Does it make sense to internationalize logs?

When developers talk about "logs", they're most often referring to plain text files containing information that is meaningless outside the context of the specific code that logged them and has no ...
Ixrec's user avatar
  • 27.6k
11 votes
Accepted

Difference between scenario and use-case

A use case involves an actor and the flow that a particular actor takes in a given functionality or path. These often get grouped so you have a "set" of use cases to account for each scenario. A ...
mutt's user avatar
  • 286
9 votes

Separation of application logic and domain logic in Clean Architecture

You don't need a one-to-one mapping of interactors and entities. I believe such a design would be harmful. DDD is all about context boundaries and the ubiquitous language within those boundaries. ...
bitsoflogic's user avatar
8 votes
Accepted

When "Log in" should be a use case and when not?

First, you need to specifically define what a "use case" is. At the most basic level, a use case is a set of system behaviors that products a result for one or more actors. However, some ...
Thomas Owens's user avatar
  • 82.8k
8 votes
Accepted

Clean Architecture: Use case spanning multiple UI elements

OK, I think you you have a few misconceptions about the architecture itself and that this is tripping you up, so let me try to sort that out. So, domain behavior (the business logic of the ...
Filip Milovanović's user avatar
7 votes
Accepted

Does UML Use Case allow "use case polymorphism"?

This answer has been updated for UML 2.5.1 specification. First, it appears that the notation is valid. Actors (18.2.1) can only have Associations to UseCases, Components, and Classes and these ...
Thomas Owens's user avatar
  • 82.8k
7 votes

What are some good alternatives to use cases when the system has no actors?

Your system might be performing its activities autonomously, but it will still be true that those activities are performed to achieve an objective that benefits someone. If your system doesn't ...
Bart van Ingen Schenau's user avatar
7 votes

Difference between scenario and use-case

A use case is finer-grained and more detailed than a scenario. A scenario describes some purpose for which a user might use your software and all of the features of the software that they would ...
Jules's user avatar
  • 17.8k
7 votes

In Hexagonal Architecture, can a UseCase call another UseCase?

Reading the whole text of the question, title should be: "Can my use case implementation call a use case of another remote application (hexagon)?" The answer is yes. You should create a driven port ...
choquero70's user avatar
7 votes
Accepted

Why Don't We Add `Attributes` To Use Case Diagrams?

When talking about Use Case Diagrams, I like to make sure to mention one or two quotes from Martin Fowler's UML Distilled: The best way to think of a use case diagram is that it's a graphical table ...
Thomas Owens's user avatar
  • 82.8k
7 votes
Accepted

If logging in is not a Use Case, then what is it and where do I describe it?

I'm not aware of any good argument for "logging in" to be considered a use case. Looking at Alistair Cockburn's Writing Effective Use Cases, this is the definition of a use case: A use case ...
Thomas Owens's user avatar
  • 82.8k
7 votes

Use Cases in Clean Architecture, in Requirements Specifications from Software Engineering and Use Case Diagrams in UML

In short In the general sense, use-cases are meant to focus on user objectives and answer the question: "why would a user use this system? And for what purpose?". They therefore focus on ...
Christophe's user avatar
  • 77.9k
6 votes
Accepted

Does it make sense to internationalize logs?

The answers given here are too bound to the developer point of view. However, software is made to be used (and read) by humans (users) whose most of them have no idea about debugging, log patterns, ...
Laiv's user avatar
  • 14.7k
6 votes
Accepted

Use Case Diagram: Too many <<include>> relationships

Is it about the use case diagram ? Use case shall give the big picture of the system under consideration, by showing what it is used for and how it brings value to the actors in its environment. The &...
Christophe's user avatar
  • 77.9k
6 votes

If a user delivers a file as input for a use case, what is the actor : the user or the file

Actors should generally be people, or rather the business role the person is in. Applications can be actors, but normally this is when they are doing something like a scheduled task. Ie. behaving ...
Ewan's user avatar
  • 76.3k
6 votes
Accepted

Can I make a separate use case and class diagram for each module?

Use case diagrams describe the whole systems behavior of how it interacts with the outside actors. These are documents1 made during the requirement analysis phase, and done independently (and before) ...
πάντα ῥεῖ's user avatar
6 votes
Accepted

Required sequential actions in use case diagram

What you are doing (and it's a typical mistake at the beginning) is decomposing how to execute a single use case as "smaller use cases". As a result you're getting a messed diagram with a ...
Ister's user avatar
  • 849
5 votes

Use case diagram (UML): Should database storage be an sub use case (in this diagram)?

I would argue that UC_07 perhaps isn't needed at all if it forms part of the system overall. Also a lot of your use cases read like a sequence of steps which more properly belong in a sequence ...
Robbie Dee's user avatar
  • 9,805
5 votes

Which should be done first: use cases or user stories?

Use cases and user stories are both tools for gathering and expressing requirements. As you already found, a single use case has typically a broader scope than a single user story because it tries to ...
Bart van Ingen Schenau's user avatar
5 votes
Accepted

How do you use use cases in a driver design with interrupts?

The system under consideration in your model seems to be your microcontroler with your driver. The actors interact with this system under consideration. They are of two kinds : primary actors: ...
Christophe's user avatar
  • 77.9k
5 votes
Accepted

UML use case diagram: Actors on left and right?

You can put them anywhere - the top, the bottom, the left, the right. In most cases, if it fits neatly, I've seen them on the right. They go on the left if necessary. UML doesn't specify this level of ...
Thomas Owens's user avatar
  • 82.8k
5 votes
Accepted

Use case diagram (UML): Should database storage be an sub use case (in this diagram)?

The use case diagram gives us an overview of requirements, and illustrates how various actors interact via the system. There are many ways to actually capture use cases. An important one is single-...
amon's user avatar
  • 134k
5 votes

What are some good alternatives to use cases when the system has no actors?

Use cases and user stories are one method of capturing requirements. There are other ways of capturing requirements - from "shall"-style statements to various tabular or graphical models. Getting into ...
Thomas Owens's user avatar
  • 82.8k
5 votes
Accepted

Use case diagram and actor generalization: different use case diagrams for unlogged user and logged users

First thoughts If you'd use the generalization here, a logged user could do everything that a visitor can do: so a logged user could login (without logging out) and even register again. So my ...
Christophe's user avatar
  • 77.9k
5 votes

Is it feasible to use User Stories and Use Cases in the same team?

What's a use case ? Let's look at the definition of Ivar Jacobson, the guy who invented the concept before UML even existed: A use case is all the ways of using a system to achieve a particular goal ...
Christophe's user avatar
  • 77.9k
5 votes
Accepted

Understanding use case levels

This terminology was introduced by Alistair Cockburn in his book Writing effective use cases. The idea is that the sea level corresponds to the concrete goals of a business user in his everyday life....
Christophe's user avatar
  • 77.9k
5 votes

Use Case Diagrams - Are all use cases conducted by an outside user?

A use Case should always have an Actor that starts it off. That Actor need not be a person, it could be another system outside the boundary of the one being modelled. Something that just happens ...
Simon B's user avatar
  • 9,633
5 votes
Accepted

use case diagrams - need we add validations?

I don't think it would appear in a use case diagram. Although a use case is a series of steps in an interaction between a user and the system, the thing that appears in a use case diagram is really ...
Thomas Owens's user avatar
  • 82.8k

Only top scored, non community-wiki answers of a minimum length are eligible