Skip to content
/ NY-Times Public template

playground with the latest architectures/tools in Andorid World

Notifications You must be signed in to change notification settings

ebnrdwan/NY-Times

Repository files navigation

kotlin Mockito Junit4 Espresso Dagger 2 Kotlin-Android-Extensions MVVM

MVVM3

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.

Goal

ShowCase for the trended architecture and tools used in android in a simple sample

[ 🚧 Work in progress ⛏👷🔧 🚧 ]

Non-Goals

make a production ready-code, this is playground

Doing

  • Adding more ui testing and validate the fleaky ones
  • Adding integration test
  • Apply custom lint rules
  • Revisit architecture and testing and for upcoming enhancements

Todo

apply static code analysis: apply one or more

  • detekt
  • findBug
  • SonarQube

using CI/CD: apply one or more

  • Gitlab with integration with slack
  • Travis

Contribution

Very welcome.

Technical Stacks:

  • MVVM Presentation Architecture
  • Unit tests using Junit
  • UI tests using espresso
  • Modular Clean Architecture

Tools & Dependencies:

Code Coverage

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 Result

lint check reports can be generated by executing the following command in terminal gradlew app:lintDevelopmentdebug

LICENSE

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.

About

playground with the latest architectures/tools in Andorid World

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages