Skip to content

itsymbal/op-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

op-boilerplate

This is a Bolierplate Android app. It is using the MVP (Model-View-Presenter) pattern (but not for long!)

#This implementation has the following features:

  1. Presenters survive configuration change of the View. A new Presenter is created when a screen is first created, and destroyed when screen is destroyed. It persists across config changes.
  2. Presenters keep state. When a View gets recreated upon configuration change it inherits the presenter from the previous View. Presenter updates View state to that of the previously existing View. For example, if a View sends an async request, and a new View is created, the request is not re-sent. The new View gets the callback when the async request returns. If the async request has returned in one view, and new view is created, new view gets the data delivered to it immediately
  3. Presenters are injected into Views using Dagger 2. That makes it easy to inject mock Presenters into Views, and mock dependencies into Presenters.
  4. Code is fully tested and comes with a test suite setup. Presenters are tested using plain jUnit tests. Views are tested using Espresso and jUnit.

Crashlytics integration

Add your Fabric keys to app/fabric.properties. They are necessary to log to Crashlytics in Prod build.

Project integrates the following libraries:

  1. Dagger 2 dependency injection
  2. ButterKnife view injection
  3. Timber logging
  4. LeakCanary memory leak detector
  5. ConstraintLayout
  6. RxJava

Testing via

  1. jUnit 4.12
  2. Mockito 2 mocking
  3. AssertJ Java assertions
  4. AssertJ Android View assertions

Build Variants

Project has two Build Variants - Release and Debug

TODO

in no particular order

  1. Convert to Kotlin
  2. Convert to MVVM
  3. Integrate View Binding with a View Model for setting data on View
  4. Add Composition pattern to Activity
  5. Add images and deploy project to Google Play
  6. Add auto-deployment configuration, possibly via Fastlane
  7. Set up project generation utility
  8. Add Checkstyle plugin
  9. Add SonarQube integration
  10. Add CI project configuration via TravisCI or CircleCI
  11. Retrieve and display a list, to figure out integration with lists/ adapters
  12. Enable caching in Repository. Retrieve from Network, populate memory cache
  13. Enable local DB caching, probably via Realm DB.
  14. Add Espresso integration testing
  15. Add automated performance testing - start time, screen load time, APK size, method count
  16. Example of a multi-module Component and its use (Component that uses multiple Modules - and creating test version of it)
  17. Example of functionality composition. Reusable presenter components? multiple sections per screen - multiple fragments?
  18. Master / detail flow implementation. Fragments as Views instead of Activities
  19. Integrate third party SDK, e.g. Branch. Presenter integration via shim?
  20. Signup / login flow example. Possibly using Firebase Authentication?
  21. Error handling of network / user errors
  22. Handle 'don't have network' state (airplane mode / network off / network not connected)
  23. Rx network call with exponential backoff

License

Copyright 2016 Orange Penguin, Inc.

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

Boilerplate application. MVP implementation. Uses GitHub API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors