anitaa1990 / trailersapp Goto Github PK
View Code? Open in Web Editor NEWA simple demo project for The Movie DB based on MVVM clean architecture.
A simple demo project for The Movie DB based on MVVM clean architecture.
Can you please make detail post on medium(or anywhere ) on this project. Because it is too difficult to understand the code and follow the things that you have used. This is a masterpiece of code and I definitely want to learn it.
HI @anitaa1990 Great work! may I know how would you handle the the Network Error in UI ?
.doOnError(t -> onFetchFailed())
in NetworkBoundResource.java
I'm basing my code on same approach but limited understanding i have of it. I cant see how to inform UI of the network error? can you help me out with this ? i couldn't find a solution in your repository.
thanks .
Hi Anita,
I tried to run a code coverage report with your code. I am getting an error as follows
com.an.trailers.api.ApiAbstract > initializationError FAILED
java.lang.Exception
Any Ideas
Display Pendulum Swing Loop
I dont know what is wrong.
Hi! Thanks for the code sharing!
I have found you are not showing data fetched from local DB while the remote request is running:
moviesListViewModel.getMoviesLiveData().observe(this, resource -> {
if(resource.isLoading()) {
//updateMoviesList(resource.data); - SHOULD BE HERE!
} else if(!resource.data.isEmpty()) {
updateMoviesList(resource.data);
} else handleErrorResponse();
});
What is the reason for such approach?
P.S.: Another point is you should not check resource.data.isEmpty()
before updateMoviesList
because of all movies can be removed from a remote server, but you will still have them on a local device screen
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.