Thursday Sep 26, 2013

Session Report: DataFX: The Best Way to Get Real-World Data into Your JavaFX Application

Java Champion Johan Vos of Lodgon and GUI expert Hendrik Ebbers of Materna GmbH gave a session on Vos’ labor of love, Project DataFX, a 2-year-old free and open source project intended to make retrieving, massaging, populating, viewing, and editing data in JavaFX UI controls easier. In so doing, they extend the functionality of JavaFX.

The goal of the session was to teach attendees how to develop enterprise applications in JavaFX with real-world services and data. They were focused on showing how the DataFX framework facilitates the process of data retrieval and rendering, and how it allows developers to focus on their application-specific logic.

According to Vos and Ebbers, the real value in most client-oriented business applications is the data sitting on remote servers and cloud systems. Retrieving and displaying this data must be done correctly before end users can interact with it. The open source DataFX framework aims to simplify this by enabling JavaFX developers to easily retrieve data from a variety of sources in several formats and rapidly integrate it with JavaFX components (such as TableView), using typical JavaFX patterns. The session introduced the DataFX project, gave practical advice for using it, and provided insight into future applications.

The session explored a variety of tools used in DataFX: the Concurrency API, DataFX Executor, lambda expressions, DataReader, RestReader, DataProvider, Controller API, Flow API, and many more.

The DataFX Project
Java Champion Johan Vos
Hendrik Ebbers
Be sure and go to to view the session in early October.

Tuesday Sep 17, 2013

A Conversation with Java Champion Johan Vos

A new interview is now up on otn/java. In it, Johan Vos, a highly regarded Java Champion whose focus is on combining the strengths of back-end systems and embedded devices, provides his insightful take on what’s happening in the world of Java technology. His favorite technologies are currently Java EE/Glassfish at the backend and JavaFX at the front-end. He is a co-author of Pro JavaFX 2, and will be offering two sessions at JavaOne 2013.  

In the interview, Vos summarizes his sessions:

“In ‘Building Social Software on Top of Java EE 7 with DaliCore,’ I’ll show how you can integrate social software functionality into Java EE 7 applications. Many enterprise applications can benefit from some kinds of integration with e.g., Facebook, LinkedIn, Twitter, etc., without jeopardizing the user’s privacy and without giving up ownership of the data. The DaliCore framework adds the concept of User and OnlineAccount to the Java EE world, and provides the coupling with existing social networks. This saves lots of project-specific boilerplate code. This approach works both in web-applications as well as in desktop applications.

In ‘DataFX: The Best Way to Get Real-World Data into Your JavaFX Application,’ Hendrik Ebbers and I will present DataFX 2, a framework that helps JavaFX developers to populate JavaFX controls with real-world data. Now that JavaFX is beyond the stage of demos and POCs, it becomes important that the fake data used in demos be replaced with real data, often coming from back-end servers and databases. Apart from the regular cases where a JDBC source or a RESTful web service is queried, we will also show how changes in the local data can be propagated to the backend again...”

In discussing his efforts to combine Java EE and JavaFX, Vos remarks: “I am convinced that these two technologies are complementary, and while they are completely decoupled, the combination of them can lead to great end-to-end projects. As a POC, and in order to get more realistic use cases that could benefit both DaliCore and DataFX, I started to write a JavaFX application that offers community functionality. The front-end of that application is written in JavaFX, and the back-end is using DaliCore on top of Java EE 7. In this application, lots of data is sent from and to the back-end.”

In addition, Vos discusses his experiences with Java EE 7 and Java SE 8, the revolution that lambda expressions bring to Java, the client aspect of Java, how JavaFX fits into Java SE 8, and much more.

Check out the interview here.

Monday Apr 29, 2013

JSR 356, Java API for WebSocket

A new article, now up on otn/java, by Java Champion Johan Vos, titled “JSR 356, Java API for WebSocket,” shows developers how to integrate WebSockets into their applications. JSR 356, part of the Java EE 7 platform, specifies the API that Java developers can use when they want to integrate WebSockets into their applications on both on the Java server and client side. The API is highly flexible, and frees developers to write WebSocket-based applications independent of the underlying WebSocket implementation, thus preventing vendor lock in. It also allows for more choice in libraries and application servers. Web clients or native clients leveraging any WebSocket implementation can more easily communicate with a Java back end.

As part of the Java EE 7 standard, all Java EE 7-compliant application servers will have an implementation of the WebSocket protocol that adheres to JSR 356. Vos explains:

“Once they are established, WebSocket client and server peers are symmetrical. The difference between a client API and a server API is, therefore, minimal. JSR 356 defines a Java client API as well, which is a subset of the full API required in Java EE 7….

The Java API for WebSocket is very powerful, because it allows any Java object to be sent or received as a WebSocket message.

Basically, there are three different types of messages:

* Text-based messages
* Binary messages
* Pong messages, which are about the WebSocket connection itself

When using the interface-driven model, each session can register at most one MessageHandler for each of these three different types of messages.

When using the annotation-driven model, for each different type of message, one @onMessage annotated method is allowed. The allowed parameters for specifying the message content in the annotated methods are dependent on the type of the message.”

Check out the article here and learn how to integrate WebSockets into your applications.


Insider News from the Java Team at Oracle!

javeone logo


« April 2014