Search
The JBoss Way

Get on The JBoss Way

Are you a library or framework maintainer, and want to get your project included in the JBoss Way? Then read this guide.
 

About the JBoss Way

The JBoss Way focuses on making sure developers are as productive as possible and enabling them to do great things. It's a development approach that provides developers a more productive and simple way to develop modern applications. The JBoss Way introduces a new set frameworks, tools and architectural designs.  While JBoss is introducing new technologies, rest assured that you can reuse existing investments and integrate them while building modern applications that can leverage cloud and mobile capabilities.

What differentiates The JBoss Way from other initiatives is its enablement aspect. Besides technology, The JBoss Way provides a series of tutorials, quick-starts, maven archetypes, screencasts and reference architectures that allow developers to quickly generate modern applications.

The Solution

The foundations of The JBoss Way are the technologies provided within JBoss Developer Studio 6 and JBoss Enterprise Application 6 - Java EE 6, Arquillian, SnowDrop, AeroGear, Errai, RichFaces, JBoss Forge, TorqueBox, and OpenShift. The approach combines the technologies in a manner that allows you to be more effective in building applications. The JBoss Way directly addresses the challenges in the adoption and integration of new technologies by providing a path and recommended usage of many of the technologies.


Java EE 6

Contexts and Dependency Injection

Contexts and Dependency Injection is the cornerstone of building modern applications The JBoss Way. CDI services are a core aspect of the community-driven Java EE specification and enjoy include full support for Java EE modularity and the Java EE component architecture. But the specification still leaves room for embracing many needs of developers day to day.

 The JSR-299 specification for Contexts and Dependency Injection (CDI) defines a set of services that help improve the structure of application code. CDI layers an enhanced lifecycle and interaction model over existing Java component types, including managed beans and Enterprise Java Beans. The CDI services provide: an improved lifecycle for stateful objects, bound to well-defined contexts, a typesafe approach to dependency injection, object interaction via an eventing facility, a better approach to binding interceptors to objects, along with a new kind of interceptor, called a “decorator”, that is more appropriate for use in solving business problems, and an SPI for developing portable extensions to the container. 

An object bound to a lifecycle context is called a bean. CDI includes built-in support for several different kinds of beans, including Plain Old Java Objects (POJOs) and Java EE component types such managed beans, and EJB session beans.

CDI not only provides flexibility in defining a bean but also where it is used.  Beans may be injected into any of Java EE 6 service without setup.  Components such as: message-driven beans, interceptors, servlets, servlet filters and servlet event listeners, JAX-WS service endpoints and handlers, and JSP tag handlers and tag library event listeners all may inject other beans.  Beans may also be injected into any POJO running within the CDI container. 

CDI reduces the time required to use an unfamiliar API by eliminating the need to answer the following questions:

  • What is the lifecycle of this object?
  • How many simultaneous clients can it have?
  • Is it multithreaded?
  • How do I get access to it from a client?
  • Do I need to explicitly destroy it?
  • Where should I keep the reference to it when I'm not currently using it?
  • How can I define an alternative implementation, so that the implementation can vary at deployment time?
  • How should I go about sharing this object between other objects?

CDI is more than a framework. It's a whole, rich programming model. The theme of CDI is loose-coupling with strong typing.  A bean specifies only the type and semantics of other beans it depends upon. It need not be aware of the actual lifecycle, concrete implementation, threading model or other clients of any bean it interacts with. Even better, the concrete implementation, lifecycle and threading model of a bean may vary according to the deployment scenario, without affecting any client. This loose-coupling makes your code easier to maintain.

Events, interceptors and decorators enhance the loose-coupling inherent in this model:  event notifications decouple event producers from event consumers, interceptors decouple technical concerns from business logic, and decorators allow business concerns to be compartmentalized.

Beyond the Spec

With JBoss EAP 6 you will enjoy all of the benefits Java EE 6 has to offer along with many additional innovations provided as part of The JBoss Way. JBoss has focused heavily on improving productivity by creating exceptional tooling such as JBoss Developer Studio 6, Arquillian and JBoss Forge. Developers will find multiple choices of view layers to accommodate the various needs of different user interfaces and device footprints including AeroGear, Errai and RichFaces. The JBoss Developer Framework guides developers through a series of tutorials, reference architectures and quick-starts to speed the adoption and competency with all aspects of developing modern applications.
 

 

Exceptional Tooling

JBoss Developer Studio 6

