I am designing a web-interface for a research project. Basically this interface would allow users to access some services through the net. When I started to design, I had all these technologies like servlets, JSP, JSF, frameworks like Struts etc, MVC pattern.
Everything is fine, but eventually I see that my code is getting cluttered with lots of request.getParameter() and hardcoded database queries which I would like to avoid.
Could anyone let me know of any best pratices for handling forms with technologies I am using. I wanna keep it simple cos I have only a few forms and would like to design something clean for these forms.
Originally posted by Nauman Khan:
My advise is to you to use Properties object and define all parameters which you don't want to hardcoded in your application in properties files which can easily retrieve by properties oject which is defined in java.util library.
thank you for your inputs.
I am doing it this way now. I have a bean for every form that takes care of getting data from the user form and also the database operations. In this way I could move much of my code to the bean and keep my business module code clean.