Jodd development in details
DEPRECATED! This page has not been updated for a long time. Still, it may contain some valid and valuable information.
Next pages will describe development of web applications in more details. Here we will not use Jodd Joy application template. Instead, we will build it from the scratch.
This tutorial gives easy-to-follow step-by-step instructions how to build web application using Jodd. Along it provides some best-practices for using Jodd frameworks.
This is just one way of how to build web applications with Jodd; what matters here is the concept and not the concrete values, structures or configuration used in example.
Attention: this example is easy, but not trivial; it covers many different topics of web development. It would be good if you have some basic information about Jodd components before proceeding with the example. Also don't be mislead with the amount of presented information - working with Jodd is simple, but not simpler.
Ok, here goes a short overview of each step.
As for any web application, we need servlet container installed, such as Apache Tomcat. We also assume that database server of choice is already installed (e.g. MySql or H2 or Oracle XE or …) and ready to use. If not, than you can download HSQLDB or H2DB, embedded database that require no installation.
This example needs just the following jars:
slf4j-simple-1.x.jarfor logging (30K)
- jdbc connector or embedded database
- servlets jars (150K), only for compilation
Once you have set all this, you will be ready to continue.
Get Things Done in 60 minutes
View with Madvoc (10 min)
Although presentation layer is usually not the first thing to develop, we start this example with introduction to Madvoc.
Serve with Petite (15 min)
After adding the basic view layer skeleton, we can continue with the real stuff: the business layer. We will organize business components using Petite.
Store with Db (20 min)
It's time for data! Let's combine the power and simplicity in one, using Db and DbOom.
Tx with Proxetta (15 min)
Wrap services with transactions handling code using Proxetta.
Auth with interceptors (10 min)
Control page access with Madvoc interceptors.
Tx over actions (10 min)
Different architecture approach, just for fun… or real!?