Friday, January 28, 2005

FanClub: Technical Architecture

FanClub is a typical dynamic, data-driven web site. A lot like (too much probably) the typical Sun PetStore example app. I certainly could implement it using a high-end J2EE app server, Struts, EJBs and JSPs. But, instead, my intent is to use a "lighter-weight" solution and use a couple of technologies that aren't as common. I believe, in the end, that this will provide a better solution appropriate to this type of application.

The app will be divided into the typical logical layers of UI -> Business Logic -> Persistence all running within the same app server (a servlet container). Following the basic design that Matt Raible uses with his Equinox starter app, each layer will talk with the other via interfaces.

The application will rely heavily on the Spring Framework to tie everything together with its Dependency Injection. It hels enforce good design, encourages "design to interface" and simplifies testing.

I also intend to use the SpringMVC framework for the "controller" part of the UI. SpringMVC is more powerful and flexible that Struts and since its there... I'll use it. For the "view" part I'm going a little off the beaten path an using Velocity. Why Velocity? I've never been much of a JSP fan. The syntax makes viewing it in an HTML editor messy. I also don't like the JSP -> Compile to Servlet process. Its never felt right to me. Velocity is fast, has a simple syntax and doesn't interfere with HTML.

For the persistence layer I intend on using iBatis. iBatis is a very simple object-relational maping tool. Since I expect my database interactions to be fairly simple and iBatis is easy to get use with I'll start with it. I may move to Hibernate later on. Following a DAO pattern for persistence I should be able to swap iBatis for Hibernate fairly easily.

Finally for security, I intend on using the Acegi security framework. It integrates nicely with Spring and has no container specific dependencies.

The application server for this project will be Jetty. Jetty is fast and light-weight. Tomcat would work as well, but my experience with Jetty has been that it is faster to develop with and peforms just as well under the loads expected of this app.

Also, as long as I'm at it, I plan to use Java 5.0 (JDK 1.5).

For tools I intend on using:

Eclipse 3.1M4 (with JDK 1.5 support) - IDE
Jetty Launcher for Eclipse (an excellent plugin for managing Jetty) - IDE
Velocity Web Edit (Eclipse plugin providing HTML & Velocity syntax support as well as help with "soft references" in the pages) - IDE
CVS - version control
Ant - for builds
JUnit - testing
FIT (or Fitnesse) - acceptance testing
Hypersonic DB (HSQLDB) - RDBMS






0 Comments:

Post a Comment

<< Home