Thursday, October 7, 2010

Introducing Sample Code Projects

While attending various technical sessions at this year's (2010) JavaOne conference, I couldn't help but realize the plethora of technologies that I simply have never touched, and will probably not get an opportunity to in my professional role, at least in the short-term.  Listening to the presenters speak so passionately about the advancements in Java really got my adrenaline going, and got me thinking how I could best immerse myself.

In-between sessions I started jotting down notes about a concept around creating a series of "junk code" projects.  I started to solidfy my thoughts around how best to continue to develop my own skills, but also to be able to share them with the public.

What I came up are "Sample Code Projects" (dubbed "Junk Code" in my JavaOne notes).  A sample code project will be a small working example illustrating the usage of technology.  They will be detail-oriented providing:
  • clear instructions on how to obtain, build and run the project
  • describe the folder structure of the project
  • clearly commented artifacts (source code, build scripts, etc)
I've created a page on my website to serve as the home for my sample code projects, and I have created and published my first project.  This first project demonstrates the usage of Java's JAX-WS Provider API for building SOAP-based web services.  This project closely resembles the demo application that my company built for our JavaOne presentation, but in actuality is a complete rewrite that incorporates many additional concepts including:
  • Leveraging of CDI in Java EE 6 (contexts and dependency injection)
  • Expansion and refinement of the command design pattern (both server AND client use command objects; the JavaOne demo did not leverage commands on the client)
  • Refined Ant build script that enforces a separate between client-side and server-side code
  • More finely-grained and refined project structure
  • Castor-based marshaling (the demo app uses JAXB)
  • There is no rules engine integration (for simplicity; the JavaOne demo app integrates with Drools)
  • There is no UDDI integration (for simplicity; the JavaOne demo app integrations with jUDDI)
So there you have it - over time I will be creating and publishing additional sample code projects.  Like many of you, I have a busy life in which I'm constantly trying to balance work, wife, children and play - so I apologize in advance if it is slow-going.

In case you're interested, here are my raw notes I took at JavaOne as I was thinking through all this.