|
Java SASH (Struts Axis Spring Hibernate)Here is a bottom-up explanation of Java without the sales hype. I'm working on organizing this better. Let me know what you find helpful or missing. |
|
|
The SASH Stack"SASH" is an acronymn coined by SourceLab to describe a set of open-source Java Middleware software that enable POJO (Plain Old Java Objects) to use more light-weight and flexible objects for webapps: Apache Jakarta Struts, Apache Axis, Spring Framework, and Hibernate.
Add-ons include Terracotta for JVM clustering, Tangosol's Coherence Data Grid, http://acegisecurity.org/ Liferay Portal's architecture is based on the SASH stack: |
The AndroMDA system uses this architecture:
Struts/JSF1/JSF2
Struts structures the components of a Java-based Web application into a unified whole based on a robust MVC (Model View Controller) design pattern:
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. The "View" portion of this architecture has undergone very rapid series of improvements, from "Model 1" to "Model 2" to the component model of JSF (Java Server Faces), which many are adopting today instead of Struts. The race is to enable thin browser clients to be as highly interactive as fat Java client apps built using Swing. 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) spec first published in 2004. This first version of JSF introduced stateful and event-driven architecture versus Struts' stateless action architecture. JSF 1.2 is a part of J2EE 5. Servletz JSFStruts builds on the JSP Standard Tag Library Expression Language (JSTL EL). Tracing what happens internally:
The <f:view> announces a container managed by JSF.
These <f: and <h: tags are prefixes to the tag library, defined at the top of the "calculator.jsp" file: <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> Unlike a specification of where javascript libraries are located, these are not URLs to actual web pages at Sun.com, but ??? 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. 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). Enhancements to the JSF-RI (Reference Implementation) components to build UI include MyFaces Tomahawk Extensions 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. Facelets JSF-oriented view technology is used to build a screen. 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. Resources: JSF for nonbelievers: Clearing the FUD about JSF by Richard Hightower, CTO of ArcMind
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSPTags5.html#wp89664
|
AxisAccording 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. |
SpringSpring Framework.org simplifies creation of server-side Java programs. Enforces decent software engineering practices and design patterns. Provide convenient wrappers for other technologies. It was conceived by Rod Johnson in his book "J2EE without EJB" and supported by Interface 21. |
HibernateHibernate 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. |
The down sideUsing SourceLabs' pre-integrated libraries gives less "elbow room" for architects and developers to use less popular alternatives.
As of this writing, Sourcelabs does not support other databases (such as MySQL) nor the Solaris OS platform. Another concern is whether Sourcelabs will be able to integrate and test new releases quickly enough. Here is a time-line:
|
Establishing a SASH ServerDetails about SourceLab SASH environment are described below according to the sequence they are created:
|
Read their
SASH 2.0 Testing Overview.
|
SASH TestsSourceLabs wrote several applications to test the SASH stack available from http://www.sourcelabs.com/?page=download:
[swik] is where tests results and source code are available on the SWiK.NET Open Source community for comment and re-use. Sourcelabs ran stress using Grinder for load injection and JMeter for lightweight apps. SourceLab's transaction-test framework are based on TPC-C schema that aims to simulate non-trivial real-world scenarios.
http://swik.net/SASH/Background+on+SASH+(from+SourceLabs.com) In competition to SourceLabs is SpikeSource, which focuses on the Linux OS. http://jamonapi.sourceforge.net/ JAMon (Java Application Monitor) Apache Struts websites: |
SASHDisto
The SASH-1.2.dist folder consists of folders docs, licenses, sampleapps/sash-starter, and sash-1.2-repo. The "AppFuse" demo uses Spring's HibernateTemplate that is not efficient. The "Trails" demo is based on Tapestry. The SASH sample apps follow a strictly layered architecture: |
Related:
--------
|
| ||
|