{"id":20148025,"url":"https://github.com/droiddevgeeks/doubtnut","last_synced_at":"2025-03-03T00:24:23.423Z","repository":{"id":161004067,"uuid":"266133731","full_name":"droiddevgeeks/Doubtnut","owner":"droiddevgeeks","description":"This is new app that shows news in list. On click of each news, detail screen open","archived":false,"fork":false,"pushed_at":"2020-08-30T12:09:07.000Z","size":164,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-13T11:17:55.629Z","etag":null,"topics":["android-application","cache","cache-control","cache-storage","dagger-android-injection","dagger2","dagger2-android","fragments","junit","livedata","mockito","mvvm","mvvm-architecture","recyclerview","retrofit2","rxjava2","shimmer-android","shimmerlayout","unittest","viewmodel"],"latest_commit_sha":null,"homepage":"https://newsapi.org/docs/endpoints/top-headlines","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/droiddevgeeks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-22T14:42:24.000Z","updated_at":"2020-08-30T12:35:29.000Z","dependencies_parsed_at":"2023-07-06T11:01:34.927Z","dependency_job_id":null,"html_url":"https://github.com/droiddevgeeks/Doubtnut","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droiddevgeeks%2FDoubtnut","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droiddevgeeks%2FDoubtnut/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droiddevgeeks%2FDoubtnut/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/droiddevgeeks%2FDoubtnut/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/droiddevgeeks","download_url":"https://codeload.github.com/droiddevgeeks/Doubtnut/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241587801,"owners_count":19986628,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android-application","cache","cache-control","cache-storage","dagger-android-injection","dagger2","dagger2-android","fragments","junit","livedata","mockito","mvvm","mvvm-architecture","recyclerview","retrofit2","rxjava2","shimmer-android","shimmerlayout","unittest","viewmodel"],"created_at":"2024-11-13T22:33:48.136Z","updated_at":"2025-03-03T00:24:23.405Z","avatar_url":"https://github.com/droiddevgeeks.png","language":"Kotlin","readme":"# Doubtnut\nNews API to retrieve https://newsapi.org/docs/endpoints/top-headlines.\n\n\n\n### Libraries\n* [Android Support Library][support-lib]\n* [Android Architecture Components][arch]\n* [Android Data Binding][data-binding]\n* [Dagger 2][dagger2] for dependency injection\n* [Retrofit][retrofit] for REST api communication\n* [mockito][mockito] for mocking in tests\n\n\n[Gson](https://code.google.com/p/google-gson/) is another popular choice and being a smaller library than Jackson, you might prefer it to avoid 65k methods limitation. Also, if you are using  \n\n\u003ca name=\"networklibs\"\u003e\u003c/a\u003e\n**Networking, caching.** There are a couple of battle-proven solutions for performing requests to backend servers, which you should use rather than implementing your own client. We recommend basing your stack around [OkHttp](http://square.github.io/okhttp/) for efficient HTTP requests and using [Retrofit](http://square.github.io/retrofit/) to provide a typesafe layer. \n\n\n**RxJava** is a library for Reactive Programming, in other words, handling asynchronous events. It is a powerful paradigm, but it also has a steep learning curve. We recommend taking some caution before using this library to architect the entire application. We have written some blog posts on it: [[1]](http://blog.futurice.com/tech-pick-of-the-week-rx-for-net-and-rxjava-for-android), [[2]](http://blog.futurice.com/top-7-tips-for-rxjava-on-android), [[3]](https://gist.github.com/staltz/868e7e9bc2a7b8c1f754), [[4]](http://blog.futurice.com/android-development-has-its-own-swift). For a reference app, our open source app [Freesound Android](https://github.com/futurice/freesound-android) makes extensive use of RxJava 2.\n\nIf you have no previous experience with Rx, start by applying it only for responses from app's backend APIs. Alternatively, start by applying it for simple UI event handling, like click events or typing events on a search field. If you are confident in your Rx skills and want to apply it to the whole architecture, then write documentation on all the tricky parts. Keep in mind that another programmer unfamiliar to RxJava might have a very hard time maintaining the project. Do your best to help them understand your code and also Rx.\n\nUse [RxAndroid](https://github.com/ReactiveX/RxAndroid) for Android threading support and [RxBinding](https://github.com/JakeWharton/RxBinding) to easily create Observables from existing Android components.\n\nA collection of samples using the [Architecture Components](https://developer.android.com/arch):\n\n- [Lifecycle-aware components](https://developer.android.com/topic/libraries/architecture/lifecycle)\n- [ViewModels](https://developer.android.com/topic/libraries/architecture/viewmodel)\n- [LiveData](https://developer.android.com/topic/libraries/architecture/livedata)\n\n\n### Test Frameworks\n\n**Use [JUnit](https://developer.android.com/training/testing/unit-testing/local-unit-tests.html) for unit testing** Plain, Android dependency-free unit testing on the JVM is best done using [Junit](https://junit.org). \n\n#### Local Unit Tests\n##### ViewModel Tests\nEach ViewModel is tested using local unit tests with mock Repository\nimplementations.\n##### Usecase Tests\nEach usecase is tested using local unit tests with mockito \u0026 junit\n##### Repository Tests\nEach Repository is tested using local unit tests with mockito \u0026 junit\n\n[Medium]https://medium.com/mindorks/effective-livedata-testing-13d17b555d9b\n\nhttps://medium.com/mindorks/unit-testing-for-viewmodel-19f4d76b20d4\n\nhttps://medium.com/mindorks/unit-testing-viewmodel-part-2-4a1fa93d656d\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdroiddevgeeks%2Fdoubtnut","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdroiddevgeeks%2Fdoubtnut","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdroiddevgeeks%2Fdoubtnut/lists"}