When is a Use Case layer needed?
Posted
by
Meta-Knight
on Programmers
See other posts from Programmers
or by Meta-Knight
Published on 2012-09-27T17:09:49Z
Indexed on
2012/09/27
21:50 UTC
Read the original article
Hit count: 356
design
|architecture
In his blog post The Clean Architecture Uncle Bob suggests a 4-layer architecture. I understand the separation between business rules, interfaces and infrastructure, but I wonder if/when it's necessary to have separate layers for domain objects and use cases. What added value will it bring, compared to just having the uses cases as "domain services" in the domain layer?
The only useful info I've found on the web about a use case layer is an article by Martin Fowler, who seems to contradict Uncle Bob about its necessity:
At some point I may run into the problems, and then I'll make a Use Case Controller - but only then. And even when I do that I rarely consider the Use Case Controllers to occupy a separate layer in the system architecture.
Edit:
I stumbled upon a video of Uncle Bob's Architecture: The Lost Years keynote, in which he explains this architecture in depth. Very informative.
© Programmers or respective owner