MVVM Best Pratice:
- Avoid references to Views in ViewModels.
- Instead of pushing data to the UI, let the UI observe changes to it.
- Distribute responsibilities, add a domain layer if needed.
- Add a data repository as the single-point entry to your data.
- Expose information about the state of your data using a wrapper or another LiveData.
- Consider edge cases, leaks and how long-running operations can affect the instances in your architecture.
- Don’t put logic in the ViewModel that is critical to saving clean state or related to data. Any call you make from a ViewModel can be the last one.
ShowCase for the trended architecture and tools used in android in a simple sample
make a production ready-code, this is playground
- Adding more ui testing and validate the fleaky ones
- Adding integration test
- Apply custom lint rules
- Revisit architecture and testing and for upcoming enhancements
apply static code analysis: apply one or more
- detekt
- findBug
- SonarQube
using CI/CD: apply one or more
- Gitlab with integration with slack
- Travis
Very welcome.
- MVVM Presentation Architecture
- Unit tests using Junit
- UI tests using espresso
- Modular Clean Architecture
- kotlin
- kotlinDsl
- RxJava2
- RxKotlin
- RxAndroid
- Retrofit2
- Dagger2
- Android Navigation Component
- Android Jetpack
- Picasso
- OkHttp
- Junit4
- Espresso
- Mockito
- Fragment Test
coverage reports can be generated by executing the following command in terminal gradlew createDebugCoverageReport
it will be generated at app\build\reports\coverage\debug\index.html
lint check reports can be generated by executing the following command in terminal gradlew app:lintDevelopmentdebug
Copyright [2020] [Ebnrdwan]
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.