AOP is a great way to cross-cut an application with caching functionality. Find out how to use it in conjunction with the Spring Framework and the open source Ehcache object cache library to give your application a clean and easy-to-understand caching solution.
Although the JSSE API may seem too simple to handle your application's complex security requirements, this API allows you to customize its implementation to suit your needs. Starting with this simple client/server secure application, explore JSSE's implicit behavior and customization possibilities.
Learn the basics of cookie management: receiving, processing, creating, and sendingplus how to implement the abstract CookieHandler class in J2SE Tiger and J2SE Mustang.
The UML for EJB specification finally allows you to map your application from UML to EJBs. Learn how to use the Poseidon for UML modeling tool to leverage this new specification's functionality.
The new java.util package contains two new interfaces of this package: java.util.NavigableSet and java.util.NavigableMap. Both have been introduced to ease your suffering when working
with SortedSet and SortedMap.
Java offers several solutions for storing objects in an ordered list: arrays, Lists, and Mapsto mention the best known. But which one is the best for your application? This article analyzes the performance benefits and drawbacks of each solution
with real-life, real-time examples.
Ever have a nice, useful piece of code, that you couldn't easily use in an existing application because of a mismatched interface? The Adapter design pattern helps you align interfaces so that code won't go to waste.
The JavaServer Pages Standard Tag Library (JSTL) provides core tags for common structural tasks such as iteration and conditional processing, XML tags for XML processing, internationalization tags for formatting, and SQL tags for database processing. Learn how to
use JSTL's SQL tags in a JSP app to retrieve data from a database and display it in a table.
Most RMI applications are based on permanent remote objects, which works fine if you need to familiarize yourself with the concept of RMI or if you're developing simple RMI architectures. But RMI's real power is demonstrated in large, ROA-based architectures. Part 2 of this series discusses ROA more advanced application fundamentals.
Tweaking list screens can be a time-consuming hassle. You probably use a homemade or open source framework to lighten the load. This article shows you how you can use AJAX to help you create quick, feature-rich list screens.
You need to instantiate certain objects from a pool of related objects, but you won't know which ones until runtime. Find out how the factory method design pattern can help you write this code.
While the ThreadLocal class has been around since the JDK 1.2, it's been overlooked because of its poor first imnplementaion. However, later releases have seen improvements, making this little known class worth a second look.
Most applications require data validation in some form or another. Did you know the Spring Framework offers excellent support for validation? Learn how to use Spring and AOP together to ensure consistent data validation on your applications.
Most RMI applications are based on permanent remote objects, which works fine if you need to familiarize yourself with the concept of RMI or if you're developing simple RMI architectures. But RMI's real power is demonstrated in large, ROA-based architectures. Part 1 of this series discusses ROA application fundamentals.
The increase in the use of dynamic embedded graphics in Java applications causes an unexpected glitch in Linux and Unix systems. Find out how to solve this problem using a lot of ingenuity and a little elbow grease.
Part 2 of this series shows you how to work with an existing Java protocol handler and how to create a new oneall using the server you created in Part 1.
Tightly coupling your Java objects can result in all sorts of headaches when you need extend your app. Find out how the Observer design pattern can help keep your classes ready to provide information to any new objects that may come along.
With Web 2.0 forcing Web developers to focus on the end-user experience and creating immersive environments, Processing is a welcome addition to the playing field of tools enabling images, animation, and sound. Find out why this open source language/environment is giving the Java 3D API a run for its money.
While few doubt the benefits SOA brings to the enterprise, many don't realize the many challenges it presents to developersat every stage of an application's evolution. Find out how these developers solved the problem of consistent application logging in an application built using SOA on the J2EE platform.
Business Intelligence and Reporting Tools (BIRT) is an Eclipse
plug-in reporting system for Web applications. It supports data
access from databases, XML documents, EJBs, Web services, JavaBeans,
and POJOs. Learn the ins and outs by generating a sample PDF
report from a sample database.
Using the Singleton pattern allows you to have a class distribute
the only instance of itself. This restricts instantiation of a
class to one, which can be useful when you require exactly one
object to coordinate actions across an application.
Business Intelligence and Reporting Tools (BIRT) is an Eclipse
plug-in reporting system for Web applications. It supports data
access from databases, XML documents, EJBs, Web services, JavaBeans,
and POJOs. Learn the ins and outs by generating a sample PDF
report from a sample database.
Most developers parse their XML documents with the DOM or SAX
APIs--one takes up too much memory, and the other uses the highly
inefficient push parsing model. Find out how JDK 6.0's pull
parsing-based Streaming API for XML is the most efficient method yet.
This authoritative guide to IntelliJ IDEA shows you how to use
this IDE's powerful development features to their fullest advantage.
This excerpt from Chapter putlines the basics with a simple
"Hello World" program.
Did you know you can mimic the way your browser handles MIME types
in your Java apps? Learn how by creating a Web client, server,
and a dedicated viewer for a new image type.
Despite their performance and time-saving benefits, many
developers don't take the time to include toString methods in
their code. But coding toString methods doesn't have to be an
ordeal! Find out how to make a generic toString method that
can be used for any class.
AJAX is one of the most important combinations of technologies
for Web developers to know these days. This excerpt contains
five AJAX hacks, dealing with request objects and XML data.
Rasters provide superior image control, allowing you to process
entire images or only pieces of them and full pixel color control.
Part II of this series explores how to create and convert rasters,
as well as how to apply Java 2D filters.
You've heard of JAXB, but have you heard of this open source
data binding framework? Find out how to use it to transform your
Java classes to XML and back to Java.
You've heard of JAXB, but have you heard of this open source
data binding framework? Find out how to use it to transform your
Java classes to XML and back to Java.
When you've got a team of developers working on an application,
standardization is crucial. This article offers several pieces
of advice to help improve development speed and the quality of
your applications.
Learn why Plain Old Java Objects, or POJOs, are new, simpler,
and faster ways to develop enterprise Java applications. This
excerpt from Chapter 1 explains why.
Apache Axis and the Spring Framework are becoming more and more
popular as developers look for easy ways to make applications in
decentralized, distributed environments exchange structured
information. Find out What happens when you combine the two.
Ever have a fairly simple application become so complex over
time that you found yourself dealing with class names like
"AdminstrativeAssistantAndBloodDriveCanvasser"? Find out how
proper use of the Decorator design pattern provides your apps
with a more complex model without overcomplicating your coding.
Rasters provide superior image control, allowing you to process
entire images or only pieces of them and full pixel color control.
Learn about the basics of rasters from a Java perspective in
Part I of this series.
Many developers use threads to run background apps in their Web
containers. But threads don't work in J2EE. Find out how ActiveMQ
uses JMS functionality to allow you run a background app without
requiring the Web client to wait for it finish.
Can your J2EE application sustain a large number of client
requests simultaneously? Or does it become sluggish, with painfully
slow response times? Learn about six simple steps you can take
to enhance your app's performance.
One of the most important keys to building successful applications
is to start with a solid technical foundation. Learn how to build
that foundation, as well as save yourself time and headaches, by
standardizing basic areas in application development.
Classes in OO systems can often become too complexeither they're
too big, or one class has been embedded with way too much business
logic. Learn how to use these metrics to determine whether or not
you need to refactor your classes and improve your software design.
Preparing a localized version of a Java desktop application is
supposed to be an easy and well-documented task, but that's not
always the case. Find out about the small problems involved that
typically fall under the radar of most tutorials.
It's a well-known fact that caching helps improve enterprise
applications' performance, but did you know it's useful for
solving a wide range of other problems? Learn how to build
sample software, run the code yourself, and think outside of
the box when it comes to using caching in your own applications.
This Java code generator helps reduce your development time by
automating the repetitive task of creating DAO objects and the
associated helper classes required for data persistence. Find out
how you can free yourself up to focus on business logic
implementation.
Every Web developer has had to implement a customer's file upload
functionality in a project at least once. This article explains
all the bottlenecks involved in this task and provides functional,
easy code you can use in your own projects.
Making the correct data classes in a DAO applicationor in any
applicationis by no means trivial. Find out how you can simplify
application development and maintenance with a well considered
and properly documented design.
Object-oriented programming has two main objectives: to build
highly cohesive classes and to maintain loose coupling between
those classes. Find out how to object-oriented metrics can help
you determine whether you've achieved these goals.
Now that speech applications need to be integrated with Web-based
applications, Java has become the language of choice in which to
build them. Benoy Jose explains the basics of how speech
applications work and how the Java Speech API can help you build
applications that inter-operate with each other and with all
Java-compatible platforms.
Adding logic to JSP pages can be a real hassle. The new JSP
Expression language simplifies this process by allowing you to
separate HTML and style code from your presentation code, adding
presentation logic.
The DAO design pattern can be used in Java main applications as
well as servlet applications, and it can be implemented using Apache
Struts. This article's focuses some of the more advanced situations
a developer faces when using DAOs, starting with transactions.
Unfortunately, it's not always obvious how best to use XML in a
Web applicationor whether you would use it at all. This article
answers both questions while showing you how to build a simple,
XML-oriented Web application.
Test-driven development turns traditional software development
processes around by promoting writing tests before writing the
functional code. Find out what test-driven development is all
about and how to effectively use it within a project.
Swing may be ubiquitous, but it can also be far too complex for
many simpler tasks. Luckily, there's a tool called Thinlet that
simplifies GUI development by defining GUIs in XML files. Part 2
of this series explores some of Thinlet's more advanced features
like menus, dialogs, tabbed panes, and trees.
Today's users demand animated images, interactive movies, high-quality
sound videos, and much more from their application experience.
Thankfully, the EMB specification proposes a simple, lightweight
media framework you can use to integrate rich media content into
your J2EE applications.
Swing may be ubiquitous, but it can also be far too complex for
many simpler tasks. Luckily, there's a tool called Thinlet that
simplifies GUI development by defining GUIs in XML files. Part 1
of this series takes you through Thinlet's features, demonstrating
why this is a very interesting and useful way to build a user interface.
JSP pages can be difficult to manage. They contain hundreds of
HTML tags and stylesheets and when business logic is added, they
become near-impossible to modify. Enhydra's application server
solves this problem with an XML/DOM tree-based structure that's
easy to manipulate and simple to maintain.
In this article, Keld will uncover the secrets of "Plug-in
Architecture," where parameterized classes are the plug-ins.
Learn how to define Interfaces for several important classes used
in an application, and give the actual class names in a parameter
file read by the application on start-up.
The first two parts of this series discussed the fundamental
characteristics of Service-oriented architecture (SOA). You learned
about the nature of SOA, its technology independence, and the concept
of invokable interfaces. Concluding this series, Part 3 deals with
Web services and examines how this technology fits in with
Service-oriented architecture.
Finally, there's an application server that provides PDF document-generation
support. This Java-based API can be used to simultaneously generate
PDF, rich text, and HTML documents.
This new Java API provides SMS and MMS functionality while
eliminating portability hassles. Find out how SAMS helps bring
mobile development one step closer to "write once, deploy anywhere."
In this article Keld will uncover the secrets of "Plug-in
Architecture," where parameterized classes are the plug-ins.
We'll define Interfaces for several important classes used in an
application, and then, we'll give the actual class names in a
parameter file read by the application on start-up.
Part 2 of our series focuses more on the technical aspects of
Service Oriented Architecture and we begin to put together a
framework for implementing Service Oriented Architecture.
This month Keld will give some advice on which tools to use for
a given task, and then go further into one of his absolute
favorites, JDOM. We'll look at some of the more advanced
features of JDOM, namely the use of XPath and XSLT with JDOM.
This month Samudra examines a couple of important object
oriented metrics and shows how they can be adopted at design and
development stages of a project.
Need a simple solution for reading and parsing your favorite XML
files? Well it's time to look at Digester from Jakarta Commons
which allows you to extract the parts of the XML document you
need, and puts few restrictions on the way you store your data
in your program.
In this continuing series, Samudra will develop an example
application and see how we can come up with Business Objects and
different strategies related to the same.
Officially the spring season might be over but spring still
seems to be lingering around and Benoy is spreading the word.
The Spring Framework proposes a new paradigm, a pluggable, non-
intrusive and robust framework.
This month Samudra covers the ground work of defining Business
Objects. We will compare EJB and POJO strategies for
implementing Business Objects, work out the business logic
implementation problems, provide guidelines for how to make
Business Objects available to the client applications and more.
Most Java programmers who have used the Java API reference are
familiar with the @deprecated within the comments of a Java
method. Some vendors and programmers have cleverly made use of
these comments to include information that could be used by
specific custom interpreters to do some routine tasks. Finally,
the annotation facility is being included into the J2SE 1.5
tiger release.
Data Access Object (DAO) are one of the more popular designs
patterns today and this month Keld explains how you can use DAOs
effectively in your Struts designs.
In this article, we will examine the graphics capability of the
FOP solution and see how to use images with FOP from a local
file resource and also from a non-file resource.
Unweaving a Tangled Web With HTMLParser and Lucene
Ever wanted to write a Java program that crawls the web, reads
HTML-pages, retrieves the links, and gets the new pages with
more links? Well, this month Keld shows you how.
Last month, we examined FOP and how to use it in context of
producing formatted output in formats such as PDF, PostScript
etc. This month Samudra will examine different issues regarding
printing the documents produced with FOP.
Each of us, as Java programmers will encounter situations where
choices must be made between various coding solutions. Should
tabular data be sorted in one way or another? What exactly is
the graphical layout of your HTML pages? How often should you
poll a queue? To better understand what choices to make Keld
discusses the various ways you may enter parameters to your Java
programs.
SQuirrel is an SQL client
written in Java that can greatly ease development efforts by
permitting the developer to glance at a database’s contents
without explicitly issuing query statements, and also view the
contents of tables. This article describes step by step, the
process of setting-up and using SQuirrel with MySQL.
Is your company looking for a new XML-to-JavaBeans conversion
tool? The newest development from BEA touts the ability to
handle any XML schema. Hype or fact, you
decide?
Struts has a rich set of HTML-tags for building form controls.
Unfortunately it's often rather difficult to predict the exact
syntax to use in a given situation. This month Keld explores
some of the more common issues when using creating these forms
with Struts.
This month, we explore some other ways of extending the
DynaForms in Struts to model the inheritance relationship and
delve into another interesting aspect of Struts by using
multiple resource bundle files in a seamless manner.
Having problems utilizing
Struts - Expression Language? This week we take a look at the
some of the tags used in this language and see if we can add
some more usability upon this fantastic framework.
This month Keld examines how Eclipse, Tomcat, and Struts can be
a powerful set of tools, which can really help you get your
Java projects done in a very solid development environment
and the best part is they are all free.
Sometimes the basic framework isn't enough. This week we discuss
using dynamic form beans in Struts and some of the problems that
may have you scratching your head.
Deciding which mechanism to utilize, Inheritance or Composition, is not a
right or wrong answer. There are many things to consider. This
month Samudra shows us some guidelines to keep in mind when
deciding.
Before you start coding a new Struts application it's important
to decide how messages, errors and exception handling are to be
implemented. This month Keld discusses the tools available in
Struts
Inheritance is a commonly
used mechanism to model the relationship between two types. This
week we'll look at some of the pro's and con's to this often
misused mechanism.
Today’s businesses are
getting increasingly complex and sophisticated and their demands
are increasing in a proportional manner. Benoy Jose shres this
month with us how the "J2EE Activity service provides a
middleware framework to support the implementation of extended
transaction models.
Part of every IT-project includes testing, and Struts projects
are no different. This week we'll focus on testing if the
execute method of the Action classes work properly and look at
some of the tools that help us achieve our goal.
The world of Java now suffers
from the problem of plenty. There are so many ways that an
application can be developed and deployed. We all know the
decision-making factors, the pros and cons of any particular
chosen method of deployment. However, the scalability aspect of
an application can also be measured by how easily it can change
the mode of deployment. This month Samudra will show us how a
Trader pattern can help achieve flexible deployment options
Certificate based security forms the basis for SSL (Secure
socket layer) transactions? Every year billions of transactions
involving trillions of dollars are done safely using the SSL
protocol. This week we'll look at the role of the Java
certification path API and see how it provides a mechanism to
implement certification path functionality.
Jakarta Struts is becoming
increasingly popular as the de-facto MVC framework for servlet
applications. Currently we’re all waiting for version 1.1 to be
finally released. But, until this happens there’s no reason not
to use the 1.1 Release Candidate, which is considered to be very
stable, and at the API level it can be assumed to be identical
to the final release.
This tutorial from "Murach's
Java Servlets and JSP" shows how to create an application that
can be used to execute any standard SQL statement against a
database that's running on a server.
Author Harshal Deo continues to shed light on STRUTS and some of
the better ways to access your databse. In this article we will
look at CASTOR JDO, a data access or Object to relational
mapping framework and how it improves the data access code.
If you're working with XML
documents, and your focus is more on the contents of the
documents, and not so much on the XML structure, then Castor XML
may be what you're looking for. This month Keld Hansen focuses
on the conversion capabilities of Casto XML.
This month Samudra examines the package design. This simple
example will help you grasp the concepts and will have you
applying them in your own designs.
This month Samudra puts knowledge to work as we test the the
design principles governing the class and package structures
that have been discussed in this series.
Look into the future of Java Client Provisioning. The Java Community Proceess isn't quite done with this Java framework but with the surge in demand for mobile applications with interactive services the push is on.
Looking to be more productive? Who isn't?
Keld introduces us to Castor-JDO, a tool that will enthrall you with its simplicity. If you have a simple data model, and are fonder of Java coding than SQL coding, then Castor
can help you to be more productive.
Are your designs stable? This month Samudra will focus on the
change impact relationship involved in designing classes showing
us how to take them into account when designing the package
relationship.
This week Keld gives us a quick look into JMeter’s capabilities
in the web application and web service area. This versatile open
source gem is simple to use and great for performing load testing
on your applications.
Designing is probably the most important phase in the
software development life cycle. In this series, Samudra will discuss
the packaging of classes that are part of the system and will conclude
this series with a small case study of the concepts discussed.
Imagine a system that has pluggable modules included into it,
that you could expand on as needed. Add to that the capability
of integrating seamlessly with existing applications and
leveraging on their power. All the ideas above and much more
form the gist of what JMX or Java Management Extensions wishes
to bring to the Java world.
Harshal Deo is back demonstrating screen flow and action handling using STRUTS.
He will use NetBeans to create the JSP aNDjava files, use tools such as auto
generation of getters and setters and finally use the IDE to compile and test the
application.
Java contains a lot of useful utility packages. One is java.util with its lists,
maps, and calendar stuff--a lot to look into and use in your applications.
Another package, java.io, contains what you need for reading and writing files
and handling data streams in general.
Graeme Kerry's tutorials are aimed at complete beginners to programming. Part 1 covers what you will need, a description of the main parts of the Java SDK, and walks you through, (what else), HelloWorld.java.
What is the point of Java, who needs it and does it come in a bag or jar? Ben Black's motto is once you have learned the basics, you have conquered the language. Join Ben as he begins this series on Java basics.
JavaBytes
Internet Cyclone
This powerful, easy-to-use, internet optimizer is for
Windows 95, 98, ME, NT, 2000 and XP. It's designed to
automatically optimize your Windows settings, boosting your
Internet connection up to 200%.