BANGALORE, INDIA: Since its avatar as the platform of choice for the enterprises, Java Platform, Enterprise Edition has become the de facto industry-standard platform for building enterprise-class applications coded in the Java programming language. The new platform is now not only based on a stronger Java Platform, Standard Edition (Java SE), but also associated with APIs, libraries and system services that support the non-functional requirements such as scalability, accessibility, security, integrity, and other requirements of enterprise-class applications.
The new Enterprise Edition The requirements for the new Java EE 6 platform came essentially from the important goals set by the JCP. We will discuss three of the important goals that makes the new Java EE 6 a better platform for enterprise app development.
Enhanced technology stack:The new Java EE 6 platform introduces the concept of Profiles and Pruning. The concept of profiles entails configurations of the Java EE platform that are designed for specific "class of applications". A Profile, by definition, includes a subset of Java EE platform technologies, other related technologies that have gone through the JCP, but not essentially a part of the Java EE platform, or a combination of the two. In this edition, Java EE 6 introduces the first of these profiles, called the "Web Profile". As the name itself indicates, the Web Profile is a subset of the Java EE platform designed for web application development. The Web Profile thus includes only those technologies that are needed for most web applications, and does not include the enterprise technologies that applications typically don't need. Pruning is again a new concept in Java EE platform, and is applied to the technology part.
Enhanced extensibility:When newer technologies were available, the Java Platform accommodated them suitably, through the introduction of APIs, libraries and frameworks. However, this is not a very efficient way of accommodating newer technologies, as the platform gets bloated and results in management issues, and is not a scalable solution. The new Java EE 6 platform introduces "extensibility points" and more service provider interfaces. This allows application developers to "plug in the new technologies" (even frameworks for that matter) in a standard way. Once the new technology is plugged in, these technologies are available as the built-in facilities of the Java EE 6 platform.
In this edition, emphasis on extensibility has been placed on the web tier. As we are aware that web application developers often use home-grown or third-party frameworks for developing web applications, registering these frameworks is an important and complicated step in the earlier edition of the platform. The developers / deployers / implementers often require to add to or edit large and complex XML deployment descriptor files. The new Java EE 6 enables these frameworks to self-register, making it easy to incorporate and configure them in an application.
Ease of development:The new Java EE 6 brings in many usability improvements in many areas of the new platform. For example, we can now use annotations to define servlets and servlet filters. Also, Java EE 6 standardizes a set of annotations for dependency injection, making injectable classes much more portable across frameworks. Furthermore, Java EE application packaging requirements have been simplified. We now can also add an enterprise bean directly to a web archive (WAR) file.
In this work, we will primarily focus on the enhanced technology stack and delve into the details of some of the advanced aspects of the new Java EE 6 platform.
Enhanced technology stack The new Java EE 6 platform adds a few new technologies that render the platform even more powerful. Three of these are described in the subsequent sections. The new technologies are:
Java API for RESTful Web Services (JAX-RS): We are already aware that Representational State Transfer (REST) is an architectural style, and RESTful web services are web services built according to the REST architectural style. Enabling web services with the RESTful approach has emerged as a popular alternative to using SOAP-based web services technologies mainly due to the fact that REST's lightweight nature and the ability to transmit data directly over HTTP. An important concept in this REST style is the existence of resources, each of which can be associated with a global identifier such as URI. In particular, data and functionality are considered resources that can be identified and accessed through URIs. To manipulate these resources, components of the network, clients and servers, the REST technology allows us to communicate through a standardized interface such as HTTP and a small, fixed set of verbs such as GET, PUT, POST, and DELETE, and exchange representations of these resources. The new JAX-WS technology enables developers to build lightweight web services that conforms to the REST style of software architecture. JAX-RS furnishes a standardized API for building RESTful web services in Java EE environment. The API contributes a set of annotations and associated classes and interfaces. Applying the annotations to POJOs enables to expose web resources in a standard way. This approach makes it simple and quick to create RESTful web services in a Java environment. Java EE 6 includes the latest release of the technology, JAX-RS 1.1, which is a maintenance release that aligns JAX-RS with new features in Java EE 6.
Contexts and Dependency Injection for the Java EE Platform (CDI): CDI is a new technology in Java EE 6 environment that "supplies" a powerful "set of services" to Java EE components. These services allow Java EE components to be bound to lifecycle contexts, to be injected, and to interact in a loosely coupled manner by "firing" and "observing" events. Some of the Java EE components that significantly benefit from this are Session EJBs and JSF Managed beans. CDI, this way, unifies and simplifies the EJB and JSF programming models and allows enterprise beans to replace JSF managed beans in a JSF application. In this way CDI technology helps bridge the major gap between the "web tier" and the "business tier" of the Java EE platform.While in the business tier, EJB and JPA technologies provide a strong support for the transactional resources, database operations and persistance, the web tier technologies focus on the presentation aspects through JavaServer Pages (JSP) and JavaServer Faces (JSF) components and Frameworks. The services of CDI technology bring transactional support to the web tier making it easier for developers to rope in transactional support within the web tier.
Bean Validation The bean validation aspect in the new Java EE 6 platform makes validation aspect of the web application simpler and reduces the duplication, errors, and clutter that characterizes the way validation is often handled in enterprise applications. The beauty of the new bean validation framework is that the same set of validations can be shared by all layers of an application. The bean validation framework for validating Java classes has been written according to JavaBeans conventions. In fact, developers can use annotations to specify constraints on a JavaBean. A validator class then validates each constraint. The developer can specify which validator class to use for a given type of constraint.
Enhanced Web tier There has been significant enhancements in the web tier aspect of the new platform. The following are enhancements to the new web tier capabilities:
Get most out of your technology infrastructure investments with Dell
About CIOL | Media Kit | Site Map | Contact Us | Help | Write to us | Jobs@CyberMedia | Privacy Policy
Copyright © CyberMedia India Online Ltd. All rights reserved. Usage of content from web site is subject to Terms and Conditions.