Nowadays most happening topic in the android dev community is Jetpack Compose, a new way of creating the UI.
Before touching jetpack compose we should understand the basics of Declarative UI. In Declarative UI, design UI by means of code. Jetpack compose is kind of inspired by React js and flutter.
Today we will try to build our first UI using Jetpack compose.
If you are android developer then most probably you are using Dagger 2 as a dependency injection library. Dependency injection is a very critical aspect of any project to achieve loosely coupled dependencies and better unit testing.
Dependency injection in simple terms, providing a dependent object to the object which want it.
The basic principle of dependency injection is never create an instance of an object inside another class that wants to use it, instead provide it from outside.
Most of us use Dagger2 for dependency injection but personally, I feel like the process of implementing is a little tedious…
We, android developers, are always excited to build something cool something really meaningful which will help the business grow and ultimately help ourselves to learn new technologies, to focus on the real work we always look for the automate the tasks which are essential and unavoidable and of course redundant.
Every android developer in their life spends some time in building data classes and retrofit interfaces from request and response of API calls, which backend team provide. Nowadays many backend teams from various companies maintain really good API documentation in Swagger, which uses OpenAPI specification. …
Duck types are public interfaces that are not tied to any specific class.
This is the definition from a great author Sandi Metz book POODR.
Before touching this concept, I will give you 1 simple analogy to explain the concept.
Suppose we have a bird duck who can swim and quack, so these are features of duck. Now suppose there is another species of bird who is capable of swim and quack is also comes under that category of duck, so we will call that bird a duck. This is called duck typing.
If we want to put a concept…
Kotlin is a programming language that is developed at JetBrains. As many people say about Kotlin that you will not like the Kotlin, you will love it. I have a similar experience with it. Kotlin has many amazing features which will make your life easy as a developer, So today I decided to explain one of the feature which I like, which is Higher order function and lambdas.
Higher order functions are functions that accept functions as a parameter or return a function or both are Higher Order functions.
Lambda is a function without a name.
Let’s take one simple…
Before touching the concept of scope and subcomponent, let’s go through some of the Dagger basics.
Dagger is a fully static, compile-time dependency injection framework for both Java and Android. It is created by Square and now maintained by Google.
Dagger 2 provides some annotations for implementing dependency injection.
@Inject annotation let us define an injection point that is injected during class instantiation. The injection can occur via three different mechanisms. This annotation provided by java.
It’s an annotation that marks the class which provides dependencies. …
I am mobile developer and I faced a lot of problems while developing for Android and iOS applications, and sometime those problems are related to maintenance of two different source codes. One fine day I came to know about Flutter mobile SDK, initially I thought this is yet another SDK in bunch of SDK’s available in market, but then I decided to give a try on one of the precious weekend of mine :P
I found some amazing features of Flutter which makes me curious, what if I want to make some screens which are platform-specific or integrate existing screens…