Scala code fluency with functional composition

Would you like to see an example on how to use Scala 'andThen'? If so, read along.

This article will discuss the usage of functional composition in Scala to achieve concise and fluent code. It will demonstrate how code can evolve from a naïve approach to a fluent one. Scenario We’ll write code that describes how to make pizza which consists of the following steps: Mixing ingredients to make the dough Kneading the dough to turn it into smooth dough Rolling out the smooth dough to make the base Adding toppings on the base to make the base with toppings Baking the base with toppings to produce the final product, pizza In a nutshell, the steps above must be performed in this predefined sequence to work. [Read More]

Vaadin with Scala

Vaadin's Scala documentation doesn't include a full example, so here's how to get your app up and running from start to finish.

This post shows a fully working ‘Hello World’ application in Vaadin 8 with Scala 2.12 running on Jetty. Following my frustrated attempt to Dockerize an Ionic application as the Web UI of my petty Akka project, I started evaluating the latest version of Vaadin. I followed the “Using Vaadin with Scala” documentation to create a ‘Hello World’, but the documentation doesn’t contain a fully working example. So I’ve put the steps below to help others who might be in the same situation as I was. [Read More]

Vaadin 8 + Scala 2.12

Starting a project with Vaadin 8 with Scala 2.12

This post is about running the Vaadin 8 Hello World with Scala 2.12 and Jetty. Following my frustrated attempt to Dockerise an Ionic 3 application for web browser, I went back to Vaadin in order to get a UI quickly working for my Akka project. I found the following Vaadin+Scala documentation which is a good start but it doesn’t show how to actually run it using the Maven Jetty plugin. [Read More]