Git Product home page Git Product logo

omdb-movie-search's Introduction

OMDb Search App

Environment/Libraries

  1. Android Studio 3.2.1
    • API version info: Compile SDK Version: 28; Min SDK Version: 21; Target SDK Version: 28
  2. Picasso - while there are other alternates like Glide, I'm most familiar with Picasso and have not seen much difference in these libraries apart from the fact the Glide's footprint is a little higher than Picasso's
  3. Retrofit is the networking library of choice
  4. Mockito - a simple mocking framework that helps create unit tests. In this app, OMDbPresenter, OMDbRepository and OMDbViewContract are mocked
  5. PowerMock - another mocking framework that mocks static, private and final methods of framework or library classes without using Dependency Injection. In this app, both android.util.Log and retrofit2.Response classes are mocked

App Notes

  1. The OMDb Search app fetches movie title results from OMDb API
  2. The app is built using the Model-View-Presenter (MVP) architecture where the core idea is a testable architecture by separating the application into various parts thus making the application easier to maintain and test individually
  3. The app takes the approach of package by layer
  4. In the MVP architecture, the View (Activity) communicates with the Presenter for handling user interactions and the Presenter communicates with the Model to fetch the data from the APIs and present it back to the View
  5. Tested the app on Pixel 2 (running OS 9) apart from an Emulator running API 26

API Endpoint

  1. OMDb endpoint appears to only return 10 results in a single API call and in order to get the next set of 10 results, you will need to add "page=2" as a query parameter, however, for the sake of this demo, I didn't enable pagination in the app
  2. The Poster URL may sometimes return "N/A" as opposed to a URL string so, I'm loading a placeholder image when the URL is not present
    • I did not look into other scenarios where the URL is not returned as expected
  3. The demo app doesn't process the error status response returned by the API to display to the user

Unit Tests

  1. Ensured unit tests are written for Presenter which can be executed on the JVM
  2. At this time, the demo doesn't handle Instrumentation tests

omdb-movie-search's People

Contributors

anilgorthy avatar

Watchers

 avatar

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.