Comments (2)
I wonder why we should remove that use case rather than migrate the business logic from repository?
When we decide to use optional domain layer, move the repository's business logic to domain layer. It makes sense to me.
I read this documentation.
![Threading](https://private-user-images.githubusercontent.com/48680511/313069115-c605943b-c72a-4357-bab0-2ac136c869fe.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTM1NjAyODMsIm5iZiI6MTcxMzU1OTk4MywicGF0aCI6Ii80ODY4MDUxMS8zMTMwNjkxMTUtYzYwNTk0M2ItYzcyYS00MzU3LWJhYjAtMmFjMTM2Yzg2OWZlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA0MTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNDE5VDIwNTMwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE5MGNmNzkyN2I2MTgxZjFhZjhkNDk2Njc1YWU3MjJiYWU1ZmM5MTYxZTJjODVkMzI0Yzc4MTA2OGNhNjk4MGImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.w37rUQ9TOzLuiVGYgY94WsZFJUopa26n9tPJmY4-QUo)
The reason of deleting use case is that so complicated to apply domain?
Typically, complex computations happen in the data layer to encourage reusability or caching. For example, a resource-intensive operation on a big list is better placed in the data layer than in the domain layer if the result needs to be cached to reuse it on multiple screens of the app.
And complex computations
is so abstract word to me, then I am hard to decide and determine the baseline when I choose whether use domain layer or not.
In this 'Now in Android', is this GetSearchContentsCountUseCase, and getSearchContentsCount in DefaultSearchContentRepository business logic complex to use in domain?
from nowinandroid.
Following the same reasoning, what do you think about eliminating GetRecentSearchQueriesUseCase
and instead allowing SearchViewModel
to directly interact with the repository interface? This could simplify the architecture.
from nowinandroid.
Related Issues (20)
- [Testing FR] [feature:bookmarks] Add screenshot tests
- [Testing FR] [feature:bookmarks] Improve coverage of viewmodel
- [Testing FR] [feature:interests] Add screenshot tests
- [Testing FR] [feature:search] Add screenshot tests
- [Testing FR] [feature:settings] Add screenshot tests
- [Testing FR] [feature:settings] Improve ViewModel coverage
- [Testing FR] [feature:topic] Add screenshot tests
- [Testing FR] [sync:work] Improve test coverage of module
- [Testing FR] [feature:interests] Add large screen tests for 2-pane support
- [Bug]: why WithPartialCompilationAndDisabledBaselineProfile is the best result in StartupBenchmark HOT 2
- [Testing FR] [core:database] Room migration tests
- [FR]: Minimize Unnecessary Recompositions HOT 1
- [Bug]: enableEdgeToEdge() doesn't change the navigation bar color when the app is in the dark mode and the system is not in Android 14 HOT 1
- [CI] Code coverage report not shown when PR is generated from fork
- [Bug]: Current project is not applied ```android_studio``` style ktlint
- [Bug]: Bottom Bar Item is not highlighted in search
- Rename `Result` to `TaskState`
- [Bug]: App crash while scrolling the Interest category list HOT 1
- Navigation from Search to Interests HOT 1
- Wrong Search History State HOT 2
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 nowinandroid.