- Avoiding Big Data Antipatterns
- Java SE 8 Certification
- RetroPi Handheld Java Gaming
- Tips and Tricks for Better Applications
- Java SE Webinar Replay
- 2016 JavaOne Registration Now Open
- New Java Champion Pratik Patel
- JavaFX Applications Across Devises
- New Release JDK 8u91 and JDK 8u92
- New Java Champion Axel Fontaine
Thursday Mar 03, 2016
Wednesday Sep 10, 2014
By Yolande Poirier-Oracle on Sep 10, 2014
In this new article, JavaServer Faces (JSF) spec lead Ed Burns explains two kinds of model view controller (MVC) as part of the JSF framework. The article's goal is to show the continued commitment to JSF evolution and to clarify the complementary usages of these two view technologies.
The two kinds of MVC in question are UI component oriented MVC and action oriented MVC. This article first goes over these two different styles of MVC, then explains the rationale for filing a separate JSR for MVC 1.0 and explains how this new specification will relate to the next version of JSF.
If you attend JavaOne, you find many JavaOne sessions about JSF
Friday Mar 15, 2013
By Janice J. Heiss on Mar 15, 2013
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.
“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.
Wednesday Jun 13, 2012
By Janice J. Heiss on Jun 13, 2012
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.
Thursday Apr 12, 2012
By Janice J. Heiss on Apr 12, 2012
A new article now up on otn/java by Deepak Vohra titled “JSF 2.0 for the Cloud, Part One,” shows how JavaServer Faces 2.0 provides features ideally suited for the virtualized computing resources of the cloud. The article focuses on @ManagedBean annotation, implicit navigation, and resource handling. Vohra illustrates how the container-based model found in Java EE 7, which allows portable applications to target single machines as well as large clusters, is well suited to the cloud architecture.
From the article--
“Cloud services might not have been a factor when JavaServer Faces 2.0 (JSF 2.0) was developed, but JSF 2.0 provides features ideally suited for the cloud, for example:
• The path-based resource handling in JSF 2.0 makes handling virtualized resources much easier and provides scalability with composite components.
• REST-style GET requests and bookmarkable URLs in JSF 2.0 support the cloud architecture. Representational State Transfer (REST) software architecture is based on transferring the representation of resources identified by URIs. A RESTful resource or service is made available as a URI path. Resources can be accessed in various formats, such as XML, HTML, plain text, PDF, JPEG, and JSON, among others. REST offers the advantages of being simple, lightweight, and fast.
• Ajax support in JSF 2.0 is integrable with Software as a Service (SaaS) by providing interactive browser-based Web applications.”
In Part Two of the series, Vohra will examine features such as Ajax support, view parameters, preemptive navigation, event handling, and bookmarkable URLs.
Have a look at the article here.
Friday Mar 30, 2012
By Janice J. Heiss on Mar 30, 2012
In a new article up on otn/java, Java EE expert David Heffelfinger continues his series exploring the relative strengths and weaknesses of Java EE and Spring. Here, he demonstrates how easy it is to develop the data layer of an application using Java EE, JPA, and the NetBeans IDE instead of the Spring Framework.
In the first two parts of the series, he generated a complete Java EE application by using JavaServer Faces (JSF) 2.0, Enterprise JavaBeans (EJB) 3.1, and Java Persistence API (JPA) 2.0 from Spring’s Pet Clinic MySQL schema, thus showing how easy it is to develop an application whose functionality equaled that of the Spring sample application.
In his new article, Heffelfinger tweaks the application to make it more user friendly.
From the article:
“The generated application displays primary keys on some of the pages, and these keys are surrogate primary keys—meaning that they have no business value and are used strictly as a unique identifier—so there is no reason why they should be visible to the user. In addition, we will modify some of the generated labels to make them more user-friendly.”
He concludes the article with a summary:
“The Java EE version of the application is not a straight port of the Spring version. For example, the Java EE version enables us to create, update, and delete veterinarians as well as veterinary specialties, whereas the Spring version of the application enables us only to view veterinarians and specialties. Additionally, the Spring version has a single page for managing/viewing owners, pets, and visits, whereas the Java EE version of the application has separate pages for each of these entities.
The other thing we should keep in mind is that we didn’t actually write a lot of the code and markup for the Java EE version of the application, because the bulk of it was generated by the NetBeans wizard.”
Have a look at the complete article here.
Tuesday Mar 13, 2012
By Janice J. Heiss on Mar 13, 2012
Oracle’s Geertjan Wielenga has a new article up on otn/java, titled “Key to the Java EE 6 Platform: NetBeans IDE 7.1,” in which he shows how the NetBeans IDE provides the tools, templates, and code generators to support Java EE 6 and its main specifications.
He initially observes that, “When you begin to grasp the breadth and ambition of the Java EE 6 Platform, which covers everything from the model (JPA and Bean Validation), to the controller (EJB and Servlets), to the view (JavaServer Faces), a simple entry point is difficult to find. Enter NetBeans IDE 7.1, which is Oracle’s IDE for the Java Platform, created by the same group of developers who created the Java EE 6 Platform. Here you find tools, templates, and code generators intended to be used in combination with the set of specifications that the Java EE 6 Platform encompasses.”
After offering a tour of the NetBeans IDE 7.1 tools that support Java EE 6, Wielenga ends on a cautionary note:
“While code generators and tools such as those described here are great to help you get your feet wet, a danger is that a lot of code is generated that you don't understand and that you therefore do not know how to debug and maintain. The good news is that far less code needs to be generated in Java EE 6 than before, making it far easier to understand and maintain.
Nevertheless, it is advisable to use tools of this kind intelligently. Start small, focusing on specific APIs. Get to know them via the generated code and then slowly extend the application as you become more familiar with the Java EE 6 Platform. Once you are comfortable with the spec, the tools aim to help you become more productive: combining the leanness of the Java EE 6 Platform with the tools in the IDE, you'll be rapidly creating the core of your application.”
Check out the article.
Friday Dec 16, 2011
By Janice J. Heiss on Dec 16, 2011
Part 1 began with a Java EE rewrite of Spring's Pet Clinic sample application and developed the persistence layer of the application using Java Persistence API (JPA) 2.0, using NetBeans to generate most of the persistence layer from an existing database schema. Heffelfinger analyzed the generated code, which employed advanced JPA features.
In part 2, he continues this process by developing Enterprise JavaBeans (EJB) 3.1 session beans that act as Data Access Objects (DAOs), as well as JavaServer Faces (JSF) 2.0 managed beans and pages. Readers get to see the generated code in action and are given a look under the hood to see what’s going on.
Heffelfinger concludes Part 2 with a look ahead to Part 3:
“In the next installment of this series, we will modify the generated code to make it a bit more user friendly and we will compare the Java EE and Spring versions of the Pet Clinic application.”
Read the complete article here.
Wednesday Nov 30, 2011
By Janice J. Heiss on Nov 30, 2011
As McGinn observes: “A view action operates like a button command (UICommand) component. By default, it is executed during the Invoke Application phase in response to an initial request. However, as you'll see, view actions can be invoked during any phase of the lifecycle and, optionally, during postback, making view actions well suited to performing preview checks.”
McGinn explains that the JavaServer Faces 2.2 view action feature offers several advantages over the previous method of performing evaluations before a page is rendered:
* View actions can be triggered early on, before a full component tree is built, resulting in a lighter weight call.
* View action timing can be controlled.
* View actions can be used in the same context as the GET request.
* View actions support both implicit and explicit navigation.
* View actions support both non-faces (initial) and faces (postback) requests.
Read the complete article here.
Wednesday Nov 02, 2011
By Janice J. Heiss on Nov 02, 2011
Heffelfinger observes that, “Every time I work on a Spring project, I start mumbling under my breath. I know I will have to go through long and convoluted XML files to determine what is going on with the project. I also know that my project will have approximately 10,000 dependencies and that the generated WAR file is going to be a monster.”
He contrasts this with Java EE, where most of the needed services are required by the application server, reducing the number of required dependencies, and typically Java EE provides configuration by exception, meaning there is little configuration necessary. When configuration is needed, it is usually done through annotations, which allows the developers to get the whole picture from the source code. Also, with Java EE, the advanced tooling from NetBeans is available.
Again, from the article itself:
“In this series of articles, we will rewrite the sample Pet Clinic application provided with Spring using Java EE. In this first article, I illustrate how we can quickly develop an application that has equivalent functionality to the Spring version by taking advantage of the excellent Java EE tooling provided by NetBeans. The Java EE version employs JavaServer Faces (JSF) for the user interface, Data Access Objects (DAOs) are implemented using Enterprise JavaBeans (EJB) 3.1 session beans, and data access is provided by Java Persistence API (JPA) 2.0.”
Read the article in full here.
Insider News from the Java Team at Oracle!