Friday, August 11, 2006

Concepts in J2EE development

Middleware: it exists to overcome the difference between different computing platforms, and exposes common set of services across platforms and provides a homogeneous computing environment in which distributed application can be built, such as JNDI, JDBC, JMS, JTA, JAF, JAXP and JAAS.

Open System: a system in which components can be implemented in different ways and executed in a variety of environments.

Development Methodology: it defines a process for building software, including the steps to be taken and roles to be played by project team members.
RUP: Rational Unified Process provides a detailed process for object-oriented development, defining a complicated web of processes, activities and tasks to be undertaken by team members in clearly defined roles. It's used for developing a complicated system over a longer timeframe. It might be too thick for J2EE.
EXtreme Programming (XP): it's a lightweight methodology for hackers. It goes from requirements gathering to coding test cases to coding functionality. The number of user stories implemented and the percentage of test cases running successfully at the moment are the measure of success. It's often not appropriate for large development projects. Once concer with XP is that it does not produce sufficient analysis and design documentattion, whcih can be essential in the ongoing maintenance of a system.

J2EE Development Tools:
(1) analysis and design tools: 2 of the most common choices are Rational Rose by Rational Software and Together Control Center by TogetherSoft Corporation.
(2) development tools: 3 of the most commercial IDEs used on J2EE projects are WebGain Studio (integrating best with BEA System's WebLogic development environment), Borland's JBuilder, and IBM's Visual Age (best suitable for WebSphere). If you are using an open source server like JBoss or Enhydra, the most important feature of an IDE may be its ability to integrate with the Ant build tool.
(3) build tools: the deployment of J2EE components involves compiling the components and their related classes, creating deployment descriptors, and packaging the components into JAR, WAR or EAR files. Build tools controls the whole deployment process.The most significant build tool is the Antbuild tool, part of the Aparche Software Foundation's Jakarta open source effort. One of the nicest things about Ant is its protability between operating systems.
(4) source code control tools: the Concurrent Versioning System (CVS) is an open source versioning system used widely throughout the industry.
(5) testing tools: testing can be categorized as unit/functional testing (testing individual components to ensure proper behavior), system testing (testing the functionality of the entire application, including the interactions between components and sub-systems), integration testing (involves testing functionality of the integration between your application and external systems), performance/load testing (used to determine the scalability and discover potential bottlenecks) and user acceptance testing (UAT, getting real users to try the system, examince its functionality, and report gaps between functionality delivered and original requirements). JUnit is a popular open source testing package for Java components, and it has also been extended to do more specific types of testing such as for automated Web testing, there is HTTPUnit, for server-side J2EE testing, there are JUnitEE and Apache's Cactusproject. Testing also involves the use of logging tools like Apache Log4j (logging is built within J2EE methods).
(6) problem tracking tools.

XML-Related Technologies:
(1) XML validation technologies: DTD and XML schema.
(2) XML parsing technologies: an XML parser makes data contained in an XML data structure available to the application that needs to use it. There are 2 distinct modes for XML parsing, event-based model, and document object model (DOM). The first mode is used by the Simple API for XML (SAX). A SAX-based parser reads in the XML data source and makes callbacks to its client application whenever it encounters a distinct section of the XML document, and it cannot look forward in the document during parsing. There are no predefined relationships between nodes in the document. While in the DOM model, the parser will read in an entire XML data source and construct a treelike representation of it in memory.
(3) XML translation technologies: XML translation means to convert and XML data set from one form to another in a generic manner, such as XSLT (eXtensible Stylesheet Language for Transformations). The most popular open source XSLT engine for Java is the Apache Software Foundation's Xalan project.
(4) messaging technologies: SOAP (Simple Object Access Protocol) is a messaging specification describing data encoding and packaging rules for XML-based communication. WSDL (Web Services Description Language) is used to describe web services. UDDI (Universal Description, Discovery and Integration) aims to enable the online registration and lookup of web services via a publicly available repository.
(5) data manipulation and retrieval technologies: XPath, XPointer, XInclude, XLink, XBase, and XQuery.
(6) data storage technologies: storing XML in a textual, unparsed format is inefficient, an alternative mechnism to storing text files is the Persistent Document Object Model (PDOM). PDOM implements the W3C DOM specification but stores the parsed XML document in binary format on the file system. Another alternative to static file system storage is the use of native-XML databases, such as Software AG's Tamino.

Java APIs for XML:
(1) JAXP (Java API for XML Parsing) provides implementation-neutral access to XML parsers and XSLT processors.
(2) JDOM (Java Document Object Model) provides a java-centric, object-oriented implementation of the DOM framework. The use of JDOM does not subvert the JAXP architecture, but builds upon it.
(3) JAXB (Java API for XML Binding) defines a two-way persistent mapping between XML structures and Java objects and enables you to work with XML documents as if they were Java objects. The JAXB development process requires the creation of a DTD and a binding schema- an XML document that defines the mapping between a Java object and its XML schema, which are fed into a schema compiler to generate Java source code. The compiled Java classes handle the details of the XML-Java conversion process. JAXB shows improved performance over SAX and DOM parsers because it's lightweighted and precompiled, but one tradeoff to consider is a loss of system flexibility since any change in your XML or object structures requires recompilation of JAXB classes.
(4) Long Term Java-Beans Persistence provides XML serialization for JavaBean components, which is similar to JAXB. It leverages the JavaBeans component contract instead of a bing schema to define the mapping from Java to XML. Since JavaBeans must define get and set methods for each of their publicly accessible properties, it was possible to develop XML-aware components that can serialize JavaBeans to XML without a binding schema.
(5) JAXM (Java API for XML Messaging) enables the use of SOAP messaging in Java applications, using resource factories in a manner similar to the Java Messaging Service (JMS). The 2 main components of the JAXM architecture are the JAXM Client and Provider. The client provides access to JAXM services from within the application. The provider is responsible for sending and receiving SOAP messages.
(6) JAX-RPC is an XML-RPC implementation API for Java, which is similar to JAXM. Using JAX-RPC, you can expose methods of the beans running in your EJB container to remote Java and non-Java clients.
(7) JAXR (Java API for XML Repositories) provides implementation-neutral access to XML repositories like ebXML and UDDI. It is expected to handle everythign from executing complex registry queries to submitting and updating your own data to a particular registry system.

Source: Kurt A. Gabrick, David, B. Weiss, J2EE and XML development.


Anonymous said...


This is a message for the webmaster/admin here at

May I use some of the information from your blog post right above if I give a link back to this website?


Anonymous said...

Hi there,

Thanks for sharing this link - but unfortunately it seems to be not working? Does anybody here at have a mirror or another source?


Anonymous said...

Hey - I am certainly happy to find this. great job!