Skip to content

App showing marvel chracters fetching data from marvel.com(In-progress)

License

Notifications You must be signed in to change notification settings

ajaypro/MARVELSTUDIO

Repository files navigation

MARVELSTUDIO

Simple app to display marvel characters from the Marvel APi response. Main features are search using Rxjava and caching the results.

Tech used

Rxjava - search opeartions Dagger2 - DI Retrofit2 - network Ormlite - caching

Application Structure

The Application implemented and structured based on the MVP pattern best practice, contributed by Antonio Leiva.

Whole application functionality is implemented in "Core-Lib" module using pure Java, and the "App" module contains all codes required for Android Application to load on Android OS, which can be replaced by any other interface (e.g. console app or web app)

The view (MainActivity), contain two fragments. Search and Cache fragments both contain their own presenter and implement View interfaces and the only thing that the view will do is calling a method from the presenter every time there is an interface action.

The presenter (Search or Cache Presenters), are responsible to act as the middleman between views and models. They retrieve data from Backend or Database and returns it formatted to the view. It also decides what should happens when user interacts with the view.

The models (Search Interactor), would only be the gateway to the service domain layer or business logic. In this case, it provides the data needed to be displayed in the view from Network.

The networking and API calls are managed by Retrofit and OkHttp as its httpclient, contributed by Square. It also shows decent logs while the application is running in Debug mode.

Caching characters data is done using OrmLite, a Lightweight Object Relational Mapping (ORM) Java Package. Database layer can also be done using other ORM libraries like realm or DBFlow.

Layers communications are managed by RxJava & RxAndroid contributed by ReactiveX.

Dependency Injections are being managed by Dagger created by Square and now maintained by Google.

Some minor Android common functions are managed using AndroidUtils library, developed and published on jCenter by myself.

Whole projects Dependencies are placed in "libraries.gradle" to avoid version conflicts and redundant in different modules.

Used new DataBinding library contributed by Google in Adapters for faster development, and added CustomBindingAdapter to handle downloading and caching images using Picasso library, which also use Google Palette support library as a helper class to extract prominent colors from image and making a related background for a better UI/UX.

The Android Log system is replaced with Timber contributed by Jake Wharton, which avoids logging in the release version.

A general HashGenerator class generates the hash key required for calling API using params.

Used new SupportVector library in some icons cases for a better UI.

Used new Google Firebase as application Analytics and CrashReport services.

About

App showing marvel chracters fetching data from marvel.com(In-progress)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •