Subscribe: Javalobby - The heart of the Java developer community
Added By: Feedage Forager Feedage Grade A rated
Language: English
artifactid version  artifactid  code  dependency  groupid artifactid  groupid  inheritance  java  speedment  spring  vaadin  version 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Javalobby - The heart of the Java developer community

DZone Java Zone

Recent posts in Java on


This Week in Spring: JUnit and Axon and Statemachine, Oh My!

Thu, 08 Dec 2016 12:31:00 GMT

Welcome to another installment of This Week in Spring! This week, I’m in Brisbane, Australia, on the second leg of the YOW! conference circuit. If you’re around, please say hi or find me when YOW! moves to Sydney in a few days.

We’ve got a lot to cover so let’s get to it!

Getting Started With Vaadin in Spring and Java EE

Thu, 08 Dec 2016 11:01:10 GMT

One of the most interesting findings in the latest Vaadin Community Survey was that Java EE is used slightly more than Spring among developers. Although the differences between Java EE and Spring is small, if we combine both, we see that 73% of developers using Vaadin also use either Java EE or Spring:

The good news for developers is that Vaadin officially supports both Java EE and Spring. Vaadin’s Matti Tahvonen and Petter Holmström recently explained the Dependency Injection alternatives in a webinar, and I recently published two videos showing how simple it is to set up a Vaadin project with the Java EE and Spring back-ends. Of course, these videos aren’t the only resources available. I’ll talk about some resources for learning Spring and Java EE with Vaadin below.

Java Holiday Calendar 2016 (Day 8): Use Traits in Java

Thu, 08 Dec 2016 10:01:00 GMT

Today's tip is about defining your classes and interfaces using Traits. This allows you to simplify your code and reuse components efficiently without creating unnecessary coupling or inheritance between your classes.

Suppose we have two interfaces, Table and Column, that both have names, then we would introduce a name trait — HasName — that both interfaces extends. A Table and Column can also have an alias, so because of that, we would introduce the trait HasAlias:

(Data)Weaving Expressons In Java

Thu, 08 Dec 2016 09:01:10 GMT

I previously wrote an article called Weaving it with Dataweave expressions in the MuleSoft blog, which explains the powerful Dataweave expression function dw() and its implementation outside a Dataweave Transform Message component.

Dataweave has the ability to transform a message payload from one form to another and in any kind of format (XML, CSV, JSON, Pojos, Maps, etc).

Learning to Live With Language FOMO

Thu, 08 Dec 2016 07:01:18 GMT

Sitting in a room full of functional programmers, I feel somewhat out of my depth. Monads this, tail recursion optimization that, and immutability everywhere. Suddenly using plain old “if” statements makes me obsolete.

Reading blog posts about the latest (OK, latest in my world) languages like Kotlin, Scala, and Groovy, and I feel like I slept through some kind of revolution. Elimination of NPEs this and metaprogramming that. Now, every time I find myself adding a null checking assertion at the start of my method, I feel like shaking my fists at the sky crying, “Why doesn’t the compiler do this for me!”

Why Your Java Career Is Looking Better and Better [Infographic]

Thu, 08 Dec 2016 06:31:00 GMT

Java has helped build many careers because of its popularity with developers since the past two decades. What is more exciting is that this journey is not going to slow down anytime soon.

As many as 12 countries are ready to pay a high salary for Java professionals even with no experience. It is not only developed countries like US and UK but also developing countries like India that are having a shortage of Java professionals to fill in different positions.

Using Web Components in Plain Java

Thu, 08 Dec 2016 05:31:00 GMT

Many Vaadin Framework users have been wondering why we have started the pure client side Elements project. As discussed last month, the ultimate plan is to start using these Web Components based client side components in the client side of an upcoming version of the framework. In that version, you’ll have plain Java API for all Vaadin Elements and it will be super easy to wrap any Web Component as a Vaadin add-on.

Although the time may still not be right for a fully Web Component based client side engine, you can today already use Elements and other Web Components with Vaadin Framework. This can be done as with any other JS integration, as we have presented before, or using the Elements add-on, a helper library from our labs that makes it really easy to wrap Web Components as add-ons with a fully featured Java API.

Creating Maps With Named Lambdas

Wed, 07 Dec 2016 11:01:06 GMT

The Magical Map

Wouldn't it be great if we could create Java maps like this?

