Avenging - MVP project
Avening - MVP without RxJava or Dagger
Read more on the blog post:Android app built with an MVP approach without RxJava or Dagger.
Uses Marvel Comics API as a service which contains all the information about its vast library. Data provided by Marvel. © 2016 MARVEL
What is MVP (ModelViewPresenter)?
- 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
Configs & API authentication
If you wish to run your own CI (I'm using Travis) ensure you have the following environment variables on your CI config:
- IS_ CI_JOB = true
- CI_ PUBLIC_KEY = < YOUR-PUBLIC-KEY >
- CI_ PRIVATE_KEY = < YOUR-PRIVATE-KEY >
To run locally have your private and public keys in your gradle.properties file (project's root folder).
- marvelPublicKey = < YOUR-PUBLIC-KEY >
- marvelPrivateKey = < YOUR-PRIVATE-KEY >
Mind the markedown spaces.
Dependencies
CORE
- Retrofit A type-safe HTTP client for Android and Java
- Jackson A default ObjectMapper instance will be created or one can be configured and passed to the JacksonConverter construction to further control the serialization.
- Mockito Mocking framework for unit tests written in Java
- LeakCanary A memory leak detection library for Android and Java.
MOBILE
- Design Support Library The 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.
- Picasso A powerful image downloading and caching library for Android
- Espresso Use Espresso to write concise, beautiful, and reliable Android UI tests
WEAR
- Play Services Google Play services.
- Google Support Support v4 This 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
- Picasso A powerful image downloading and caching library for Android
Issues: Fell free to open a new issue. Follow the ISSUE_TEMPLATE.MD
Contributing
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 current development branch
- Push your work back up to your fork
- Submit a Pull 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.
License
Copyright © 2016 Joaquim Ley 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.