Building Reactive Systems with JavaFX

JavaFX is the new standard library for building graphical applications in Java, but many programmers out there is still stuck with Swing or even (tremble) AWT. A lot has happened in the 20 years java has been around. When I began looking into the JavaFX libraries two years ago for the Speedment UI I found many things fascinating! Here are ...

Read More »

Spring-managed Transactions Explained – Part 2 (JPA)

spring-interview-questions-answers

In the first part of the series, I showed how transactions work in plain-vanilla JDBC. And then I showed how Spring manages JDBC-based transactions. In this second part of the series, I’ll show how transactions work in plain-vanilla JPA first. And then show how Spring manages JPA-based transactions. Funds Transfer To help illustrate transactions, I’ll be using the same case ...

Read More »

MVC 1.0 in Java EE 8: Getting started using facelets

java-interview-questions-answers

MVC 1.0 is an action-based Model-View-Controller web framework, which will be a part of future Java EE 8. It will live side by side with component-based JSF framework and will provide an alternative for building HTML+javascript oriented applications with full control over URLs. This post summarizes what needs to be done in order to use Facelets instead of default JSP ...

Read More »

Getting Started with Sample Programs for Apache Kafka 0.9

Streaming data is of growing interest to many organizations, and most applications need to use a producer-consumer model to ingest and process data in real time. Many messaging solutions exist today on the market, but few of them have been built to handle the challenges of modern deployment related to IoT, large web based applications and related big data projects. ...

Read More »

The Best of Both Worlds

Type-Safe Views using Abstract Document Pattern How do you organize your objects? In this article I will introduce a pattern for organizing so called noun-classes in your system in a untyped way and then expose typed views of your data using traits. This makes it possible to get the flexibility of an untyped language like JavaScript in a typed language ...

Read More »

Dear API Designer. Are You Sure, You Want to Return a Primitive?

Some APIs are set in stone. For instance, the JDK’s. Or public APIs, like the one between a database and a database client (e.g. JDBC). This makes designing such APIs rather difficult as a lot of thinking needs to be done prior to publishing an API. Which means that being defensive when designing the API is a good choice. One ...

Read More »

Make Your Factories Beautiful

Every java programmer worth the name knows about the Factory Pattern. It is a convenient and standardized way to reduce coupling by teaching a component how to fish rather than giving it to them. When working with large systems the pattern does however add a lot of boilerplate code to the system. For every entity you need a number of ...

Read More »