Comments (4)
Hi Hung
The easiest thing you can do is extract the DoesPostEsisted class to a common package and reuse it from both use cases. I don't see anything wrong with it, as it sounds like it's part of your business logic.
I hope this answer your questions
Cheers
from clean-architecture-example.
Thank you so much for your comment.
Do you mean I should create another common use case and use it in other use cases?
Example:
-
Put common interactor in common package:
com.example.core.usecase.common.DoesPostEsisted.java -
Used in:
com.example.core.usecase.getcapacity.GetCapacityForExchangeUseCase.java -
And
com.example.core.usecase.getSomething.GetSomethingForSomethingUseCase.java
Edit:
I think it should be called Boundaries, not Interactors, is it right?
Thanks,
Hung.
from clean-architecture-example.
yes, that's what I mean. There's nothing wrong in extracting duplicate code, as long as you still respected the fact that in core we only want business logic.
Not sure what you mean by boundaries vs interactors though?
Mattia
from clean-architecture-example.
I'm confusing, Boundaries are interface, Interactors are Usecases.
Maybe DoesPostEsisted.java is Boundary and used in others Usecases.
I will search Google for more details.
Thank you for supporting, I really appreciate it.
Have a good day!
Hung
from clean-architecture-example.
Related Issues (10)
- Which layer should the transaction management be on? HOT 8
- Unit tests
- This isn't clean
- Configuration of data providers?
- Thoughts on finding entity to update HOT 2
- Q: what layer should Gateway interface belong to? HOT 1
- "Use Case" Examples are leaking domain objects (entities) HOT 1
- Missing the last 'e'
- Creating war from root gradle script
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clean-architecture-example.