Skip to content
Kon Soulianidis edited this page Apr 25, 2018 · 5 revisions

Functional Reactive with Core Java

PREPARATION

To concentrate only on the workshop itself, it is useful to prepare the machine you are using.

What you need:

A usable Machine

We want to try out different things, including installations. Make sure that you have Admin rights on your machine. You must be able to install for example JDK's. Fully Internet access is required. Company Laptops, that are forced to use VPNs are mostly not very convenient sometimes unusable.

Docker

Make sure that Docker is installed and running on your machine.

IDE

Install an IDE that is able to deal with the new syntax.

IntelliJ IDEA is able to work with JDK 8 / 9 / 10 and 11. For the workshop, the community Edition is ok. https://www.jetbrains.com/idea/download/

Netbeans is 9.0 (with support for JDK 9 and Jigsaw) https://netbeans.apache.org/download/nb90/nb90-beta.html You can also build a later version of netbeans 9 that supports JDK 10 Not much word on JDK 11 according to their wiki

Eclipse Oxygen 4.7.3a has a patch already included to support Java 10

Visual Studio Code vscode-java plugin has recently implemented support in their CI builds

Download the JDK

We want to play with different JDK's. Download all of them to make sure

FnProject CLI

Optional: You can use docker to run the fnproject tools but CLI has less boilerplate.

Follow the quickstart to download a CLI client to use FnProject

There are brew for OS X and Linux packages, or you can download a Fn.exe for Windows

The day itself

What we will do during this event? Since Oracle switched to the new relaese train, that will bring us a JDK every six month, we should prepare ourself for this. We will focus on the JDK itself, means that we are dealing with different JDK versions, syntactical changes and will code some examples to get e feeling for the new stuff.

For sure, the JDK itself is a huge thing, so we are not covering all new things from the JDK and Tooling you will get. But there is a really nice and powerful new stream inside the JDK, since Java8. I am talking about the functional and reactive elements that Java is providing now out of the box.

But let´s start with an overview about what we are doing today.

How to deal with all the JDK's?

Depending on the new release train Oracle will deliver every six month a new JDK. Based on this, we have to deal with much more JDK versions in the future as we had in the past. The same happened with the amount of JDK vendors. We have right now Open / Oracle / Zulu and IBM.

The good news are, we are not alone with this challenge. The community is working on this topic too.

Here we will have a look at one solution that can be used on CommandLine and is available for Windows, Linux and OSX.

old school maven

Different dependency management systems are available..
but we are playing with good old maven. The only limitation so far, the used plugins. Depending on the plugins you are using, it is possible to use maven. Sometimes, if the you are using a to new JDK, you have to play with the plain IDE.

  • maven for jdk8
  • maven for jdk9
  • maven for jdk10
  • maven for jdk11

Dev-Environment

For the daily usage we need a faster version. Something we can run on command line very quickly. Using the Maven Docker Images, the local path could be mounted inside the container. So we have access to the source code and additionally after the mvn clean install we can check all results that are available in the target folder.

jUnit5

For the demos we want to write jUnit tests to verify the functionality we are coding. So we need the dependency declared in our projects...

#Abstract JUG´s AU FUNCTIONAL REACTIVE WITH CORE JAVA

There are a lot of reactive frameworks in the field, some with functional languages for the JVM. But Java9 give you both. But how you could combine this and use this without adding the next big framework to your project? We will have a Core Java journey to explore a lot of nice possibilities based on the the JDK.

JDK8/9/10/11 Streams / Functions / FnProject(servlerless) and Vaadin