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.

Wednesday Nov 21, 2012

Get Started with JavaFX 2 and Scene Builder

Up on otn/java is a very useful article by Oracle Java/Middleware/Core Tech Engineer Mark Heckler, titled, “How to Get Started (FAST!) with JavaFX 2 and Scene Builder.”  Heckler, who has development experience in numerous environments, shows developers how to develop a JavaFX application using Scene Builder “in less time than it takes to drink a cup of coffee, while learning your way around in the process”.

He begins with a warning and a reassurance: “JavaFX is a new paradigm and can seem a bit imposing when you first take a look at it. But remember, JavaFX is easy and fun. Let's give it a try.”

Next, after showing readers how to download and install JDK/JavaFX and Scene Builder, he informs the reader that they will “create a simple JavaFX application, create and modify a window using Scene Builder, and successfully test it in under 15 minutes.”

Then readers download some NetBeans files:
EasyJavaFX.java contains the main application class. We won't do anything with this class for our example, as its primary purpose in life is to load the window definition code contained in the FXML file and then show the main stage/scene. You'll keep the JavaFX terms straight with ease if you relate them to the theater: a platform holds a stage, which contains scenes.

SampleController.java is our controller class that provides the ‘brains’ behind the graphical interface. If you open the SampleController, you'll see that it includes a property and a method tagged with @FXML. This tag enables the integration of the visual controls and elements you define using Scene Builder, which are stored in an FXML (FX Markup Language) file.

Sample.fxml is the definition file for our sample window. You can right-click and Edit the filename in the tree to view the underlying FXML -- and you may need to do that if you change filenames or properties by hand - or you can double-click on it to open it (visually) in Scene Builder.”

Then Scene Builder enters the picture and the task is soon done.

Check out the article here.

Tuesday Aug 14, 2012

Enterprise JavaFX Deployment with LightView: Part 3 now on otn/java

A new article by Java Champion Adam Bien, now up on otn/java, titled “Enterprise JavaFX Deployment with LightView: Part 3,” explores ways to use Maven 3 to build and deploy the LightView application in all available deployment modes. In addition, Bien shows how to sign and deploy LightView with a Java EE 6 application.

Bien explains the basics:

“LightView uses the HTTP (REST) protocol to communicate with the back-end server. For the realization of back-end communication, an external library—the Jersey client—is used. LightView connects with the back end (LightFish) at startup time, so it is not suitable to lazy-load the Jersey dependencies for optimization purposes. Furthermore, multiple JAR files are hard to handle for standalone applications; you have to set up the class path correctly and keep all the moving parts consistent. The most convenient way to deploy Java (and JavaFX) applications is simply by starting them with java -jar my-killer-app.jar and deploying a single file that contains all the dependencies.”

He shows how the class files are packaged with the javafxpackager, which is shipped with the JavaFX 2 SDK, using the exec-maven-plugin and explains the core tasks achieved by Maven and describes the what javafxpackager does behind the scenes. He then shows how the LightView application operates and interacts with LightFish.

Bien concludes by emphasizing that the richness of JavaFX lies in the fact that it is another Java library. “Because JavaFX is ‘just’ an additional Java library, all of the established build, test, and deployment infrastructure can be reused. You can develop JavaFX applications using any integrated development environment (IDE) you like. And best of all, you can use a single language in a project, from the Java EE back end to the JavaFX front end.”

Check out the article here.

Wednesday Jun 13, 2012

The Enterprise Side of JavaFX - Part One

A new article, now up on otn/java, by Java Champion Adam Bien, titled “The Enterprise Side of JavaFX,” shows developers how to use LightView to convert REST services into a bindable set of properties. The article, Part One of a three-part series, presents the enterprise and business side of JavaFX with minimal animations, effects, and transitions, and a focus on structuring the presentation logic and integration with back-end services.

Bien makes use of LightFish, LightView and much more:

“LightFish is an open source monitoring application that periodically fetches and persists snapshots from a “GlassFish Under Test” machine and makes them available in real time via a simplified REST API.

LightFish comes with a basic Web interface to manage the data-capturing interval that is implemented with JavaServer Faces 2. LightView is a JavaFX 2 real-time visualizer that integrates the Web UI directly and accesses the monitoring data via REST and long polling. It could be considered to be a ‘stress test dashboard.’”

Look for Part Two of the series, which will directly integrate the JavaServer Faces 2 UI with WebView.

Check out the article here.

About

Insider News from the Java Team at Oracle!

duke
javeone logo
Links


Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
2
5
6
7
12
13
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today