Articles


Knappsack Archetypes Part 1

This set of articles will document the contents of the Java EE archetypes for Maven. The archetypes come in four flavors, basic,minimal, sandbox and sandbox demo with each one being based on the previous one. In part 1, we’ll give an overview of the archetypes and the structure and configuration used in all of the archetypes. Read More »

The key to being a good programmer

One blog topic that never seems to get old is what makes a good programmer, or how to be a good programmer, or what you can do to be a better programmer. The same activities are often listed as being the path to successful codesmithing, when really it is just the method by which the true magic happens. With programming, like many things, it isn’t what you do, it’s what you learn from it and the only key ingredient to being a good programmer (besides practice) is exposure to programming. Exposure comes in many forms, whether it is through hands-on practice or looking at someone elses code. Here’s a few of typical examples given and how it exposes us to programming.
Read More »

Introducing DataValve

DataValve is a free open source library that facilitates the creation of re-usable view and data access components as well as providing a number of features for pagination, sorting and parameterizing queries. This article defines the problems DataValve aims to solve and how it solves them.
Read More »

A Guide to Spigot For Seam Developers

Note : Spigot has been renamed to DataValve.

(Edit : I renamed this post so it doesn’t seem like Spigot is just for Seam, Spigot can be used with different frameworks or without any at all. However, I wrote this post since Spigot is so familiar to the Seam EntityQuery that it should be easy for Seam users to get the idea)

Seam developers should become familiar with Spigot concepts fairly quickly since they are very similar to those found in the Seam EntityQuery which was one of the main inspirations for the framework. If you imagine taking the entity query class and splitting it in two, one part to keep hold of state and the other to actually fetch the data. The stateful part is the Paginator that keeps track of what the current ordering of the data is, what is the current page and how big the pages are. The stateless part takes the Ejbql and the pagination information and returns a subset of the data. Now imaging that the data provider has the JPA pieces taken out and replaced with an abstract fetchResults method. This method is implemented in subclasses for specific data providers for text files, sql queries, jpa queries, native jpa queries, xml files, comma delimited or just an in memory dataset.
Read More »

Using Composition in Object Modeling

Using composition over inheritance is a common design pattern that is often discussed in terms of designing business logic components. However, composition can solve a number of problems in domain object modeling that are created by relying on inheritance to share interface or functionality. Composition is used to delegate implementation in logical units by enlisting the help of a reference to an object that implements the required functionality instead of inheriting from it. This reference can be changed to different implementations depending on the needs at the time making for a more flexible design. This same design can be used in domain modeling to overcome some of the problems caused by inheritance. The typical flawed example of using inheritance in object modeling is the Person class which is often subclassed into Employee, User , Customer and Vendor classes.
Read More »

Understanding Nested Conversations

I had a bit of epiphany on the subject of nested conversations the other day when I was thinking about them and thought I’d share. I think nested conversations have been a little misunderstood with people unsure of how to use them, myself included, but I think I have found the best way to think of them.
Read More »

Seam is Dead, Long live Seam

With Weld 1.0, the reference implementation of JSR 299 – Java Contexts and Dependency Injection now released, attention at JBoss has no doubt turned to Seam 3 which is going to be built on top of Weld. Red Hat and JBoss are committed to returning innovations back the JCP as is the case with Seam which not only resulted in JSR 299, but has also influenced a number of other JSRs especially JSF 2. With JSR 299 standardizing the Seam ‘style’ of development it also brings about a some fundamental game changes for Seam 3 (hence the title) as much of the strength of Seam becomes part of the JEE standards.
Read More »

Conversational Pitfalls

Seam conversations have certain rules that you need to be aware of when using them. This article came about because for the last couple of years, the same questions have been asked on the Seam forums regarding conversations. It is also a couple of issues that cropped up while I was working on the Seam vs. Spring Web Flow articles. Some of the problems are uncannily similar with similar solutions, so parts of this series may be of interest to non-Seam users. Additionally, it seems like a lot of this stuff will also apply to the conversational pieces of JSR 299 – Contexts and Dependency Injection which will be a part of JEE 6.
Read More »