We have an application, which needs to be restructered to MVC2 architecture. My problem is that the code of the current application is very messy.
My problem is, which would be an easier approach. Re-structering the current application or creating a new one from the scratch.My personal opinion is that creating a new application from the scratch, especially when all the developers are new, including me . But my manager thinks otherwise. Per him we don't have much time.
Current Architecture is: JSP talking directly to Business classes. No servlet is used. No beans.
Whether you rewrite or restructure, you will want to do certain things. You would want the business logic in JavaBeans, you will want a clean separation of your layers. So, get your JSPs to talk to your JavaBeans via a Business Delegate and get your JavaBeans talking to the DB via a DAO. Use Transfer Objects as parameters and return values.
The bare minimum design would be something like this:
JSPs <--> Business Delegate <--> JavaBeans <--> DAO <--> DB
It may be easiest to agree with your manager's view but then effectively rewrite the application .