Sample App 0.1.1 Released

February 11, 2009

I’ve just uploaded a minor patch to Sample App. This fixes some errors in the production build targets, and adds more thorough JavaDoc and YUI Doc. – 20.6 MB

You can also find out more about Sample App.

Sample App 0.1 Released

February 10, 2009

I’ve just posted a Java webapp called “Sample App” (until I can think of a better name for it). The goal for this webapp is to be a project template using industry-standard libraries and best-practices for full-stack Java application development, from a high-performance rich client tier, back to the database. There’s nothing particularly revolutionary about it, but it’s hard to find this particular combination of features – especially a combined rich frontend and backend. It’s released under a BSD license.

Check it out, take what’s helpful to you, and improve on the rest!


  • Client
    • Logging (YUI Logger)
    • Combination of assets to save on HTTP requests
    • CSS sprites automatically generated (SmartSprites)
    • Minification (YUI Compressor)
    • Ajax requests (YUI Connection)
    • Strict presentation logic boundary (JSTL)
    • Copy in properties files
    • Object-oriented JavaScript
    • Event binding performed by JavaScript, not in markup
  • Server
    • Separation of business logic and webapp into distinct projects
    • Dependency injection (Spring)
    • Unit testing (JUnit)
    • MVC (Struts configured via Spring)
    • ORM (Hibernate)
    • Logging (Log4J)
    • Separate Business Logic and DAO tiers
  • Build
    • Separate build targets for dev and prod environments, changing config files, adding additional JS, and enabling/disabling logging and minification
    • Run on local box from a bare checkout using a build target, without any additional configuration or native code (Jetty, HSQLDB)


  • JDK 1.5 or above
  • Ant 1.6.5 or above

Getting Started:

Download the zip file above, expand it, go to sample-webapp/build, and run ant. This will run the default target run-dev. The app will then be accessible on your local computer at http://localhost:8080/sample-webapp/