- Notifications
You must be signed in to change notification settings - Fork72
MVP pattern example on Android: no Dagger or RxJava example
License
JoaquimLey/avenging
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Read more on the blog post:Avening - MVP without RxJava or Dagger
Android app built with anMVP approachwithout RxJava or Dagger.
UsesMarvel Comics API as a service which contains all the information about its vast library.Data provided by Marvel. © 2016 MARVEL
- View is a layer that displays data and reacts to user actions. On Android, this could be an Activity, a Fragment, an android.view.View or a Dialog.
- Model is a data access layer such as database API or remote server API.
- Presenter is a layer that provides View with data from Model. Presenter also handles background tasks.
Most of the modern Android applications just use View-Model architecture.Programmers are involved into fight with View complexities instead of solving business tasks.Using only Model-View in your application you usually end up with "everything is connected with everything", which translates into harder scalability. With the MVP approach it easier to understand the role of each element. You didn’t became a developer to be wasting time on boring code maintenance, but to build awesome stuff!
This sample is available
If you wish to run your ownCI (I'm using Travis) ensure you have the following environment variables onyour CI config:
- IS_ CI_JOB = true
- CI_ PUBLIC_KEY = < YOUR-PUBLIC-KEY >
- CI_ PRIVATE_KEY = < YOUR-PRIVATE-KEY >
To runlocally have your private and public keys in yourgradle.properties file (project's root folder).
- marvelPublicKey = < YOUR-PUBLIC-KEY >
- marvelPrivateKey = < YOUR-PRIVATE-KEY >
Mind the markedown spaces.
CORE
- RetrofitA type-safe HTTP client for Android and Java
- JacksonA default ObjectMapper instance will be created or one can be configured and passed to the JacksonConverter construction to further control the serialization.
- MockitoMocking framework for unit tests written in Java
- LeakCanaryA memory leak detection library for Android and Java.
MOBILE
- Design Support LibraryThe Design package provides APIs to support adding material design components and patterns to your apps.A flexible view for providing a limited window into a large data set.
- PicassoA powerful image downloading and caching library for Android
- EspressoUse Espresso to write concise, beautiful, and reliable Android UI tests
WEAR
- Play ServicesGoogle Play services.
- Google Support Support v4This library is designed to be used with Android 1.6 (API level 4) and higher. It includes the largest set of APIs compared to the other libraries
- PicassoA powerful image downloading and caching library for Android
Issues:Fell free to open a new issue. Follow theISSUE_TEMPLATE.MD
Contributions are always welcome!
Follow the "fork-and-pull" Git workflow.
- Fork the repo on GitHub
- Clone the project to your own machine
- Commit changes to your own branch
- Merge with currentdevelopment branch
- Push your work back up to your fork
- Submit aPull request your changes can be reviewed (please refere the issue if reported)
Prevent code-style related changes (at least run Ctrl+⌥+O, ⌥+⌘+L) before commiting.
Copyright © 2016 Joaquim LeyLicensed 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 athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, softwaredistributed 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 andlimitations under the License.
About
MVP pattern example on Android: no Dagger or RxJava example