After the Storm - Internet Technologies

 

Internet Technologies Overview

J2EE, Web Services, EJB - how does it all fit together? Especially in advertisements and "management summaries" technical terms appear in almost random order - as long as a technology or a product is "hot", marketing wants it mentioned at least three times.

This overview provides you with a roadmap that helps putting technologies and products into a context.

Web Applications

A web application is any application that uses a web browser as the front end (GUI, graphical user interface). This implies a couple of differences to conventional applications. While normal applications use a GUI toolkit to produce the GUI and receive user input, a web application produces HTML and receives user input via URL requests.

The principle always is the same: parameters and the URL is handed over to the handler for the URL. The HTML produced by the handler is returned to the browser.

The concrete implementation variies wildly:

  • CGI. When the web server receives an URL, a program (that can be written in any programming language) gets called with parameters and the specified URL. The HTML code produced by the program is returned. This is the oldest method of dynamic web content generation. Because CGI consumes a lot of resources and is slow, it is suitable only for small websites.
  • Servlet (by Sun). Written in Java, Servlets are similar to the CGI approach, but the implementation is more efficient. The web server hands over the URL request to the servlet container, which in turn calls the servlet (a Java class).
  • Java Server Pages (JSP, by Sun). JSP is built on Servlets, but the JSP container uses them "inside-out": instead of a Java servlet producing HTML code, a JSP page containes HTML code and special tags that frame Java code. This approach helps page authors not proficient in Java to concentrate on the layout while they can use Java from a top level view.
  • Active Server Pages (ASP, by Microsoft). ASP is a concept similar to JSP. Instead of Java code, a scripting language such as Visual Basic is embedded in the page.
  • PHP (Open Source) is similar to JSP and ASP, but comes with its own scripting language. The simplicity and power of PHP has made it very popular with small to medium scale web sites.

The technologies are quite basic since they only deal with single pages, not with pages that implement business processes. A business process typically has a number of steps to accomplish a goal. Depending on the current step and on user action and/or system state, the next page is determined. This creates a "page flow".

  • Struts is built with Servlets. A central configuration file defines states (pages), and, for each page, potential targets (next page). It is the responsability of the page controller to analyse user action and system state, and to determine the next target.

Often large parts of a page within a web application stay the same (ie, a banner, a navigation menu etc.).

  • Tiles is a mechanism to assemble pages from modules (tiles). A general layout can be defined from which individual pages inherit common traits such as a title bar. Specific pages can override defaults to fit specific needs.

For a long time building web GUIs was a tedious task because HTML offers only basic controls, and the state of a page (selected radio button or drop-down options, expanded tree nodes etc.) has to be kept by the application.

  • Java Server Faces (JSF, by Sun) maintains page state by remembering the state of each control on a specific page. JSF improves the tedious task of action encoding and handling, too: User actions such as selecting a drop down menu option trigger the request of a special URL with the control ID and action encoded. The JSF decodes this event and notifies the proper handler in the application.

Applets are a web application only in the widest sense. Essentially Applets are Java applications than run within the context of a browser. For security reasons access to the host computer and the network is limited (the "sandbox" principle). Otherwise an Applet is just a normal Java application, and does not share the typical implementation requirements of a web application (such as processing URLs and producing HTML).

J2EE Applications

A lot of terms get lumped together when J2EE is mentioned. J2EE is a collection of APIs that allows for the creation of distributed enterprise-grade systems. Period. J2EE supports, but is by no means limited to, web applications.

To summarize the most important capabilities of J2EE:

  • Distributed processing (EJB). Callers and callee don't need to reside on the same machine. This allows for location transparency, scaling, load balancing, and fail over safety.
  • Integration with other systems via
  • Web application support (JSP, JSF, Servlets)

There are a number of J2EE containers, and many of them come with a host of tools:

  • BEA WebLogic. WebLogic comes with a number of wizards that create Java code from graphical designs (such as business processes, page flows etc.). WebLogic is probably suited best for developing complex stand-alone web applications.
  • IBM WebSphere. WebSphere is a collection of dozens of developer tools, application servers, and adapters. WebSphere is probably suited best for integration with existing systems.
  • JBoss. JBoss is Open Source, enterprise-class, implementation of J2EE that comes without fancy tools. JBoss is suited best for projects which want to build on other Open Source tools.

Referred by:


© 1998-2005 Christian Treber, ct@ctreber.com. All rights reserved. The author takes no responsability for linked external pages, the content of which by no means reflect his own opinion, convictions etc.