codaland
Saturday, February 15, 2003
       
Classpath Duplication-Finder Utility
After reading Bill's xerces entry today, I decided to go ahead an implement an idea I had a while back...I've had Bill's problems several times before (particularly with xml lib conflicts), and as I'm sure everyone can relate to, classpath conflicts can take whole days of your time before you realize what's going on.

So I wrote a ClasspathVerifier utility [download it]. It goes through your system classpath, including zips and jars, and checks for duplicate files. I included the source, which has a JUnit test, and based on that it should be obvious what's going on. This is a first go, if you have suggestions or find bugs be sure to let me know (post a comment here, in fact).
#




Thursday, February 13, 2003
       
Blocks In Java
I have designed and constructed a simple Java package that enables me to use HigherOrderFunctions and FunctorObjects in Java. If this sentence leaves you feeling a little cold, I will attempt to define these terms in the context of an object-oriented language like Java. A HigherOrderFunction is any method that takes expressions (rather than data) as its argument. Examples includes the Smalltalk enumerators #detect and #do, the LISP #mapcar function, or the CeePlusPlus standard library algorithms std::for_each or std::accumulate. A FunctorObject encloses expressions within an object that can be passed around as data and dynamically evaluated by a HigherOrderFunction. Smalltalk blocks are a kind of FunctorObject. The CeePlusPlus Standard Library simulates FunctorObjects using function objects. In Java, we can enclose a lexical unit of code within an Object with AnonymousInnerClasses. Consider the following Java code that uses the java.lang.Runnable class to enclose an expression within an object...
#


       
XDoclet for Hibernate
XDoclet (http://xdoclet.sourceforge.net) is a code generation engine with the goal of continuous integration. It uses custom JavaDoc-like tags to generate external resource files to support the main Java classes. XDoclet has mainly been used for the auto-generation of EJB descriptors (and related J2EE container technologies).

There also exists an XDoclet Hibernate module to generate the class descriptor files (*.hbm.xml) Hibernate uses to persist objects with. This module, however, is poorly documented under the Hibernate collection of documentation. Compound this with XDoclet neither being a beginners tool, nor a simple to integrate into a project, and one might easily be turned off of either of these great technologies.

The goal of this document is to provide a walk-through on getting XDoclet for Hibernate incorporated into a projet. This document is not a complete reference on the XDoclet component for Hibernate.
#


       
Integrating JSP/JSF and XML/XSLT: Best of Both Worlds
This article shows that JSF 1.0 and JSP 2.0 are the result of a logical evolution that started in the early days of servlet programming. With milestones such as JSP 1.1, Struts 1.0 and JSTL 1.0, server-side Java technology has progressively integrated many successful techniques from real-world development. The article then shows that the introduction of Model 2X, a combination of JSP technology and XML processing, is a continuation of this evolution and improves the flexibility of the presentation layer.
#


       
FormProc: Form Proccesing and Validation
FormProc is a Java library designed to make web form handling easy. Forms are represented as objects which manage a collection of form elements. Submitted data can be validated through several mechanisms:

* Java class which extends from the Validator abstract base class
* BSF supported scripting language
* Regular expressions (through the Jakarta ORO library)
* Rule-based using Rule classes
#


       
JSch 0.1.0
JSch is a pure Java implementation of SSH2. It allows you to connect to an sshd server and use port forwarding, X11 forwarding, file transfer, etc. You can integrate its functionality into your own Java programs.
#


       
JCascaded Pane
JCascadedPane is a Swing GUI library which enables the Java developers to incorporate cascaded panes facility into their applications. The library essentially consists of just two Classes - JPanelGroup & JCascadedPane. JPanelGroup is a simple Swings Container which holds number of Cascaded Panes at a single instance and at the same time handles the functionality and events generated by these panes. JCascadedPanes, on the other hand holds various child panels or components and act as a Cascaded Pane itself. Whenever user clicks JCascadedPane title the child component of that particular pane is displayed on the JPanelGroup. Below are the few screen shots of the Cascaded Panes created using JCascadedPane library.
#


       
A JSTL Primer: The Expression Language
The JSP Standard Tag Library (JSTL) is a collection of custom tag libraries that implement general-purpose functionality common to Web applications, including iteration and conditionalization, data management formatting, manipulation of XML, and database access. In this first installment of his new series on developerWorks, software engineer Mark Kolb shows you how to use JSTL tags to avoid using scripting elements in your JSP pages. You'll also learn how to simplify software maintenance by removing source code from the presentation layer. Finally, you'll learn about JSTL's simplified expression language, which allows dynamic attribute values to be specified for JSTL actions without having to use a full-blown programming language.
#


       
Jamon
Jamon is a text template engine for Java, useful for generating dynamic HTML, XML, or any text-based content. In a typical Model-View-Controller architecture, Jamon clearly is aimed at the View (or presentation) layer.

The motivations for Jamon came from dissatisfaction with current presentation layer technologies such as JSP and Velocity. Ideas was also drawn from a surprisingly pleasant experience with Mason, which though written in and for Perl, provided inspiration both conceptual and syntactic (for better or worse).
#


       
OpenEJB: EJB for Tomcat
OpenEJB allows you to use EJBs in your applications with very few configuration files and commands. After reading this article, you will be able to use EJB as you might have been using JDBC with databases like HSQL or Cloudscape. You won't have to spend a lot of your precious time to configure and run an application server. Merely deploy a simple web application from OpenEJB distribution and map the beans deployed in OpenEJB to their respective names in Tomcat's naming system.

The aim of this article is to present an easy yet powerful way of combining Tomcat with OpenEJB so that a web application deployed in Tomcat becomes an OpenEJB client in a fully J2EE-compliant manner. You shall see an EJB example deployed into OpenEJB and accessed by a JSP as part of a web application deployed into Tomcat. I don't want you write the EJB and web application, thus the article provides these components in a downloadable form. We'll concentrate on architecture instead.
#


       
ActiveRecord vs Service Approach
Here's something else I was thinking about for all this. While I am currently using the Service approach I mentioned before, one thing that has made me think about moving to Active Records is that I still find myself usually writing code like, thing.save();, whereas with the Service, I really have to do service.save(thing);.

This all plays into my complaint about the Service approach not being nearly as OO (in my mind).


#


       
Tiles 201 - Using Controllers
In a previous article, Tiles 101, I talked about how to use Tiles to create a standard layout for your web app. Here I'm going to cover ways to use Tiles Controllers to improve the overall architecture of an web app.

Controllers are a somewhat hidden feature that aren't typically discussed when Tiles comes up. Neither Struts in Action or Programming with Struts discusses them. The only real documentation I've seen on it is by the creator of Tiles, Cedric Dumolin's web site. It's an excellent, and covers Tiles in more depth than I'm going to here.
#


       
Tiles 101
Struts and Tiles have been mentioned in a couple blogs this past weekend, including Code Intensity and epesh. Having used Tiles on a number of projects I thought I would add my two cents. The biggest confusion I've seen is regarding where the layout logic goes. In tiles it is possible to have each jsp say "use this menu, uses this footer". However, you shouldn't unless you have a really good reason. So how should a Struts/Tiles project be set up?
#


       
Ted Neward on J2EE Best Practices Whitepaper
Recently (on Jan 27th of this year), The Middleware Company released (via TheServerSide) a white paper entitled "J2EE Best Practices", containing 20 different "Best Practices" for J2EE development. A couple of people have pinged me over email asking for my reaction, and while I'm sure people have me pegged as somebody sharpening the knife ready to carve into this report, you may be somewhat surprised at my reaction:

Bluntly put, I agree with almost every one of the items they listed, with the exception of two or three, which I'll discuss below.
#




Monday, February 10, 2003
       
The MSeries
The Mseries is a (expanding) set of Java components that are provided freely to application programmers. They are intended to to provide functionality that is missing from the core language and required in many, many application. They have been written as an exercise in Java programming, to demonstrate techniques and gain familiarity with different parts of the API. Please send me an email, tell me what you think.
#




blogroll:

winer
slashdot
javalobby
the server side
developerWorks
news.com
dotnet247
dotnet junkies
gotdotnet
sam gentile
sam ruby
paul prescod
.net guy
0xdecafbad
jon udell
john robb
dj's
rebelutionary
blogging roller
desktop fishbowl
servlets.com
cafe au lait
be blogging
kevin burton
paradox1x
james strachan
the truth is out there
brett morgan
blogging roller #2
joe's jelly
psquad's corner
zopen-x
rickard oberg
the saturn times
russel beattie
gerhard froelich
pete drayton
clemens vaster
weakliem
reinacker
drew
wagner
ingo rammer
ken rawlings
system.error.emit
tomas
simon fell
bit working
justin rudd
chris sells
john lam
jim murphy
brian jepson
john burkhardt
matt pope
better living through software
windley
caetano
kulchenko
loosely coupled
understanding software engineering
rest lst,rdf-interest lst,tag lst ucapi lst
archives:


A man, his puppy, and a double barreled shotgun.

Powered by Blogger