Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Mvvm Kotlin Android Architecture | 2,053 | 5 months ago | 6 | apache-2.0 | Kotlin | |||||
MVVM + Kotlin + Retrofit2 + Hilt + Coroutines + Kotlin Flow + mockK + Espresso + Junit5 | ||||||||||
Just Another Android App | 1,656 | 2 years ago | 2 | apache-2.0 | Java | |||||
An Android base app with loads of cool libraries/configuration NOT MAINTAINED | ||||||||||
Espresso | 1,086 | 3 years ago | 3 | apache-2.0 | Java | |||||
🚚 Espresso is an express delivery tracking app designed with Material Design style, built on MVP(Model-View-Presenter) architecture with RxJava2, Retrofit2, Realm database and ZXing | ||||||||||
Spacex Prepare For Clean Architecture Liftoff | 524 | 4 months ago | Kotlin | |||||||
Clean Architecture Modular Project: MVVM + Jetpack Compose + Coroutines + Flows + Dagger2 + LiveData + UnitTests + UITests + Screenshot Tests + MockWebServer | ||||||||||
Android Gif Search | 386 | 10 days ago | apache-2.0 | Kotlin | ||||||
Gif LazyVerticalGrid MVVM using Dagger 2 + Hilt with Retrofit 2, Moshi, Kotlin Coroutines, JUnit, Espresso and Robolectric tests! | ||||||||||
Clean Mvvm Archcomponents | 365 | 2 years ago | 23 | apache-2.0 | Kotlin | |||||
👽 Built with MVVM pattern, Koin , Coroutines + Flows ,Architecture Components, Data Binding , Firebase , Unit/UI Tests ,Motion Layout | ||||||||||
Moviehub | 323 | 3 years ago | 1 | Java | ||||||
Showcases popular movies, tv shows, and people from The Movie Database | ||||||||||
Marvel | 227 | 5 years ago | mit | Java | ||||||
Marvel Characters Android Application Assigned by smava GmbH | ||||||||||
Dagger2 | 144 | 3 years ago | Kotlin | |||||||
Kotlin Dagger2 example project | ||||||||||
Newspaper | 83 | 4 years ago | 4 | apache-2.0 | Java | |||||
An aggregated newspaper app containing news from 10+ local news publishers in Hong Kong. Made with ❤ |
Model-View-ViewModel (ie MVVM) is a template of a client application architecture, proposed by John Gossman as an alternative to MVC and MVP patterns when using Data Binding technology. Its concept is to separate data presentation logic from business logic by moving it into particular class for a clear distinction. You can also check MVP
Why Promoting MVVM VS MVP:
MVVM Best Pratice:
Coroutines : Is light wight threads for asynchronous programming, Coroutines not only open the doors to asynchronous programming, but also provide a wealth of other possibilities such as concurrency, actors, etc.
They're different tools with different strengths. Like a tank and a cannon, they have a lot of overlap but are more or less desirable under different circumstances. - Coroutines Is light wight threads for asynchronous programming. - RX-Kotlin/RX-Java is functional reactive programming, its core pattern relay on observer design pattern, so you can use it to handle user interaction with UI while you still using coroutines as main core for background work.
// Add Coroutines implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.2' implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.2' implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.2' // Add Retrofit2 implementation 'com.squareup.retrofit2:retrofit:2.6.2' implementation 'com.squareup.retrofit2:converter-gson:2.6.2' implementation 'com.squareup.okhttp3:okhttp:4.2.2'
@GET("topstories/v2/home.json")
suspend fun fetchNews(): Response<NewsModel>
async
we create new coroutine and returns its future result as an implementation of [Deferred].launch
allow us to start a coroutine in background and keep working in the meantime. newsMutableLiveData.postValue(Resource.Loading())
launch {
try {
serviceResponse = dataRepository.requestNews()
newsMutableLiveData.postValue(serviceResponse)
} catch (e: Exception) {
newsMutableLiveData.postValue(Resource.DataError(NETWORK_ERROR))
}
}
Single responsibility principle
in SOLID (object-oriented design)
, so don't break this concept by
mixing the responsibilities .Copyright [2016] [Ahmed Eltaher] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.