JBoss Developer Studio is an Integrated Development Environment (IDE) extending Eclipse to address needs of developing applications and services developed the JBoss Way. The release of JBoss Developer Studio 6 provides support for JBoss Enterprise Application Platform 6, the ability to deploy projects directly to Open Shift platform, mobile browser simulation and JBoss Central, a central hub of getting started with the various wizards, quickstarts/project examples, jboss.org news/blogs and a way to easily install additional plugins from JBoss and others.

CDI Tooling

JBoss Developer Studio provides excellent support for CDI including: project creation wizards, assignable beans dialogs, quick fix dialogs, searching for bean references, bean-scope validation, beans.xml editor and many more.

Maven Integration

JBoss Developer Studio provides functionality to make maven projects function seamlessly within eclipse. The integration allows developers to import maven projects with all the correct dependencies configured, the proper assembly and setup preserved and even enable the features of JBoss Developer Studio that are relevant based on the maven pom.xml file. 
If a project uses JPA, JSF and CDI the tooling related to this will be preconfigured for you - making it easy to get started and you can be sure your whole team can have the same setup within their IDE.

What makes the integration feature unique is the ability to leverage Eclipse’s WTP server tools based upon the assembly and dependencies configured within a maven pom.xml. Easily deploy applications without having to wait for maven to start. When using JBoss Developer Studio with a JBoss runtime, developers get fast and incremental hot-deployment which allows for rapid turnaround during development.  

Browser Simulation
Browser Simulator

 New to JBoss Developer Studio 6 is a browser simulator that mimics different mobile browsers.  This is a great time saver as mobile web developers can quickly check their application screens for adjustments before taking the longer steps of testing in emulators, or physical hardware.


To use the BrowserSim navigate to the index.html file, right click and choose "Open With --> BrowserSim".  A new window like the one below will popup loading your page.  The developer can then manipulate what browser to mimic different browsers using the "Devices" menu.

OpenShift Tooling

Deploying your applications is simple with JBoss Developer Studio. New and existing projects can be used when setting up an OpenShift Express Application - making it easier to go from local development and then later into the OpenShift PaaS. Also added support for managing OpenShift cartridges which allows you to easily add things like mysql, mysqladmin, mongoDB and Jenkins Continuous Integration Server to support to application.

Get Started Fast with JBoss Forge

Starting a new enterprise Java project frequently requires a very steep learning curve. There are many configuration files, framework integrations, gotchas and setup steps that can frustrate developers new to the technology and derail productivity. The primary focus of JBoss Forge is to automate and abstract the process of integrating many of the common technologies used while developing a java-based enterprise application.


JBoss Forge allows developers to get started quickly with the technologies of The JBoss Way.  By typing a simple command of “new-project”, a maven project file is created, dependencies are downloaded and many of the initial setup steps are completed without requiring the developer to manually configure them.  


JBoss Forge provides a centralized platform and experience to address the fragmentation of different open source projects and technologies.  Adding persistence to a project is now as simple as typing "setup persistence" and letting Forge guide the developer through the various choices and options. Adding new objects and classes to a project is also a trivial task with JBoss Forge. With JBoss Forge, developers can easily build full Java applications within minutes. All generated code from JBoss Forge is standards-based, 100% java and contains zero boilerplate code. JBoss Forge is a lightweight developer tool that makes it fast and easy to quickly generate prototypes.


Forge was built with extensions in mind. There are already several plugins available for extending Forge’s capabilities including: the generation of SOA services upon Switchyard, integration with JRebel, UI scaffolding, OpenShift and many more.

Make Testing Easier with Arquillian

Arquillian enables developers to test your business logic in a remote or embedded container. Alternatively, it can deploy an archive to the container so the test can interact as a remote client. Arquillian provides a simple test harness that abstracts away all container lifecycle and deployment from the test logic so developers can easily produce a broad range of integration tests for their enterprise Java applications.

Arquillian can either execute a test case inside the container, in which case the test class is deployed by Arquillian along with the code under test, or hold back the test class so it can act as a remote client to the deployed code. All the developer has to do is write the test logic. 

In short... Arquillian makes integration testing a quick, simple and easy.

To avoid introducing unnecessary complexity into the developer's build environment, Arquillian integrates transparently with familiar testing frameworks (e.g., JUnit 4, TestNG 5), allowing tests to be launched using existing IDE, Ant and Maven test plugins without any add-ons.

