Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Java EE 7 First Look

You're reading from   Java EE 7 First Look Discover the new features of Java EE 7 and learn to put them together to build a large-scale application

Arrow left icon
Product type Paperback
Published in Nov 2013
Publisher Packt
ISBN-13 9781849699235
Length 188 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Armel Fabrice NDJOBO Armel Fabrice NDJOBO
Author Profile Icon Armel Fabrice NDJOBO
Armel Fabrice NDJOBO
Arrow right icon
View More author details
Toc

The main goals of Java EE 7


Since May 2006, the Java EE platform has known remarkable evolution in terms of implementation. First, with Java EE 5, it greatly simplified the development of applications by allowing the transformation of a simple Java class (POJO class) into a business object through annotations or XML descriptions. Still in the line of simplification, Java EE 6 helps enrich annotations and introduces new concepts such as pruning, RESTful Web Services, CDI, EJB Lite, and configuration by exception and web profiles. This allows the platform to provide many easy-to-deploy and consume services. After the success of Java EE 6, the JCP (Java Community Process) envisaged turning the platform into a service by providing an infrastructure for cloud support. But, due to lack of significant progress in the concerned specifications, it revised its objectives. It is from the perspective of preparing the migration of the Java EE platform to the cloud that Java EE 7 focuses on productivity and HTML5 support. Having missed the big goal (that is, the migration to the cloud), it will reach its new goals through completion of Java EE 6 features and addition of some new specifications.

Productivity

Productivity in Java EE 7 has been improved upon in many ways. By simplifying some APIs such as JMS and JAX-RS, Java EE 7 platform significantly reduces boilerplate code. As you will notice in the chapters that follow, sending a JMS message can fit on one line and no longer requires the creation of several objects as was the case with JMS 1.1, where it was first necessary to create a Connection, Session, MessageProducer, and TextMessage.

Java EE 7 has integrated new APIs to better address the needs of enterprise applications relative to the processing of large amounts of data. We have, for example, the concurrency utilities, which allow the creation of managed threads within a container and give developers the ability to break down large processes into smaller units that can be computed concurrently. Similarly, there is a Java API for batch processing to manage bulk and long-running jobs.

Finally, Java EE 7 is enriched in annotations and has set a focus on configuration by exception. Whether it is for data source or batch processing, compatible Java EE 7 containers provide a number of default objects. It is even possible to produce complex applications with minor configuration.

In short, the new platform frees the developer from performing a number of tasks and the creation of several types of objects that are required for setting up an application.

HTML5 support

Some people might wonder why the support of HTML5 is so important. The answer is simple: HTML5 is the latest release of the HTML standard. More so, it offers new features that ease the building of more powerful and suitable web applications. For example, via the <audio> and <video> elements of HTML5, you can play, pause, and resume audio and video media content without the use of a third-party plugin such as Flash. Through the canvas element and WebGL library (a subset of OpenGL), you can easily integrate 2D and 3D graphics in your website. With regards to communication between the client and server, the perfect integration of WebSocket protocol in HTML5 allows us to build a web application with full-duplex P2P communication and get over some limitations of HTTP for real-time communication. Using this protocol, you will have no difficulty in realizing chat applications or other web applications that require real-time communication between the client and server, such as trading and e-commerce platforms. In terms of data exchange, the native support of JSON format in HTML5 simplifies processing of information and reduces the size of documents. Many other areas have been improved, but for now we will only mention these ones.

Given all these innovations, the support for HTML5 features was added in JSF (JavaServer Faces), a new API was added to Java EE 7 platform to build WebSocket-driven applications and another API to process JSON data format.

You have been reading a chapter from
Java EE 7 First Look
Published in: Nov 2013
Publisher: Packt
ISBN-13: 9781849699235
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image