JavaServer Pages (JSP), an extension of Sun Microsystems' Java Servlet technology
for creating Web applications, allows developers to embed Java code directly
into HTML Web pages. Aimed at speeding Web application development, JSP separates
the Web interface logic from the back-end content generation logic so that Web
designers and Web developers can work on the same Web page without getting in
each other's way.
JSP offers several significant advantages over the other technologies that
fuel dynamic applications:
-
It makes it easier for individual team members to focus on the parts of
Web pages that most concern them. Because JSP files look like HTML files
with extra tags, designers can easily modify page layout, graphics, colors
and so on without having any (or only very basic) knowledge about Java.
On the other hand, developers can easily test application flow and logic
by creating raw JSP files and leaving graphical design details for designers.
-
It makes the presentation and logic easier to understand. Clean JSP files
present the HTML with very few other tags, so it is easy to look at the
page and determine what the resulting page will look like. Moreover, JSP
frees the Java code from statements about how to produce HTML code so it
can focus entirely on the application logic. The increased code focus and
clarity allow for faster development.
-
It creates a relatively simple way to change the application's look and
feel (or even produce alternative sets of pages for different purposes)
without having to change the application's logic. For example, you could
produce one set of pages for WML browsers, a different set for regular HTML
browsers and yet another set that uses XML--all without touching the actual
logic implementing the application. In this scenario, the testing performed
on one version's application logic would carry over to the other versions,
reducing the number of bugs overall.
However, because JSP blends Java and HTML (or XML) to create a new paradigm,
it not only inherits the pitfalls of its borrowed languages but is also fraught
with new problems unique to the mixture. In this article, we'll provide a handful
of testing tips that should help you improve the reliability of your applications
that use JSP.
-1-