Java

Off the browser and onto the server

After those disappointing, unstable applets which crashed your browser or kept it hanging for minutes, the fuss about Java seemed to die down. Now it's back, but off the browser and onto the server, where its portability and network performance make it a prime choice for high-end web applications. Java's clean, object-oriented syntax motivates a team of programmers to write distinct and reusable code.

We use Java in a variety of guises. Aside from its use as a web scripting language in the form of JSP (see below) we often employ Java to write nifty little supporting plug-ins for our major applications. For example, many of our RationalMedia implementations use a Java scheduled task to republish batches of pages on the web sites. Java generally competes with Perl as our language of choice when it comes to writing non-web based applications or support plug-ins and now that ColdFusion (MX) is based on a Java platform we can also easily extend our favourite web-based scripting language to our heart's content!

Our latest Java useage is for searching. We are activly developing a number of Lucene powered solutions for indexing and spidering both RationalMedia implementions and collections of external sites. Java makes it very easy to build and extend applications in this area, by allowing the rapid coupling of suitable supporting libraries into your own code.

Java for the web however generally means Java Server Pages (JSP) these days. JSP is heralded as the emerging leader in web development technology for all of the reasons that Java is a good programming language, and because of the increasingly mature server-side tools. Like Cold Fusion, ASP, PHP etc. JSP is a language which bridges the gap between the HTML output on a web page and the database behind the website, allowing web content to be dynamically generated.

JSP is part of the J2EE (Java 2 Enterprise Edition) API - the official Java framework for enterprise application development. This framework also includes Servlets, Java XML support, Enterprise JavaBeans (EJB), Java messaging services and JavaMail.

Using JSP as your presentation layer language means that you can bring the full power of the Java language and all the J2EE APIs to bear on your web application, resulting in a highly scalable application where the business logic is neatly and cleanly separated from the display front end. This has great advantages for integration - after all the web is just one way to conduct business. Other front ends to the database should be able to re-use the same middle tier and data access components. This is all possible in the wonderful world of Java.

There are many Java Application Servers on the market including some freeware products - notably, Tomcat from Apache. Resin, a commercial product, is touted to be the fastest server. We also like JRun from Macromedia, which performs extremely well and has a well thought-out web-based management console.

The beauty of the Java programming language is its portability. The much quoted "write once, run anywhere" aphorism really does mean what it says. But beware, different servers implement slightly different application architechures so although interfaces like the Jrun management console, mentioned above, are fast and convenient it always pays to know what is going on "under the hood"!




Copyright © Torchbox Ltd, 2008
Torchbox