Home » Kotlin

Tag Archives: Kotlin

Paging Library 3 and Content Provider

I needed to display the contents of a Android content provider in a recyclerview with pagination. I also wanted to try out version 3 of the Android Paging Library (which is currently in 3.0.0.alpha2 release), but most of the sources of documentation and tutorials are targeted at accessing either a network (e.g. Retrofit) or a database. So I wrote a ...

Read More »

AWS DynamoDB version field using AWS SDK for Java 2

spring-interview-questions-answers

It is useful to have a version attribute on any entity saved to anAWS DynamoDB database which is simply a numeric indication of the number of times the entity has been modified. When the entity is first created it can be set to 1 and then incremented on every update.  The benefit is immediate – an indicator of the number ...

Read More »

Spring WebClient and Java date-time fields

WebClient is Spring Framework‘s reactive client for making service to service calls. WebClient has become a go to utility for me, however I unexpectedly encountered an issue recently in the way it handles Java 8 time fields that tripped me up and this post goes into the details. Happy Path First the happy path. When using a WebClient, Spring Boot ...

Read More »

Unit test for Spring’s WebClient

WebClient to quote its Java documentation is Spring Framework’sNon-blocking, reactive client to perform HTTP requests, exposing a fluent, reactive API over underlying HTTP client libraries such as Reactor Netty. In my current project I have been using WebClient extensively in making service to service calls and have found it to be an awesome API and I love its use of ...

Read More »

Augmenting a Spring Data repository through delegation

I have recently written several posts about Kotlin’s delegation. In doing so, I realised a useful way to apply it to Spring Data repositories. Which would allow Spring Data to continue sprinkling some magic while providing a route for customisation. The code shown in this post is in Kotlin, but is still relevant to Java. This post uses R2DBC, but ...

Read More »

Using DataBinding with Glide in Android

In this post on databinding, we’ll take a look at how to load images using databinding with glide in an imageview. Let me begin by saying that you don’t need custom imageviews for this. Using binding adapter to declare a custom attribute, we can easily load a remote image into imageview with databinding. I’ll be creating a sample project for ...

Read More »