JDriven Blog

OAuth 2.0 and OIDC Explained with UML

Posted on by  
Ronald Koster

The purpose of Open Authorization 2.0 (OAuth 2.0) is to give an application (the "Client") limited access to your data at another service (the "Resource Server"), without having to give your password to that application. When OIDC is added Single Sign-On (SSO) is supported as well. The flow of these protocols can nicely be shown in a UML Sequence Diagram.

Continue reading →

Flyway the Right Way

Posted on by  
Ronald Koster

Sometimes when you upgrade your application the new version does not work correctly, and you need to downgrade. When you are unlucky you did some changes in your database that cannot be undone. In that case you need to restore the database from a backup, which is usually quite cumbersome and time-consuming. How nice would it be if you could just run an undo script which is much more light weight. This blog describes how you can do that using Flyway.

Continue reading →

Nushell Niceties: Checking If Value Is In List Or String Or Key In Record

Posted on by  
Hubert Klein Ikkink

Nushell has the in operator to check if a value is an element of list. With the same in operator you can check if a string is a substring of another string. And finally you can use the in operator to check if a key is in a record. When you use the operator the value you want to check is defined before the operator and the list, other string or record is defined after the operator.
The not-in operator is the opposite of the in operator and checks if a value is not in list or other string or key in a record.
It is also possible to use the has and not-has operators to do the same checks, but the value you want to check is set after the operator. The list, other string or record is set before the operator.

Continue reading →

Kotlin protip: indexed access operator overloading with multiple indices

Posted on by  
Riccardo Lippolis

Operator overloading is one of Kotlin’s most beloved features. It lets you give familiar syntax to custom types, and you’re probably already using it without even noticing it. Take the Map interface, for example: the indexed access operator ([]) is used to read and write entries:

val m = mutableMapOf<Int, String>()
m[1] = "one"     // m.put(1, "one")
val value = m[1] // m.get(1)

The same syntax works for arrays, lists, and any type that declares an operator fun get or operator fun set. Did you know that you can overload the indexed access operator with multiple indices?

Continue reading →

Bonus: From Java to Kotlin – Part XII: Sealed Classes vs Enums / Polymorphism

Posted on by  
Justus Brugman

Considering a move to Kotlin? Coming from a Java background? In this short series of blog posts, I’ll take a look at familiar, straightforward Java concepts and demonstrate how you can approach them in Kotlin. While many of these points have already been discussed in earlier posts by colleagues, my focus is simple: how you used to do it in Java, and how you do it in Kotlin.

Case 12: In this post, we explore how to model a finite set of types in Java — the “old way” with enums or class hierarchies, the “new way” with Java SE 17+ sealed classes — and then see how Kotlin handles them elegantly with sealed classes.

Continue reading →

From Java to Kotlin – Part XI: The Builder Pattern vs Type-safe Builders / DSL

Posted on by  
Justus Brugman

Considering a move to Kotlin? Coming from a Java background? In this short series of blog posts, I’ll take a look at familiar, straightforward Java concepts and demonstrate how you can approach them in Kotlin. While many of these points have already been discussed in earlier posts by colleagues, my focus is simple: how you used to do it in Java, and how you do it in Kotlin.

Case 11: You want to construct an object.

With many parameters. Some optional. Readable. Preferably without a constructor that looks like a password.

Continue reading →

Digital Sovereignty, A Dutch company's dilemma in the age of US hyperscalers

Posted on by  
Erik Pronk

If you run into a wall, don’t turn around and give up. Figure out how to climb it, go through it, or work around it." — Michael Jordan

The grip tightens

Dutch companies find themselves in an uncomfortable position. Their data flows through AWS, Azure, or Google Cloud. Their productivity tools are Microsoft 365 or Google Workspace. Their AI capabilities depend on OpenAI or Anthropic. The convenience is undeniable, but so is the dependency.

Digital sovereignty isn’t just a buzzword, it’s about control. Control over your data, your operations, and ultimately, your business continuity when geopolitical winds shift.

Continue reading →

Running COBOL in IntelliJ

Posted on by  
Jacob van Lingen

Within the JVM community, once in a while somebody jokes about getting old and therefore needing to start learning COBOL. Usually, someone responds that there are indeed some “precious older people” who wrote COBOL, or dare I say it, still write COBOL today. For me, COBOL has always sounded like a relic of the past. Something you read about, not something you seriously consider learning. But lately, I have been hearing rumours about companies starting to recruit new employees specifically to fill COBOL vacancies. That triggered me hard enough to start wondering. Can I actually run COBOL on my own laptop today, and if so, can I have a reasonably nice developer experience while doing so?

Continue reading →

From Java to Kotlin – Part X: Virtual Threads and Coroutines

Posted on by  
Justus Brugman

Considering a move to Kotlin? Coming from a Java background? In this short series of blog posts, I’ll take a look at familiar, straightforward Java concepts and demonstrate how you can approach them in Kotlin. While many of these points have already been discussed in earlier posts by colleagues, my focus is simple: how you used to do it in Java, and how you do it in Kotlin.

Case 10: You need to do many things at once. Mostly waiting. Sometimes working.

Continue reading →

From Java to Kotlin – Part IX: Statics and Companion Objects

Posted on by  
Justus Brugman

Considering a move to Kotlin? Coming from a Java background? In this short series of blog posts, I’ll take a look at familiar, straightforward Java concepts and demonstrate how you can approach them in Kotlin. While many of these points have already been discussed in earlier posts by colleagues, my focus is simple: how you used to do it in Java, and how you do it in Kotlin.

Case 9: You need something that belongs to the class. Not to an instance.

Continue reading →

shadow-left