Friday Jun 07, 2013

New Messaging Features in JMS 2.0

Part Two of Nigel Deakin’s series on JMS 2.0 (Java Message Service), titled “What's New in JMS 2.0, Part Two—New Messaging Features,” is now up on otn/java. While Part One looked at new ease-of-use features introduced in JMS 2.0, Part Two explores five important new messaging features.

First, a new kind of topic subscription called a shared subscription now allows for multiple consumers on the same topic subscription.

Second, developers can now specify a delivery delay on a message so that the JMS provider will not deliver the message until after the specified delivery delay has elapsed

Third, with JMS 2.0, users can send a message asynchronously. As Deakin explains, “This feature is available for applications running in Java SE or the Java EE application client container. It is not available to applications that run in the Java EE Web or EJB container.” According to Deakin, “When a message is sent asynchronously, the send method sends the message to the server and then returns control to the application without waiting for a reply from the server. Instead of being blocked unproductively while the JMS client waits for a reply, the application can do something useful, such as sending a further message or performing some processing.”

Deakin explains that there are two main ways in which you might use an asynchronous send in an application:

* To allow the application to do something else (such as update the display or write to a database) during the interval when it would otherwise be waiting for a reply from the server

* To allow a large number of messages to be sent in succession without waiting for a reply from the server after each message

Fourth, JMS 2.0 allows applications that receive a message to determine how many times the message has been redelivered.

And finally, a Java EE application that needs to receive messages asynchronously does so using an MDB, or message-driven bean, which is configured by specifying a number of configuration properties. Check out the article here.

Friday Mar 15, 2013

Why, Where, and How JavaFX Makes Sense

A new article by Björn Müller, now up on otn/java, titled “Why, Where, and How JavaFX Makes Sense” incisively explores the intricacies of when, where, and how JavaFX is a good technology fit.

Müller writes:
 “Our experience proves that implementing an employee desktop front end with native technology is a valid approach and that JavaFX is a good fit.

* JavaFX is available on the leading desktop operating systems (Windows, Linux, and Mac OS X)
* Although it has gone through some painful changes, its evolution proves its vendor’s level of commitment.
* As the successor to Swing, it is being used by an increasing number of Java developers. Regardless of its future, it will benefit from a strong developer community.
* Compared to Swing, it provides a clear and clean architecture and features many enhancements: styling, event management, transitions, scene graph—to name a few.
* It provides the possibility of developing up-to-date user interfaces with animations, multitouch, and the like.
* It is based on a clear and clean language: Java.
* It provides all the professional Java tooling required to debug, analyze, profile, and log a client application.
* It enables a simple app-like installation on the client side, without any prerequisites.”

Müller provides a nuanced discussion of the kinds of architecture in which JavaFX should be embedded, its uses with JavaServer Faces, and reports on his own experiences using JavaFX.

Have a look at the article here.

Friday Feb 03, 2012

Building Applications in JavaFX 2.0

In a new tech article up on otn/java, adapted from a series of innovative blog postings, Downstream's Senior Java Architect Daniel Zwolenski develops ways to build apps in JavaFX 2.0 -- from Spring to controller injection to client servers. The article is derived from several blogs wherein he explores ways to create applications in JavaFX 2.0, building upon a direct port of Oracle Chief Client Java Architect Richard Bair’s FXML+Guice dependency injection example into Spring.

As Zwolenski says, “Many developers still believe that Spring is all about XML configuration files, but it has evolved a lot since the early days. I’m going to use Spring’s annotation-based configuration to create a pure Java example (i.e., zero Spring XML) that looks almost identical to the Guice one.”

Zwolenski is the creator of JFX Flow which he describes as, “a free, open source framework for developing rich, interactive and user friendly web-style GUIs for desktops using JavaFX (2.0+). JFX Flow combines the powerful feature set of JavaFX (styling, animations, FXML, etc.) with a simple ‘web flow’ style framework that is easy to use and that fosters clean architectural patterns, especially when developing Java EE applications. JFX Flow is currently in Alpha release and may still have some bugs. The core framework is usable however, and the API is quite stable.”

Read the complete article here.


Friday Nov 18, 2011

JavaFX 2.0 at Devoxx 2011

