GithubHelp home page GithubHelp logo

androidchallengejob's Introduction

Android Challenge Job

A mobile app for displaying real time Premier League Using APIs.(football-data.org)

Challenge description Job (Orcas)

Access to the top football competitions is and will be free forever as this was the initial purpose to setup the project.

Additional Info About API Documentation

football-data.org provides football data and statistics (live scores, fixtures, tables, squads, lineups/subs, etc.) in a machine-readable way.

Our free (RESTful) API in JSON representation is used by thousands of developers to power websites and mobile apps with football data.

Access to the top football competitions is and will be free forever as this was the initial purpose to setup the project. However if you need more competitions (or in-depth data), we have several paid plans available to serve your needs.

The exhaustive documentation, code samples and libraries will help you get up and running quickly.

Screenshot

Specifications

  • Caching for showing the last places offline.
  • portrait and landscape.
  • using MVC-MVVM
  • Using Usecases (part of clean architecture)
  • Partly include comments.
  • Reactive code

Languages, libraries and tools used

Requirements

  • min SDK 19

Known Issues

  • Sometimes images won't load as the quota on Football Api is very limited.

Implementation

  • In this project I'm using [MVC Pattern] MVVM Pattern as an application architecture adopted with usage of UseCases with these design patterns in mind:-
  • Repository Pattern
  • Singleton
  • Observables
  • Adapters
  • Using Retrofit library to handle the APIs stuff.
  • Using Room for caching places
  • Creating Custom ImagesLoader with Glide to handle getting the Venues Photos from Football Api and the extract a url and then load it into ImageView with no pain of writting logic inside the RecyclerView Adapter
  • Separation of concerns : The most important principle used in this project to avoid many lifecycle-related problems.
  • Each component depends only on the component one level below it. For example, activities and fragments depend only on a view model. The repository is the only class that depends on multiple other classes; in this example, the repository depends on a persistent data model and a remote backend data source. This design creates a consistent and pleasant user experience. Regardless of whether the user comes back to the app several minutes after they've last closed it or several days later, they instantly see a user's information that the app persists locally. If this data is stale, the app's repository module starts updating the data in the background.
  • Using to best of managing ViewState with less complex tools , using Data Classes and LiveData we created a solid source that we can expose to view to show what the app can do to the user without worring about the side effects

Immutability

Data immutability is embraced to help keeping the logic simple. Immutability means that we do not need to manage data being mutated in other methods, in other threads, etc; because we are sure the data cannot change. Data immutability is implemented with Java class

ViewModel LifeCycle

The ViewModel should outlive the View on configuration changes. For instance, on rotation, the Activity gets destroyed and recreated but your ViewModel should not be affected by this. If the ViewModel was to be recreated as well, all the ongoing tasks and cached latest ViewState would be lost. We use the Architecture Components library to instantiate our ViewModel in order to easily have its lifecycle correctly managed.

License

Copyright (c) 2019 Ahmed omar

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

androidchallengejob's People

Contributors

ahmedomarpro avatar

Watchers

 avatar  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.