Posts on Java label.


Dagger2 - Part4

Posted on 29th Oct 2017 02:10:17 in Java, Android

This is the part 4 of the article series. In part 3 we learnt what a Component is, how it wires with the Module. We also implemented the DemoApplication Activity lifecycle & the respective layout.

In this article we would learn how DaggerApplicationComponent  generates the DAG(Directed Acyclic Graph) when we provide the ApplicationModule class to it. Further, we would learn how @inject is used to get the object instance to finish our learning about Dagger2. Let's get started!

Read More


Dagger2 - Part3

Posted on 29th Oct 2017 01:33:20 in Java, Android

This is the part 3  of the article series. In part 2 we implemented the DataManagerDbHelper , SharedPrefsHelper and we modeled the class so that we can retrieve the value from the database. 

We will learn next what is a Component, how we can create a Component & how it wire itself in the DemoApplication to generate the dependent acyclic grap of objects.

Read More


Dagger2 - Part2

Posted on 29th Oct 2017 01:14:37 in Java, Android

Using Dependency Injection in Android.

This is the part 2 of the article series. In part 1 we understood the need and advantages of dependency injection. We also got an overview of Dagger2. In this part, we will focus on implementing the DI using Dagger2 in an android app.For the sake of this tutorial, we will break the process in steps and analyze each step one by one. Remember Dagger2 requires a concentrated approach. So actively follow the below tutorial, asking a lot of questions.

Read More


Dagger2 - Part1

Posted on 29th Oct 2017 00:38:52 in Java

In the Java world, there are a number of frameworks that have been created to simplify the application of dependency injection. The frameworks remove a lot of the boilerplate code that can occur, and also provide a systematic way to apply dependency injection across a software system.

One of the earlier Java dependency injection frameworks was Guice, created at Google. The team at Squarelater developed the Dagger framework, targeted primarily at Android.

While a fantastic accomplishment, the initial Dagger framework had a few downsides. For example, performance issues due to runtime reflection and difficulty working with ProGuard.

As a result, the updated Dagger 2 framework was born, which produces simpler generated code and solves the performance issues by having injection occur at compile time.

The name “Dagger” is inspired in part by the nature of dependencies in software development. The web of dependencies that occur between objects such as ABC, …, create a structure called a Directed Acyclic Graph. Dagger and Dagger 2 are used to simplify the creation of such graphs in your Java and Android projects.

For the remainder of the tutorial, the term Dagger will refer to Dagger 2.

Read More


JDK8- JDBC ODBC Bridge in Java 8

Posted on 28th Dec 2016 02:06:14 in Java

Starting with Java 8, the JDBC-ODBC Bridge will no longer be included with the JDK.

 Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); // classNotFoundException is thrown

 So, is there a solution to read and write to excel file using JDBC ODBC Bridge? The answer is YES! 

Read More


<-Back to blogs

"Don’t grieve. Anything you lose comes round in another form."
-Rumi

"Let the beauty we love be what we do."
-Rumi

© SOFTHINKERS 2013-18 All Rights Reserved. Privacy policy