JavaFX had a big presence at Devoxx 2011 as witnessed by the number of sessions this year given by leading JavaFX movers and shakers.

  •     “JavaFX 2.0 -- A Java Developer's Guide” by Java Champions Stephen Chin and Peter Pilgrim
  •     “JavaFX 2.0 Hands On” by Jasper Potts and Richard Bair
  •     “Animation Bringing your User Interfaces to Life” by Michael Heinrichs and John Yoong (JavaFX development team)
  •     “Complete Guide to Writing Custom Bindings in JavaFX 2.0” by Michael Heinrichs (JavaFX development team)
  •     “Java Rich Clients with JavaFX 2.0” by Jasper Potts and Richard Bair
  •     “JavaFX Properties & Bindings for Experts” (and those who want to become experts) by Michael Heinrichs (JavaFX development team)
  •     “JavaFX Under the Hood” by Richard Bair
  •     “JavaFX Open Mic” with Jasper Potts and Richard Bair


With the release of JavaFX 2.0 and Oracle’s move towards an open development model with an open bug database already created, it’s a great time for developers to take the JavaFX plunge.


One Devoxx attendee, Mark Stephens, a developer at IDRsolutions blogged about a problem he was having setting up JavaFX on NetBeans to work on his Mac. He wrote:


“I’ve tried desperate measures (I even read and reread the instructions) but it did not help. Luckily, I am at Devoxx at the moment and there seem to be a lot of JavaFX gurus here (and it is running on all their Macs). So I asked them… It turns out that sometimes the software does not automatically pickup the settings like it should do if you give it the JavaFX SDK path. The solution is actually really simple (isn’t it always once you know). Enter these values manually and it will work.”


He simply entered certain values and his problem was solved. He thanked Java Champion Stephen Chin, “for a great talk at Devoxx and putting me out of my misery.”


JavaFX in Java Magazine

Over in the November/December 2011 issue of Java Magazine, Oracle’s Simon Ritter, well known for his creative Java inventions at JavaOne, has an article up titled “JavaFX and Swing Integration” in which he shows developers how to use the power of JavaFX to migrate Swing interfaces to JavaFX. The consensus among JavaFX experts is that JavaFX is the next step in the evolution of Java as a rich client platform.


In the same issue Java Champion and JavaFX maven James Weaver has an article, “Using Transitions for Animation in JavaFX 2.0”. In addition, Oracle’s Vice President of Java Client Development, Nandini Ramani, provides the keys to unlock the mysteries of JavaFX 2.0 in her Java Magazine interview.


Look for the JavaFX community to grow and flourish in coming years.

Tuesday Nov 01, 2011

What Is JavaFX?

Is JavaFX "reinvigorating the user interface on the desktop?"(1) Is it "more fun"(2) or "the best thing to happen to Java since SWT?"(3) Is it just a great tool to create animations and steampunk gear?(4)  Is it all or the above? None of the above? To get answers, here are opportunities for you to find out more about JavaFX.

EclipseCon Europe

Nov 2-4, Ludwigsburg, Germany
Included in the Java 7 Summit, Steve Northover (aka "the father of SWT") will present JavaFX Past, Present and Future and Interop with SWT and Swing. (We hear rumors of a new JavaFX feature being unveiled!)

Java Magazine
The Nov/Dec issue includes technical articles on how to migrate Swing interfaces to JavaFX, how to use transitions for automation in JavaFX, and an interview with Nandini Ramani, VP of Development at Oracle, about the key features of JavaFX 2.0. Subscribe for free.