Map map = mapOf(
      one -> 1,
      two -> 2

Map map2 = mapOf(
      one -> "eins",
      two -> "zwei"

Is Inheritance Dead?

Wed, 07 Dec 2016 09:01:05 GMT

When object-oriented programming was introduced, inheritance was the main pattern used to extend object functionality. Today, inheritance is often considered a design smell. In fact, it has been shown that extending objects using inheritance often results in an exploding class hierarchy (see Exploding class hierarchy section). In addition, several popular programming languages such as Java and C# do not support multiple inheritance, which limits the benefits of this approach.

The decorator pattern provides a flexible alternative to inheritance for extending objects functionality. This pattern is designed in a way that multiple decorators can be stacked on top of each other, each adding new functionality. In contrast to inheritance, a decorator can operate on any implementation of a given interface, which eliminates the need to subclass an entire class hierarchy. Furthermore, the use of the decorator pattern leads to clean and testable code (see Testability and Other Benefits sections).

An Introduction to JBehave and BDD

Wed, 07 Dec 2016 07:01:08 GMT

Testing is an important part of any project, and there are various types of testing available. JBehave is a nice tool for behavior-driven development, which actually tests from the stakeholder perspective.

If you have participated in client/user meetings to measure requirements, in the waterfall model, for example, or a Sprint planning meeting in Agile, you're aware of the importance of stakeholder perspective testing. Each piece of a task is known as a story, and BDD provides the provision to test these stories.

Java Annotated Monthly: Jigsaw and Java 9, Being a Better Dev, and Kotlin

Wed, 07 Dec 2016 05:01:00 GMT

The holidays are coming, but the news never stops. This month, we have articles about Java 8, 9 and beyond, as usual, and a mixed bag of fundamentals, popular libraries, and other JVM languages. As the end of the year is a good time for retrospectives (or it would be, if we weren’t so busy trying to finish everything before all the parties), we’re also taking a look at what it means to be a competent developer.


Not all elections are doom and gloom.  The 2016 JCP Executive Committee elections are over, and I personally am proud to see the London Java Community re-elected once again. The JCP is continuously improving to provide the kind of standards process a language like Java really needs, and it’s fantastic that user groups are involved in this as well as vendors and individuals, it shows the developer’s voice is important and can be heard.

Java Holiday Calendar 2016 (Day 7): Access Databases With Streams

Wed, 07 Dec 2016 01:01:00 GMT

Today's tip is about querying databases using Java 8 streams. By adding both a runtime and plugin dependency to open-source Speedment in your application's Maven POM file, you get access to standard stream implementations of all the database's tables. For MySQL, your POM file could look like this:




Java Holiday Calendar 2016 (Day 6): Be Lazy With Java 8

Tue, 06 Dec 2016 11:01:10 GMT

Today's tip is about lazy initialization. Sometimes, we want our classes to do only what is absolutely necessary and nothing more. Immutable classes are particularly good candidates for laziness. Speedment, a Stream ORM Java toolkit and runtime, is using Lazy internally — and you can find the complete Lazy source code here. It's free, so steal it!

By Copying This Small Lazy Class...

public final class Lazy {
    private volatile T value;
    public T getOrCompute(Supplier supplier) {
        final T result = value;  // Read volatile just once...
        return result == null ? maybeCompute(supplier) : result;
    private synchronized T maybeCompute(Supplier supplier) {
        if (value == null) {
            value = requireNonNull(supplier.get());
        return value;

IntelliJ IDEA Inspection Settings for Java 8 Refactoring

Tue, 06 Dec 2016 09:01:11 GMT

I’ve been giving a talk this year showcasing how to use IntelliJ IDEA inspections to help you refactor existing code to Java 8. The initial version of this, the one I gave at DevoxxUK (video), is based on my Migrating to Java 8 Tutorial. I’ve also written before about how IntelliJ IDEA can help you write more idiomatic Java 8 code.

I’m revisiting the topic now that IntelliJ IDEA 2016.3 has added even more support for
identifying areas of code that can utilize Java 8 idioms and APIs, and making better use of those areas that already use Java 8. I’ve updated the presentation to use these new inspections, and performance tested the results when applied to a specific codebase. Let’s take a look at which inspections are used, how you configure them, and go into detail about what some of them do.

Spring Data Geode Is Out!

Tue, 06 Dec 2016 07:01:00 GMT

On behalf of the Spring and Apache Geode communities, I am extremely pleased and excited to announce the release of Spring Data for Apache Geode 1.0.0-incubating.

You can get the bits from Maven Central by including the following dependency in either your application Maven POM or Gradle build file.

Here's What Makes Vaadin Unique

Tue, 06 Dec 2016 05:31:05 GMT

If you follow the world of Java and Open Source, there’s a big chance that you have stumbled upon articles, videos, forum answers, talks, and code from Stéphane Nicoll. I had the pleasure of meeting Stéphane some days ago at Vaadin’s headquarters in Finland and I interviewed him about Spring Boot and Vaadin.

Hi Stéphane, it’s great to talk with you. I’m a big fan of Spring Boot. It really increases developer’s productivity. I particularly like how easy it is to create a new project using Spring Initializr and Spring Boot’s auto-configuration capabilities. What other “killer features” would you highlight in Spring Boot?

Lambda Expressions in Java 8

Mon, 05 Dec 2016 22:11:11 GMT

Lambda expressions are the most popular feature of Java 8. They introduce functional programming concepts to Java, which is a completely object-oriented and imperative programming language. How functional programming languages work is beyond the scope of this article, but we will extract a feature that will make the difference obvious for us who work with OOP.

How functional programming languages work is beyond the scope of this article, but we will extract a feature that will make the difference obvious to us who work with OOP.

Java Holiday Calendar 2016 (Day 5): CRUD Operations

Mon, 05 Dec 2016 12:01:00 GMT


Today’s tip is an introduction on how to use open-source Speedment to expand Java 8's Streams to support Creating, Reading, Updating and Deleting database entities.

Head out to Speedment's GitHub page to see how to modify your project's POM file. Once you've made the changes, you can connect to an existing database and generate Java code automatically from the database's meta information (like columns and tables). Once completed, your Java Streams becomes much more feature-full, and you can:

A Look at the Builder Pattern

Mon, 05 Dec 2016 10:01:05 GMT

Builder is a part of the Creational pattern family, which is useful for creating complex objects with a lot of options — where all of them aren't necessary. In short, it's great when we need customized objects with optional inputs.

Let's take a real world example to understand it. A Subway shop is well-known for its customized sandwiches — as per the user inputs. The bread is the base of a sandwich, and toppings get added based on the user. So, as per the user inputs, Subway is customizing their sandwiches. That is exactly what we do when we use the builder pattern to build an object.

Things to Know About ArrayLists

Mon, 05 Dec 2016 09:01:12 GMT

The ArrayList is one of the more interesting things a Java programmer can learn. If you have experience coding in Java, you should know what how to use Array or List. However, if you are new to Java, things might not be as easy.

So, what is Java ArrayList?