Giter Club home page Giter Club logo

moviedb's Introduction

Build Status codecov.io

moviedb

An app to make it easier to save information of your loved movies

Getting started

Before you try to run this project you should go to OMDB API KEY to generate you own key. Place the key on your root local.properties file like omdbApiKey=${your_key}. I´ve made a gradle plugin to secure the key using NDK and JNI calls of C++ code. Because of that I dont have to add the key to github and I can avoid decompiling security leaks. Check the plugin here: gradle-secretkey-plugin

Check the development steps on Trello

https://trello.com/b/TNCSKgUT/moviedb

Code Walkthrough

The code is organized using a Clean Architecture with MVVM architecture for the presentation layer. The implementation was heavily based on the articles and projects of Fernando Cejas:

Modules

A brief description:

  • domain: Business rules and interfaces on how to interact with services and repositories.
  • presentation: Logic that connects the business rules with the UI. Manipulation of data for view.
  • data: Implementations of services and repositories.

Continuous Integration

Ci check is configured as mandatory for all pull requests.

Code Style Check


./gradlew check runs checkstyle for the code to ensure that the code style guidelines are being used.

Decisions

Why MVVM?

As alternative to MVP, MVVM takes advantage of the reactive programming to decrease the coupling between the presentation and the business layer. In that case the same viewModel could be used in many screens. Check this presentation I´ve made about it some time ago: MVVM - Presentation

Do I like tests?

Yes, thats why that architecture was chosen in the first place. But given the time I had to make the whole project, I´ve made one test for each layer(junit).

And Instrumentation tests?

Because every implementation is made using interfaces, its easy to create the inversion of control using dagger. I had enough time to implement it using kakao library and by creating a custom implementation of AndroidJUnitRunner that serves a mocked implementation of dagger. There is a test for the search movie by title. check it out!

Junit + instrumentation tests code coverage merged


./gradlew jacocoRootReport runs unit tests with jacoco and creates a merged coverage report on your rootProject build dir for junit and instrumentation tests. (Please make sure you have a phone or emulator attached before running this command)

License This project is licensed under the MIT License - see the LICENSE file for details

moviedb's People

Contributors

hernandazevedo avatar hernandazevedozup avatar viniciusjns avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

moviedb's Issues

I'm having trouble running the application

Hello Hernand,
My name is Rafael, I'm an Android developer at Zup. I'm trying to run your app, but I'm having some issues. I liked your code but I was not able to test the app. Even the apk file you provided in the e-mail to Rodolpho didn't work. I tried this apk https://www.dropbox.com/s/valzr3uxjch6id1/presentation-release.apk?dl=1

Could you double check the apk? Or provide another?

And about the issues when I tried to run the app by the code, my guess is something happening with native-lib. I'm attaching here some prints with the errors.

screen shot 2018-11-13 at 11 13 33 am

screen shot 2018-11-13 at 11 13 21 am

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.