Devoxx
Nov 14-18, Antwerp, Belgium
Included in the Java track are several sessions on JavaFX. (Devoxx is sold out, but if you can attend, don't despair. Sessions will be released on-demand on Parleys.com.)

So, if JavaFX is "a good RIA platform"(5) and "likely to make an impact,"(6), you'll know all about it.

-----------------------------------

(1) JavaOne 2011 Impressions
(2) JavaFX Sketch Pad: Custom Binding
(3) Top five cool things from Oracle OpenWorld/JavaOne
(4) JavaFX Animations, Steampunk Gear
(5) JavaOne's focus on the future
(6) Please Consider JavaFX 2.0 Support

Monday Oct 17, 2011

JavaFX 2.0 Arrives and is Open Sourced

JavafxAmong the big news at JavaOne 2011 was the release of JavaFX 2.0 and announcement of its open source status. As Oracle’s Chief Architect, Client Java Platform Richard Bair observed, “We think this is going to be a really big deal in the industry.” JavaFX 2.0, touted as the next step in the evolution of Java as a rich client platform, is designed to provide a modern Java environment that shortens development time and eases the deployment of data driven-business and enterprise client applications.

 

Its key features include:

 

• Java APIs for JavaFX

 

• FXML -- an XML-based markup language for defining user interfaces

 

• Seamless integration into Swing applications

 

• High-performance hardware accelerated graphics

 

• Embedding of web content into JavaFX

 

• High-performance media engine

 

• Improved UI controls library

 

JavaFX 2.0 enables developers to leverage their existing Java skills and tools to develop JavaFX applications. It offers a clean separation of application UI and logic and simplifies code maintenance while integrating Web content and media seamlessly in Java applications. Developers can more easily create scalable, graphics-rich applications without performance penalties, build sophisticated user interfaces, extend existing Swing applications, and deploy applications in the browser, as desktop, or Web Start applications.

 

Java APIs for JavaFX include:

 

• End-to-end Java development

 

• Java language features—generics, annotations, multi-threading

 

• Reduced static footprint of runtime and applications

 

• Fluent API design for UI construction

 

• Development in alternative languages (e.g., JRuby, Groovy) with JavaFX

 

• Leverage sophisticated Java IDEs, debuggers and profilers

 

• Java APIs preserve convenient JavaFX Script features (e.g., bind)

 

Other features to take note of in JavaFX 2.0:

 

FXML

 

• Scriptable, XML-based markup language for defining user interfaces

 

• Convenient alternative to developing UI programmatically in Java

 

• Easy to learn and intuitive for developers familiar with web technologies or other markup based UI technologies

 

• Powerful scripting feature allows embedding scripts within a FXML file. Any JVM scripting language can be used, including JavaScript, Groovy, and Clojure, among others

 

New Graphics Pipeline for Modern GPUs

 

• New hardware accelerated graphics pipeline (Prism)

 

• New windowing toolkit (Glass) for Prism

 

• Java2D software pipeline for unsupported graphics hardware

 

• High-level support for making rich graphics simple: Shadows, Blurs, Reflections, Effects, 2D and 3D transforms

 

 

Rich Set of UI Controls

 

• Over 50 components for form-based UI, including charts, layout and form controls

 

• CSS3+ skinning and layout of UI controls

 

• Advanced UI controls, including table, tree view, rich text editor

 

 

Web Component

 

• Embed Web content in JavaFX applications

 

• HTML and JavaScript rendering based on Webkit

 

• DOM access and manipulation from Java

 

 

Browser Plug-in Refreshed for JavaFX 2.0

 

• Loading of JavaFX applets based on Prism

 

• Preloader for JavaFX applets for improved user experience

 

 

Powerful Properties Model

 

• New collections ObservableList, Sequence and ObservableMap

 

• New design and implementation of bean properties

 

• Low level binding API for high performance, low footprint bindings

 

• High level binding API for simple usage

 

 

Improved Animation Engine

 

• Optimized implementation of transitions

 

• Complete overhaul of API to simplify usage and in preparation of optimized and more stable implementation

 

 

Approximately 50 JavaFX 2.0 sessions can be found at JavaOne given by leading JavaFX movers and shakers. JavaFX is the next step in the evolution of Java as a rich client platform. Congratulations to all involved!  


Getting Started with Embedded Java -- Sense, Control, Connect, Store, Sync

At JavaOne 2011, Terrence Barr, Senior Technologist, Mobile & Embedded, Oracle Germany, presided over a two-hour HOL (Hands-On-Lab) on Monday in which he taught developers how to build an embedded Java solution that senses and controls the environment, stores data, and connects to back-end databases for synchronization and further processing. The session offered considerable detail along with step-by-step exercises as participants learned how to create the embedded EnviroTracker system and application which tracks and processes environmental data. The application interfaces with a microcontroller to read sensor input (ambient light brightness), to control output (and LED), and then further processes the sensor data.

The lab focused on:
• The benefits of Java technology in the embedded space
• The components of embedded Java platforms
• Setting up an embedded Java platform
• Interfacing between the embedded Java platform, the microcontroller, and I/O
• Accessing and controlling I/O from Java
• Processing sensor data

Barr took developers through seven basic tasks or exercises:

1. Create the EnviroTracker
2. Install the OJEC (Oracle Java ME Embedded Client) on the Development Host
The Oracle Java Micro Edition Embedded Client (OJEC) implements the CDC Platform configuration.
3. Develop and Test Your First Embedded Java Application..
4. Install OJEC on the Target Platform and Run Your Java Application
5: Understand I/O and the Arduino Microcontroller
6: EnviroTracker V1: First Contact
7: EnviroTracker V2: Continuous Monitoring and Processing

By the end of a rigorous and demanding, but satisfying two hours, attendees had built a real-world embedded system and created the EnviroTracker Application to track environmental sensor data. They learned how to install and use embedded Java runtimes and tools, and how to interface with I/O devices and microcontrollers from Java applications.

The take home message: Creating sophisticated embedded Java systems and applications is easy due to the platform independence of the Java language and runtime, the scalability of pre-existing Java skills to embedded development, and the comprehensive support provided by mature and feature-rich developer tools.

For more info, go to Terrence Barr's blog.

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