RSS Reader


Source link: https://github.com/uziassantosferreira/RSS-Reader

Supported languages:

Summary

  1. Introduction
  2. Architecture
  3. Application Setup
  4. License

Introduction

Overview

Create an application capable to read RSS url, displaying these information in an application of type master-details. The requirements raised for this assignment shall test concepts of:

  1. Architectural design for Android Applications;
  2. Ability to communicate with complex end-points, parsing XML responses and update UI;
  3. Data persistence and database manipulation;
  4. other.
Requirements
ID Name Description
REQ001 Read Url Application must be able to read an URL and parse url to get feed
REQ002 Display list feed item Display list when click in item on drawer menu
REQ003 Allow information caching All information once loaded from web into app must be persisted locally and accessible offline
REQ004 Internationalize the application Add support for portuguese language
REQ005 Open custom navigation showing details feed Open custom tab when you click link
REQ006 Refresh items/td> when you execute pull to refresh the app download again items

Showcase



Demonstration



Figure 01: sample demonstration of app

Architecture

-----------------

Architectural approach

Architectural reactive approach

Design Patterns

  • Singleton: this pattern is used mainly to offer a single instance of presenters for their respective views. Its implementation happens thanks to Dagger2 @Singleton annotation;
  • Observer: this pattern is largely used in order to issue network events that trigger database actions or UI updates. The variant employed is observed based on bus, being all call routed to a class that holds reference to all subscribers;
  • Delegate: this pattern is used in more than one place in the Application, for instance, with Postman and Router classes. The idea is to decouple classes that play distinct roles in the app - as the ones responsible for network communication for instance. That way, if any maintenance is required on them it is not passed beyond the class that gather all calls;
  • Factory: the application uses Factory Pattern on default Dagger2 implementation as well as to acquire End Points references for instance;

Quality Assurance

One of the most importants gains that the Clean architecture pattern brings to the project is the fact that all business logic gets isolated on Presenter Layer, Domain layer, Data layer, it means, all code worthy to be tested is well encapsulated on classes with low dependency on OS components. This pattern alied with a Dependency Injection Container and Mock Frameworks (such as Mockito allows the developer to take full advantage of Unit Tests.

Frameworks

  • Requery to database: “(...) A light but powerful object mapping and SQL generator for Java/Kotlin/Android with RxJava and Java 8 support. Easily map to or create databases, perform queries and updates from any platform that uses Java.”
  • Retrofit: _"(...) A type-safe HTTP client for Android and Java;
    • OkHttp: “(...) HTTP is the way modern applications network. It’s how we exchange data & media. Doing HTTP efficiently makes your stuff load faster and saves bandwidth. OkHttp is an HTTP client that’s efficient by default:

      • HTTP/2 support allows all requests to the same host to share a socket.
      • Connection pooling reduces request latency (if HTTP/2 isn’t available).
      • Transparent GZIP shrinks download sizes.
      • Response caching avoids the network completely for repeat requests.

      OkHttp perseveres when the network is troublesome: it will silently recover from common connection problems. If your service has multiple IP addresses OkHttp will attempt alternate addresses if the first connect fails. This is necessary for IPv4+IPv6 and for services hosted in redundant data centers. OkHttp initiates new connections with modern TLS features (SNI, ALPN), and falls back to TLS 1.0 if the handshake fails. Using OkHttp is easy. Its request/response API is designed with fluent builders and immutability. It supports both synchronous blocking calls and async calls with callbacks. OkHttp supports Android 2.3 and above. For Java, the minimum requirement is 1.7…”_ RxAndroid: “(...) ReactiveX is a combination of the best ideas from the Observer pattern, the Iterator pattern, and functional programming...”

  • Dagger 2: a dependency Injector for Android and Java, used to grant one of the S.O.L.I.D. principles for OO programming (Dependency Inversion Principle). Besides allowing the high level class to not depend upon low level ones, it makes Unit Test easier to perform with the help of a mocking framework i.e. Mockito;
  • Other:

Application Setup

In order to make this application work, follow the steps below:

  1. Have a Android Studio 3.0
  2. Clone the repository to your local machine;
  3. Build the project.

License

Copyright 2017 Uzias Santos Ferreira

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0 

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Resources

The library is a meaningful alternative to a standard Switch widget.

Sosoito is layout library for Android that can be used to simplify basic needs for loading/progression state.

Grav is a library for android which allow you to make multiple animations based on points

Android library designed for rapid and customizable form validation.

You can use FormValidator with any View that extends the original EditText (such as MaterialEditText for example).

This library offers an easy way to handle authentication and encryption using Android Fingerprint APIs.

A utility library that does the following type of validations:

  • Check internet connection
  • Validate for empty edit texts
  • Validate for email
  • Validate for mobile number
  • Validate text for any no of digits
  • Fancy Progress Dialog
  • Toast

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes