How I may help
LinkedIn Profile Email me!
Call me using Skype client on your machine


Reload this page Java Enterprise Development Stacks

Here is a bottom-up clarification of Java software development without the sales hype. I'm working on organizing this better. Let me know what you find helpful or missing.

 

Topics this page:

  • What Is It?
  • Who Cares?
  • Struts
  • JSF
  • Servlet Containers
  • Axis
  • Spring
  • Hibernate
  • SASH Tests
  • SASH Disto
  • Your comments???
  •  

    Site Map List all pages on this site 
    About this site About this site 
    Go to first topic Go to Bottom of this page


    Set screen Java Stacks

      Java has evolved considerably and continues to evolve rapidly.

      I've broken down the various technologies (and associated acronyms) into the concern

      Concern Library Replaces (Competes with) Emerging
      Layout ICEfaces (script.aculo.us effects) Adobe Flash/Flex/AIR jQuery
      User
      Interface
      Struts, JSF J2EE EJB; Shale; Struts Ti (Titanium) - a merging of classic Struts and Webwork1 & Struts OverDrive Struts2 (incorporating Webwork2), Tapestry, Webflow, Beehive Pageflows, J2EE5 JSF (Java Server Foundation ), JBoss Seam, Ruby on Rails
      Web
      Services
      Apache Axis Raw sockets, RMI-JRM, IIOP, CORBA, Apache SOAP Axis2 (WS-*), REST (XHR)
      SOA
      Backbone
      Spring Internal frameworks (business logic within JSPs), Old Javabeans, Sun EJB2 EJB3, ESBs
      Database
      Access
      Hibernate Apache Torque, Lisptorq (uses Lisp) -
      Build maven - Ant
      Repository CVS - -


    Go to Top of this page.
    Next topic this page

    Set screen The Purpose of Each Stack Layer


    Go to Top of this page.
    Next topic this page

    Set screen Java Application Server

      Server Portal JSF 1.2 JSF 2.0
      - Liferay ?
      - Apache JetSpeed ?
      Sun GlassFish ? ?
      JBoss AS JBoss Portal ?
      IBM WebSphere IBM WebSphere Portal ?
      Oracle AS ? ?
      Oracle BEA WebLogic Oracle BEA WebLogic Portal ?

      Add-ons include Terracotta for JVM clustering, Tangosol's Coherence Data Grid,

      JSF 1.2 is compatible with these.


    Go to Top of this page.
    Next topic this page

    Set screen Who Cares?

      Liferay Portal's architecture is based on the SASH stack:

      The AndroMDA system uses this architecture:


    Go to Top of this page.
    Previous topic this page
    Next topic this page

    Set screen JSF (Java Server Faces) History

      JSF was published in 2004 as JSF 1.1 (by the JSR-127 Expert Group operating under Sun/Oracle's Java Community Process (JCP). This first version of JSF introduced a stateful and event-driven architecture versus Struts' stateless action architecture.

      JSF 1.2 was published (by the JSR-252 expert group) in 2006 as part of J2EE 5. JSF 1.2 was added to provide an event model based on the classical request-response development model.

      It did not define a standard for implementing AJAX. So AJAX libraries are not interoperable on the same app with JSF 1.2.

      JSF 2.0 began work in May 2007 (by the JSR-314 Expert Group). It aims to improve the JSF model for faster development and easier integration with other important frontend technologies.

      Sun's Reference implementations of JSF ("Mojarra" jsf-api.jar and jsf-impl.jar) has these dependencies:

      Servlet JSF 1.1 JSF 1.2 JSF 2.0
      JVM 1.4 1.5/5.0 ?
      Servlet container 2.4 2.5 ?
      JSP 1.2 2.1 ?
      JSP Facelets - - x

    Resources

    JSF for nonbelievers: Clearing the FUD about JSF by Richard Hightower, CTO of ArcMind

    Ted Husted

    The JSF Central website

    The JSF FAQ website


    Go to Top of this page.
    Next topic this page

    Set screen Servlet Containers

      Java Servlets were defined by Sun as programs written in Java that reside on a Web server and respond to user requests (much like CGI programs used to do).

      Servlet containers take care of parsing HTTP requests, managing sessions, and compiling JavaServer Pages (JSPs).

      Servlet JSF 1.1 JSF 1.2 JSF 2.0
      Apache Tomcat 5.5 6.0
      Jetty 5 6
      Resin 3.0 3.1
      Microsoft IIS - -

    • JavaServer Pages (JSPs) generate Web pages with both static and dynamic content.
    • JavaBeans Components that follow specific rules, such as naming conventions.


    Go to Top of this page.
    Next topic this page

    Set screen MVC (Model - View - Controller)

      Struts and JSF both structure components of a Web application into a unified whole based on a robust MVC (Model View Controller) design pattern:

      • Model represents UI data and handles interaction with databases.
      • View defines the UI with page presentation based on markup code in a Page Description Language (PDL).
      • Controller handles UI navigation between views.

      Its "separation of concerns" modularization makes it particularly useful so that a large team of web designers, system analysts, system engineers, database engineers can work in parallel.


    Go to Top of this page.
    Next topic this page

    Set screen Struts Action Framework

      Business logic code implementing the functionality or rules for specific applications are done by a custom subclass of class org.apache.struts.action.Action. Apache Struts

      Struts is called "action based" because, being built on Sun's servlet API, a Struts form is intercepted in the server by a single instance (the "master" ActionServlet) that delegates actual work to subclasses of ActionForm and Action.

      Craig McClanahan at Sun created Struts as part of a project to internationalize an application. Struts also hasten development of Web applications' user input validation, error handling, reporting, and flow control. ActionServlet helper classes automatically take care of behind-the-scenes activities such as initializing Struts extensions (plug-ins), reading configuration data, and pooling Action subclasses (for efficiency).

      Craig went on to lead the development of Sun's JSF (Java Server Faces).

      Apache Struts websites:


    Internet Browsers (Internet Explorer, Firefox, etc.) Tiles JSTL Struts Taglibs Java Server Pages Struts Action Form Struts Action of MVC (Model View Controller) design pattern of MVC (Model View Controller) design pattern of MVC (Model View Controller) design pattern JSP Servlet Container The SASH stack for the Oness app


    Go to Top of this page.
    Next topic this page

    Set screen JSF Extendability


    Go to Top of this page.
    Next topic this page

    Set screen .xhtml File View Handlers

      In a race to enable thin browser clients to be as highly interactive as fat Java client apps built using Swing, the "View" portion of this architecture has undergone very rapid series of improvements.

      Instead of Struts, many have gone to JSF (Java Server Faces), then to Facelets.

      The availability of anlternative JSF view handler to JSP (the default JSF view-handler) enabled Jacob Hookom (an independent software developer living in Eden Prairie, MN) to create Facelets after he was inspired by the June 2004 article "Improving JSF by Dumping JSP" by Hans Bergsten.

      The Jasper JSP parser reads XML-style JavaServer Page (.jspx) markup. But Faclets uses the SAX XML parser to read XML compliant HTML (.xhtml) markup. So compiling Faclets can be 30% faster than JSP pages.

      Facelets is the premier view-handler in JSF 2.0. Facelets tag library components provide powerful templating and composite component features:

      • <ui:include src="bean.field" /> can reduce the memory overhead of large component trees.
      • <ui:composition />
      • <ui:define />
      • <ui:decorate />
      • <ui:repeat />

      Each xhtml file is called a view.

      Since Faclets replace JSP, an IDE can be tricked into supporting Facelets by using .jspx file extensions with <jsp:root jsfc=“f:view”>.



    Go to Top of this page.
    Next topic this page

    Set screen UI Component Suite Libraries

      tool JSF is the base for $799/year commercial tool Exadel's Visual (web) Component Platform Eclipsed-based Exadel Studio to enable developers to add AJAX capabilities without writing Javascript code. Its pre-built, customizable plugable RichFaces code defines user interfaces through one of 14 "skins" that define themed UI schemes (colors, fonts, corner sharpness, and 3D effects).

      Facelets JSF-oriented view technology is used to build a screen.

      Render Kits enable components to render themselves according to multiple client devices. Like GWT, ICEfaces uses browser-specific renderers to circumvent cross-browser JavaScript problems.

      ICEfaces Resources

      tool ICEfaces offers an Enterprise Edition render kit to make use of AJAX. It was first available 2005.

      Enhancements to the JSF-RI (Reference Implementation) components to build UI include Apache MyFaces Tomahawk Extensions

      Apache MyFaces, at 1.1.3 with Shale, is dependent on the cactus 13-1.7.1 jar, junit 3.8.1 jar, and org.apache.struts.shale 1.0.2 jar test framework.

      To avoid full page refreshes, Ajax4JSF is used to render and replace individual components in the single screen that JSF manages as a tree of components.

      This competes with JBoss RichFaces 3.3.

      These typically support open-source Eclipse SDK IDE, (Galileo). as well as MyEclipse, NetBeans. Support for IntelliJ, IDE Eclipse 3.2 (Ganymede) plug-ins for NetBeans,


    Go to Top of this page.
    Next topic this page

    Set screen JSF Lifecycle Phases and Phase Listeners

      The JSF framework follows a lifecycle that executes in distinct phases:

      1. In the (create or) RESTORE_VIEW phase, incoming facelet PDL is parsed, and the component tree is built or (if a POST) restored in the current FacesContext. GET requests get sent directly to RENDER_RESPONSE.
      2. APPLY_REQUEST_VALUES phase
      3. PROCESS_VALIDATIONS phase sends erroneous requets to RENDER_RESPONSE.
      4. UPDATE_MODEL_VALUES phase
      5. INVOKE_APPLICATION phase
      6. RENDER_RESPONSE phase if

      What happens in each phase can be controlled programmatically by implementing the
      javax.faces.application.PhaseListener interface and setting
      javax.faces.event.PhaseId to which phase to listen for.

      The implementing class needs to be registered in the facesconfig.xml, such as:

      <lifecycle>
      	<phase-listener>
      		training.jobApplication.lifecycle.LoggingPhaseListener
      	</phase-listener>
      </lifecycle>
      


    Go to Top of this page.
    Next topic this page

    Set screen Navigation Handlers and Scopes

      Until JSF 2.0, there was no standards for a scope which is longer than a request scope but shorter than a session. So several projects have emerged to provide it:

      JSF Navigation Handler Scope
      Spring Web Flows Web Flows
      JBoss Seam Conversation Scope
      Apache Shale Dialog Manager
      Apache MyFaces Orchestra Conversation Scope


    Go to Top of this page.
    Next topic this page

    Set screen EL (Expression Language)

      Struts and JSF build on the JSP Standard Tag Library Expression Language (JSTL EL).

      The following traces what happens internally to bind the View to the Model.

      JSF

      1. The "calculator.jsp" URL (at a web host) typed into a client internet browser arrives at a web server (through DNS).
      2. The FacesServlet controller web server listener recongizes the jsp and restores the view from the component tree retrieved.
      3. Apply request values; process events Process validations; process events Update model values; process events Invoke application; process events Render response
      4. The sample "calculator.jsp" form contains markup of parent-child hierarchy of tags.

        <f:view 
          <h:form id="calcForm"><table><tr>
             <h:panelGrid columns="3" 
        	rendered="#{mybean.value ne empty and mybean.rendered}">
                <h:outputText for="firstNumber" value="First Number" />
                <h:inputText   id="firstNumber" value="#{CalcBean.firstNumber}" 
        		required="true" />
                <h:message    for="firstNumber" />
             </h:panelGrid>
             </tr><table>
          <h:commandButton value="Submit Application" />
          </h:form>
        </f:view>
        

        When the view is parsed by the JSF framework's view-handler, all JSF component tags are translated to Java class instances living in a component tree on the server.

        Among the full list of components defined in CoreJSF.com:

        The <f:view> announces a container managed by JSF. This tag represents an instance of component javax.faces.component.UIViewRoot under abstract class javax.faces.component.UIComponent from which trickle down all JSF processing calls. In a standard JSF web application, Facelets is provided in the
        "jsf-facelets.jar" file. However, ICEfaces ships with file
        "icefaces-facelets.jar" which fixes a few bugs that interfere with the integration of ICEfaces and Facelets.

        The <h:form> tells JSF to provide a form there.

        The <h:panelGrid> tells JSF to provide put a 3-column table in that form.

        A <ice:panelGroup> renders into <div> tags in HTML returned to the client browser.

        The <h:inputText tells JSF to provide an input text entry box in that form, with a value from "calcBean".

        These <f: and <h: tags are prefixes to the tag library. Although EL libraries are defined at the top of the "calculator.jsp" file, as such:

          <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
          <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
          

        When using ICEfaces, namespecs are instead specied in this tag:

          <f:view 	xmlns:f="http://java.sun.com/jsf/core" 
          		xmlns:h="http://java.sun.com/jsf/html" 
          

        When using ICEfaces, also specify the namespec used by <ice: tags:

          	xmlns:ice="http://www.icesoft.com/icefaces/component"
          

        <ice: tags replace <h: tags.

        The CSS file for ICEsoft to use can then be specified:

          <ice:outputStyle href="./xmlhttp/css/xp/xp.css" />
          

        The "xp" in the above references to the ICEfaces XP theme. Alternately, the Royale or Rime theme provided with the library can be specified.

        #{myBean.firstNumber} specifies a run-time (deferred) evaluation of the myBean.

        ${CalcBean.firstNumber} specifies a compile-time (immediate) evaluation of the CalcBean.

      5. The index.jsp page.
      6. the web.xml and faces-config.xml file, found under the example application's src/webapp/WEB-INF directory.
      7. the Faces Servlet, and Faces Servlet mapping in the web.xml file.
      8. the faces-config.xml file in the web.xml file.
      9. what beans get managed by JSF in the faces-config.xml file.
      10. navigation rules in the faces-config.xml file.
      11. View the model object Calculator.
      12. the CalculatorController to talk to the Calculator model.

      The JSF v1 (Model 1 architecture) supported static include tags such as <jsp:useBean>.

      Unlike the XML in Struts' tag library, JSF tag library (JTLB) is event-driven, much like the architecture of Apple's WebObjects and Microsoft's ASP.net.

      Under JSF 2.0 that Sun open sourced under their CDDL license, .tag files in the WEB-INF/tags folder which provides compile-time checking for required parameters as they are compiled into tag handlers.

      Model backing beans map between view and model.


    Go to Top of this page.
    Previous topic this page
    Next topic this page

    Set screen Composite Facelet Components

      A reusable library of Facelet components can be defined in a jar file.

      A facelets template.xhtml file is stored in an app's protected folder like
      web/WEB-INF/includes/templates. The client file (such as web/index.html) would reference the template with

      <ui:composition template="/WEB/WEBINF/facelets/template.xhtml"
      	xmlns:ui="http://java.sun.com/jsf/facelets">
      </ui:composition>
      <ui:param name="title" value="Applicant System" />
      <ui:define name="header">Header goes here</ui:define>
      <ui:define name="menu">Menu goes here</ui:define>
      <ui:define name="content">Content goes here</ui:define>
      <ui:define name="footer">Footer goes here</ui:define>
      


    Go to Top of this page.
    Next topic this page

    Set screen Axis

      According to the README, AXIS stands for "Apache eXtensible Interaction System".

      Apache Axis is an implementation of the SOAP ("Simple Object Access Protocol") defined by the W3C that generates WSDL published by SOAP service providers. SOAP is a XML-based lightweight transport protocol that uses WSDL to represent remote procedure calls and responses in a decentralized, distributed environment. The SOAP specification defines the envelope framework for describing what is in a message and how to process it, a set of encoding rules for expressing instances of application-defined datatypes, and a convention for representing JAX-RPC API remote procedure calls and responses.

      (supported by WSO2) is a tool for building applications that use Web services in an SOA.


    Go to Top of this page.
    Next topic this page

    Set screen Spring

      The Spring Framework was conceived by Rod Johnson in his book "J2EE without EJB" and supported by Interface 21.

      Unlike J2EE EJBs, Spring is lighter weight in that it makes use of POJO and a standard web container such as Apache Tomcat.

      Spring simplifies creation of server-side Java programs. Enforces decent software engineering practices and design patterns. Provide convenient wrappers for other technologies.


    Go to Top of this page.
    Previous topic this page
    Next topic this page

    Set screen Hibernate

      Hibernate Hibernate was originally written by Gavin King, who was hired by JBoss under RedHat.

      Is is now the time-tested leader among Open-Source ORM (object-relational mapping) layer java persistance solutions for writing Java programs that does �smart update" of databases. It creates CRUD+S SQL statements based on metadata, autogenerating Java classes (source code) which have mappings to database tables.

      Hibernate also simplifies parent-child persistence by doing �lazy" instantiation, (Semi) transparent data caching, and optimistic locking.


    Go to Top of this page.
    Next topic this page

    Set screen Establishing the Java Stack

      Here is the sequence our Java-based stack is created:

      1. Stand-up the servlet server OS and associated drivers. This can be Windows Server, RHEL4 (Red Hat Enterprise Linux v4) or other Unix.
      2. Install the Java Runtime Environment (Java 1.5) and define JAVA_HOME environment variable.
      3. Install the database management system (DBMS) such as a single-node (un-clustered) Oracle 10g.
      4. Install Apache Maven 2.0.4 (1 MB), becuase SourceLabs used it to publish the JAR as a Maven 2 repository.
      5. Install servlet server software.
      6. Install software libraries (ICEfaces).
      7. Conduct testing.
     


    Go to Top of this page.
    Next topic this page

    Set screen Public/Private Testing Suite

      Downloads directly from Apache and others need to include patches to overcome defects found by seven types of testing. Among SourceLabs' comprehensive "CERT7" Test methodology which SourceLabs says include a load test of more than 54 million transactions over a period for nine days.

      However, SourceLab provides a great starting point for internal testing because private hardware and setup procedures can be validated against public benchmarks. Glaring deviations from public benchmark results would reveal symptoms of misconfigurations rather than being relegated to "that's just the way it is".

      Test Type Public
      Hardware
      Private
      Hardware
      Public
      Apps
      Custom
      Apps
      Public
      Test Suite
      Modified
      Test Suite
      1. Public Benchmark x - x - x -
      2. Hardware Validation - x x - x -
      3. Library Validation - x X - - x
      4. Service Validation - x - x - x

      SASH also provides a great starting point for testing custom internal apps because a test suite can be adapted much quicker rather than creating one from scratch, especially considering all the updating necessary as the libraries constantly evolve over time.

      Potential Issues

      Memory Consumption Higher for ICEFaces?

      ICEsoft uses a technology called Direct-to-DOM which (for each session) defines a server-side Document Object Model (DOM) which mirrors the client's web browser's DOM so that changes inside a page (to the component tree) are done in the server-side DOM first. Client and server data are kept in sync through the AJAX bridge mechanism which updates the client-side DOM. Moreover, ICEFaces components have a longer lifecycle than standard JSF components. This is because ICEFaces extends the default request-response.


    Go to Top of this page.
    Previous topic this page
    Next topic this page

      Set screen SASH Tests

      Several applications to test the SASH stack (now obsolete) are available:

      • LightNtact [swik] for functional, integration, and stress testing of the SASH stack.
      • Grinder was used for load stress injection. JMeter was used for lightweight apps.

      • KCRUD [swik] a simple web application which performs basic CRUDS (Create, Read, Update, Delete and Search) transactions that exercise JSF (JavaServer Faces)/Shale, Tapestry, and Struts UI frameworks against a simple object model.
      • ONess, [ swik] a "complete" solution for the textile commerce industry. with open-source ERP, CRM, SRM, and inventory management modules. Developed by Carlos Sanchez from Spain, who is no longer maintaining the app, last updated Dec 2004. By default it uses the HSQL in-memory database.
      • SASHSafari [swik] a multi-module web application Sourcelabs adapated from Sun's "Adventure Builder" demo application to be implemented on top of the SASH stack and a J2EE servlet container to give a sense of how applications written for EJBs may be implementing using SASH instead. There are 4 major functional elements in SASH Safari: a consumer web site, an order processing controller, and bank credit card verification service, and an �activity supplier" for processing orders. As with most SASH applications, UI logic is built in Struts, business logic in Spring components, Hibernate is used for database communication and abstraction, and Axis is used for web services. Communication between Spring and Hibernate is accomplished using the Spring proxy based approach (rather than the Hibernate Template). Hibernate's second-level cache is used together with a custom cache implementation. Java2WSDL is used to create WSDL descriptions from Java classes, and in turn the WSDLs are used with Axis to implement web services end points.

      [swik] is where tests results and source code are available on the SWiK.NET Open Source community for comment and re-use.

      SourceLab's transaction-test framework are based on TPC-C schema that aims to simulate non-trivial real-world scenarios.

        To reduce the connection acquisition to the theoretical best case for connection pooling while still being able to tear down sessions and recreate them between each transaction, connection Pooling with Hibernate creates one connection per terminal, with terminals creating sessions using the SessionFactory.openSession(Connection connection) method.

      In competition to SourceLabs is SpikeSource, which focuses on the Linux OS.

      JAMon (Java Application Monitor)

      The "Trails" demo is based on Tapestry.

      The "AppFuse" demo uses Spring's HibernateTemplate that is not efficient.

     

     
    Go to Top of this page.
    Next topic this page

    Set screen SASHDisto

      The SASH-1.2.dist folder consists of folders docs, licenses, sampleapps/sash-starter, and sash-1.2-repo.

      The SASH sample apps follow a strictly layered architecture:

      • Web framework with Struts inheriting from Http adapters ( Forms ), Action handler proxies ( Actions )
      • Business Layer of Spring managed POJOs
      • ORM - data layer with Hibernate mappings;
      • External interface with Axis SOAP adapters;
      • Clustering and HTTPs


    Go to Top of this page.
    Next topic this page

    Portions ©Copyright 1996-2014 Wilson Mar. All rights reserved. | Privacy Policy |

    Related:

  • Active Server Pages
  • Perl
  • Application Development
  • Web Projects
  • Javascript Coding
  • --------
    Set screen


    Go to Top of this page.
    Previous topic this page
    Link to Performance Engineer RSS 2.0 XML feed Atom 1.0 XML feed feeds
    for Software Developers ...
      rob

    Send a message with your email client program

    Visitor comments are owned by the poster.
    All trademarks and copyrights on this page are owned by their respective owners.
    The rest ©Copyright 1996-2011 Wilson Mar. All rights reserved.
    | | | |