In theory it appears pretty easy to build the browser side of an application using OpenId Connect. Actually implementing it in a real world application has usually proven to be more difficult than that.
I would like to show you how to solve some of the real world problems beside the basic setup. First let me describe what I want to build:
- a single page app with Angular
- routing via the hash part of the url
- a forced login via OIDC
I will write about the following problems within building that app:
- What library to choose?
- Where and when to initialise that library?
- Angular and hash based routing
- How to handle errors?
- Some smaller miscellaneous problems
GraphQL is a query language for dynamic queries on linked data. In the GraphQL world, there are many tutorials and documentation that illustrate the concrete introduction to GraphQL. Since getting started requires a lot of explanation, regular tutorials usually have a simple setup, which does not reflect the real world complexity. If additional technologies are added or the complexity of the project increases, these “Hello World” examples are usually no longer so helpful.
This article introduces GraphQL on the technology Spring Boot with JPA and Kotlin. I also present some best practices which I have learned while I have worked with it. You can find the source code here: https://github.com/akquinet/kotlin-spring-graphql
This article is a follow-up to this previous article about bounded loops. Bounded loops are cool because they always terminate and usually it is pretty easy to estimate the computational time. But as every computer scientist, who had to understand the halting problem, knows, there is a big class of algorithms which are harder. These are known as the class of μ-recursive functions. Here, unbounded loops exists which can run forever. I will introduce how IMHO unbounded loops can be implemented in Kotlin in a functional way. And, of course, I could not resist and did some measurements…
In general, a Docker build file (Dockerfile) should be usable on any Docker server. In some cases however, you would like to have something like a conditional ‘IF’ statement in your Dockerfile. To give an example: It is common usage to use apk/apt-get/curl or any other tool in your build that needs to download data from the Internet.
Alas, in some networks the use of a HTTP(S) proxy is mandatory and thus an impediment.
In this article we will show how to run a proxy-agnostic Docker build. The described mechanism is also usable for other circumstances.
We are using Kotlin and Spring Boot in one of our projects. This includes Spring Boot Jpa Repositories. We are using a CrudRepository that provides basic functionalities like save(), delete(), findById() etc. This library is written in Java, hence method signatures look like this:
Optional<T> findById(ID var1);
Using this API out of the box would force us to deal with cumbersome Java Optionals. Since we are implementing in Kotlin we would like to use Kotlin Nullables instead and as it turned out we can achieve this very easily.
Loops are a basic paradigm in imperative programming languages. In functional languages you also need to loop, but you do it differently. Here, I present how I prefer to implement loops in a functional style using Kotlin. To check, if this is a good idea at all, I do some benchmarks against imperative variants and good old Haskell.
When developing and running apps inside Microsoft Azure you have to deal with the topics like monitoring and logging. Azure provides a central solution for that question which is Application Insights. AppInsights (for short) is the central hub to get metrics and log data from our applications and let you access these data within the azure portal in an easy and convenient way. While the metric aspect is well documented, how to connect your favorite application logger to AppInsights it is not.
In this blog post we will show you how to enhance your typical Spring-Boot application to have all the logging data send to Azure AppInsights automatically. In a followup post we will show the same for a typical nodejs based application.
Thus we came up with the solution to convert the original Java code to Kotlin and compile it for both platforms.
Sodium is an implementation of Functional Reactive programming (FRP) with some nice features. One of these is the support of transactions in the GUI layer. I had quite some discussions with my colleagues on what this actually means and if such a transaction concept is useful or not. In this article I sum up my current insights and opinions about transactions in Sodium.