Java Reference
In-Depth Information
or massive global behemoths. Developers of these types of systems are familiar with a
number of key technologies, including web services for back-end communication
between business tiers and web applications for user interaction via a browser.
If you're reasonably familiar with Java, you know that a plethora of tools and tech-
nologies are available to help you build such applications. In fact, there are so many
that it's impossible for us to cover all the possibilities in a single chapter. Instead, we'll
pick a few of the more popular Java toolkits and show you how OSG i can improve on
their design and usage. From here, you should be able to extend the general princi-
ples we cover to integrate OSG i with other toolkits of your choice.
To illustrate our points, we'll look at a number of simple examples before explain-
ing how you can extend an existing stock-watcher web application from the Google
Web Toolkit ( GWT ) tutorial to use OSG i. For the purposes of brevity, we'll focus on the
aspects of these technologies that directly relate to OSG i and skip over (or even
ignore) some of the more complex aspects of web development and distributed com-
puting in general. Our goal is to show you how OSG i can work in a web context, not
how to build and manage all aspects of web applications or services. Let's get started.
15.1
Creating web applications
We'll start our foray into web technologies by looking at web applications, before mov-
ing on to web services. Unless you've been living on the moon for the last decade, you
must've had some exposure to web applications, whether as a user or as a developer.
Web applications are a class of applications that present their user inter face in a stan-
dard web browser such as Internet Explorer, Firefox, or Safari. They range from con-
sumer shopping carts to online banking, from travel booking to social networking,
from games to employment to government—the list is pretty much endless.
In this section, we'll look at using OSG i with the following web-application
technologies:
Static content
Java Servlets
JavaServer Pages ( JSP )
Google Web Toolkit ( GWT )
Figure 15.1 provides a simple diagram of the components you'll build in this chapter.
What benefits can OSG i bring to web-application development to cause you to break
from the status quo? The major benefits are related to OSG i's different layers:
The module layer provides an improved physical and logical structure, so web
applications are easier to maintain and deploy.
The lifecycle layer enables managing web-application installation and activa-
tion, to control what is available and when.
The services layer supports a more loosely coupled application development
approach, making it easy to swap in different implementations or even move
those pieces to other machines to improve performance without changing a
single line of client code.
Search WWH ::




Custom Search