Posts

Showing posts from April, 2016

Dependency Injection in Android with Dagger 2

Image
Dependency Injection in Android with Dagger 2 Dagger’s Power Dagger 2 is the upgraded version of the original Square’s Dagger, designed for dependency injection(DI) technology for java. DI’s sensational ability is to decouple the dependency relationship between objects, clear the code, and also let developer focus to the functional classes. In the complex framework & architecture, DI becomes the standard component, like Spring. Similarly, If you wanna write agile and maintainable code in a large and long-term run Android project, Dagger should be an not so bad option. How to install codepath/android_guides Many Android apps rely on instantiating objects that often require other dependencies. For instance, a Twitter API… github.com The first step always to install Dagger 2, unfortunately, the  official document did not give any details in Android’s Gradle build environment. Yeah, Dagger is not just for Android, but for any Java Project. The good news is above web

ReactiveX Operations

Image
ReactiveX Operations Table of Contents Resources ReactiveX Operations Sample Source code 1 Resources http://reactivex.io/documentation/operators.html http://reactivex.io/tutorials.html https://github.com/ReactiveX/RxJava/wiki/Additional-Reading 2 ReactiveX Operations To understand ReactiveX, We must consider everything as a stream, after that, the operations of ReactiveX stream was so complicated, that we can trade them as a new language, which operates the stream. The ReactiveX's Official document classify its operations as following categories: Creating Observables Transforming Observables Filtering Observables Combining Observables Error Handling Operations Observable Utility Operators Conditional and Boolean Operators Mathematical and Aggregate Operators BackPressure Operators Connectable Observable Operators Operators to Convert Observables Beside above categories, ReactiveX also provides the strategy to practice those operation