Friday Mar 30, 2012

Spring to Java EE, Part Three - new tech article on otn/java

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.

Wednesday Mar 28, 2012

Java Champion Jorge Vargas on Extreme Programming, Geolocalization, and Latin American Programmers

In a new interview, up on otn/java, titled “An Interview with Java Champion Jorge Vargas,” Jorge Vargas, a leading Mexican developer, discusses the process of introducing companies to Enterprise JavaBeans through the application of Extreme Programming. Among other things, he gives workshops about building code with agile techniques and creates a master project to build all apps based on Scrum, XP methods and Kanban. He focuses on building core components such as security, login, and menus. Vargas remarks, “This may sound easy, but it’s not—the process takes months and hundreds of hours, but it can be controlled, and with small iterations, we can translate customer requirements and problems of legacy systems to the new system.”

In regard to his work with geolocalization, he says: “We have launched a beta program of Yumbling, a geolocalization-based app, with mobile clients for BlackBerry, iPhone, Android, and Nokia, with a Web interface. The first challenge was to design a simple universal mechanism providing information to all clients and to minimize maintenance provision to them. I try not to generalize a lot—to avoid low performance or misunderstanding in processing data. We use the latest Java EE technology—during the last five years, I’ve taught people how to use Java EE efficiently.”

Check out the interview here.


Wednesday Feb 15, 2012

GlassFish Adds Agility to Java EE Deployment

A new article by Julien Ponge on the front page of otn/java, titled “Adding Some Agility to Java EE Application Deployment with GlassFish,” reports on four noteworthy features in GlassFish that increase agility to Java EE application deployment.

* Session data preservation across redeployments

* Servlet fragments

* Application-scoped resources

* Application versioning

The article relies on a running example called TaskEE, a simple task list application that functions as a deployable application in which tasks are stored in a volatile Web session. Ponge shows how to morph TaskEE into TaskEEPA in order to store tasks in a relational database rather than a Web session.

Directly from the article:
“Deploying and managing Java Platform, Enterprise Edition (Java EE) applications seems like a fairly established activity. Applications can be deployed, undeployed, and upgraded through a combination of deployment and undeployment. Applications use various types of resources, such as JDBC connection pools or Java Message Service (JMS) destinations. Such resources need to be created, configured, and administered using an application server means, such as configuration files, command-line tools, and graphical interfaces. While the tasks do not vary much from one Java EE application server to another, each one is free to provide a broader set of features that make the developer’s and the infrastructure team’s jobs more enjoyable.”

Read the complete article here.

Friday Dec 16, 2011

Spring to Java EE Migration, Part 2 (technical article)

In part two of a four-part article series on otn/java, “Spring to Java EE Migration, Part 2,” CTO and Java EE expert David Heffelfinger elaborates further on 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.

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 02, 2011

Spring to Java EE Migration

In a new article up on otn/java, the first of a series, titled “Spring to Java EE Migration, Part 1,” CTO and Java EE expert David Heffelfinger 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.

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.
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