I am working on a project where I am receiving input from a bunch of forms, inputting that to a database and displaying previous data submitted by that form (people need to see what they did last time as they fill out the form).
It is a lot of work in the servlet and jsp area. Although it works it will not be fun to maintain. It got me thinking. There has to be some framework I can be using within a servlet to handle/simplify these tasks.
Each time one loads up I display all the previous posted results in the top (this is done by passing a Java object containing the table headers and data from the Servlet to the JSP).
When you submit it gets validated and sent to the DB (meaning they decide what values are required and what they should be for form data to be added to the DB - this is done from an admin view of application).
The validation needs to be dynamically configured by users of the application.
I am having trouble figuring out the validation component.
Also if I change the form I need to update the JSP, the servlet it posts too, the java class that read/writes to the DB and the DB itself.
I am hoping to easily be able to add and remove forms and have users set the form validation as they see fit.
My present design of JSP <-> Servlets <-> Java Classes <-> DB works fine enough. I guess I am looking for something more configurable and scalable.
Luke [ October 17, 2005: Message edited by: Luke Shannon ]
Spring coupled with some type of JDO, like Hibernate, might work well in this situation. But I agree with Bear... make sure you are not overcomplicating the project by adding a framework just for the sake of adding it.
“Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.” - Rich Cook
Looks like they have something in place to handle validation. I need to look over this a bit more. I don't want to make things more complicated. I am looking for something that will simplify my life.
Joined: May 24, 2004
If you decide to go with Spring, I would highly recommend getting Pro Spring by Harrop and Machacek. It is a very good introduction to Spring and even shows you how to use it within Web Applications.
For my money, I think Spring is a lot less complicated than Struts. But as with any framework, there are times when struts is most appropriate and times when Spring is. (Heck, the two aren't mutually exclusive either. I have seen at least one web app that used both rather successfully) [ October 17, 2005: Message edited by: Paul Bourdeaux ]