@RunWith(Arquillian.class) // (1)
public class GreeterTest {
    @Deployment // (2)
    public static JavaArchive createDeployment() {
        return ShrinkWrap.create(JavaArchive.class)
            .addClass(Greeter.class)
            .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
    }

    @Inject // (3)
    Greeter greeter;

    @Test // (4)
    public void should_create_greeting() {
        assertEquals("Hello, Earthling!", greeter.greet("Earthling"));
    }
}
	
Choice of Views Diagram

Choice of Views

The JBoss Way provides options to accommodate the needs of your applicaiton.  Interested in building mobile applications with HTML5, jQuery and Java EE 6? AeroGear not only does mobile but also provides strong support for getting ramped up quickly.  Prefer JSF?  RichFaces provides some of the best components around, including support for AJAX and mobile devices. JBoss Forge adds the benefits of rapidly scaffolding your JSF pages with just a few simple commands.  Want to try Google Web Toolkit (GWT)?  Errai has some truly astounding features such as seamlessly integrating with CDI and pushing events to the client. 

HTML5 by AeroGear

AeroGear facilitates the development of mobile applications of all kinds (mobile web, native, and hybrid) with JBoss & Java EE 6 via examples, tutorials, client libraries, rapid development extensions ( via JBoss Forge), and enhanced testing techniques with Arquillian.  This includes the latest application development methodologies including HTML5/JavaScript/REST. Combining maven archetypes, wizards within JBoss Developer Studio, quickstarts, and guides  AeroGear  makes it easy to access the benefits, and power JBoss has to offer, while fully embracing the polyglot nature to modern mobile applications.

Expand the the abilities of JSF 2 with RichFaces

The RichFaces framework is a rich component library for JavaServer Faces (JSF). The framework extends the JSF framework's Ajax capabilities with advanced features for enterprise web application development. RichFaces leverages several parts of the JSF 2 framework including lifecycle, validation, conversion facilities, and management of static and dynamic resources. The RichFaces framework includes components with built-in Ajax support and a customizable look-and-feel that can be incorporated into JSF applications. Boasting over one hundred components, RichFaces provides ready-made functionality for many of the typical use cases encountered while building a web application.


RichFaces also includes many other features to ease development. It expands a new specification to Java EE 6, JSR 303 Bean Validation, by extending validation rules to the view layer and performing client-side validation. RichFaces supports advanced queueing to match the high performance requirements of real world enterprise applications. The technology boasts push component upgrades including JavaMessaging Service (JMS) integrations, and various transport mechanisms based on browser support. Writing JSF2 applications using RichFaces makes developers more more productive and of course RichFaces enjoys broad cross-browser support.

Cloud

OpenShift is Red Hat's free Platform-as-a-Service (PaaS) that enables developers to quickly deploy applications to the cloud without having to worry about configuring and managing the stack.  OpenShift takes a No-Lock-In approach to PaaS by providing built-in support for Node.js, Ruby, Python, PHP, Perl, and Java. In addition OpenShift supports all the popular frameworks that make a developer's life easier including everything from Spring, to Rails, to Play. OpenShift is designed to allow Developers to work the way they want to work by giving them the languages, frameworks and tools they need for fast and easy application development.

Some of these tools that are highlighted often within the quickstarts and tutorials of The JBoss Way include Jenkins Continuous Integration, MySQL databases and Maven support.

Mobile

If there was ever a doubt that the explosive popularity of mobile was something developers need to pay close attention to this year, it should have been eliminated by smart phone makers last earnings call.  For instance, there were more iOS devices sold in 2011 than all Macintosh computers sold in the product line’s 28 year history.  Android grow rates are estimated to exceed 250%

 

Given statistics like these it goes without saying that developers will need to focus on mobile platforms or risk reducing their application’s market share. There’s great demand for mobile platforms, particularly iOS and Android. And while this market is huge right now, it’s only going to get bigger and more crowded, as mobile expands beyond smartphones and tablets to an even broader base of mobile devices with multiple platforms and form factors.

Luckily there have been many innovations within the industry to reduce the amount of extra work required to deal with a variety of devices. The trend toward rich Internet applications written in HTML5 and CSS3 will accelerate. Technologies such as AeroGear, Errai and RichFaces that produce various approaches to building mobile applications

Productivity Gains

Building a modern architecture, the JBoss Way, incorporates a host of technologies that increase developer productivity, simplify programming, and makes developers more productive - whether they be hosted in enterprise data centers or on the cloud or accessed from a desktop or a mobile device.
 

Travel along the JBoss Way…

Learn

Get Going

Get Involved