Giter VIP home page Giter VIP logo

imageloadingandroid's Introduction

ImageLoadingAndroid

About the code:

  1. Implemented clean architecture.
  2. Implemented dependency injection as static methods as of now as it is not in the scope of the problem.
  3. Paging has been implemented using the PagedList jetpack component.
  4. Image loading has been implemented using two approaches, i.e., with Glide, without Glide(Glide2 module)

About PagedList Implementation:

  1. Pagination logic abstracted in a separate module which is another abstraction over PagedList components.
  2. Pagination can be easily implemented by any paginated network request by extending to 4 classes, i.e., PaginationEntity, PaginationRecyclerAdapter, PaginatedViewModel, PaginatedDataSource.
  3. Which makes pagination implementation completely hassle-free.

About Glide2 Custom Implementation:

  1. Even though we can easily implement it glide, implemented it as a separate library for educational purpose and to address for glide limitations. 2. Glide2 implements its own separate in-memory cache(Lru cache) and local cache(db and file storage)
  2. The local cache is not implemented in the code yet but you can get the idea.
  3. The current Glide2 implementation relies on in-memory cache only and hence a little bit slower. The reason being, we need the local cache to quickly fetch the image instead of downloading again.5. The current implementation is "maxItems" dependent and not "maxMemory" dependent.
  4. It can be optimized further by automatically deriving how much memory to use for caching by checking free memory.

imageloadingandroid's People

Contributors

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