mattia-battiston / clean-architecture-example Goto Github PK
View Code? Open in Web Editor NEWClean Architecture Example (Java): Example of what clean architecture would look like (in Java)
Clean Architecture Example (Java): Example of what clean architecture would look like (in Java)
Unit Tests:
for TDD (a.k.a. Tests first, to drive design)
Cover every little detail, aim for 100% coverage
“Dev to dev” documentation: What should this class do?
Test individual classes in isolation, very fast
Cover every little detail and tend to cover 100% with unit tests will give us a hell of re-working every piece of test each time logic is changed))
Hello,
What if I create a new use case, like getSomething, and use the same DoesExchangeExist class.
Should I use this class or create new class for new use case?
Thanks in advance!
Best regards,
Huka
Shouldn't there be an arrow from the configuration layer to the data provider layers?
How do we configure data providers like db, network parameters, etc.?
Which layer should the transaction management be on?
Your use case should take two inputs and return nothing. The first input is whatever data is necessary to do its job. This is not a domain layer entity. It's a DTO. The second is an interface for a presenter. This presenter takes a response DTO, not an entity. The use case calls the presenter when it feels like it.
I noticed your models/entities do not cary ID generated by DB. It does makes sense to me that we don't want to expose this as different data providers may handle record IDs differently. I'm thinking about the best way to handle case of User entity where somewhere on the outside request comes in to update information of a User. Email address could be used in such case or perhaps UUID. Thoughts?
Hi,
In his book uncle bob writes that entities should not be passed to use cases or returned from use cases, which is clearly not the case in this repo.
I was wondering if that is intentional, and if so, why?
From what I understand, A use case input and output should be a DTO, thus preventing upper layers from ever having access to an object two layers down.
Should it be "domain" or "use case"?
I can see reasons for both answers.
Any thoughts about it?
change
reconcileBroadbandAccessDevicesUseCas
to
reconcileBroadbandAccessDevicesUseCase
I hope you are doing well.
I have one question. How would you create deployable war (to standalone Tomcat) from this project on the root level?
There is an option to create a war from the configuration module, but that isn't so appropriate.
Do you have some script for that or to play around by myself a little bit with that? :)
Thanks.
Ivan
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.