Jan 28th, 2010, 10:42 PM
Legacy java code and spring
We have a legacy system developed using plain jsp, servlets and pure JDBC. Now we are planning to develop a new module for this existing application and we thought to use spring JDBC layouts instead of pure JDBC and introduce more flexible layered architecture.
Our initial plan to have a Presentation layer with pure jsp and servlet controllers, Spring service layer and spring DAO layer. So we could use servlet controller to call Service objects and then DAO objects.
What do you guys think about this? Can you please help us to improve this Layered structure? Any suggestions?
Jan 29th, 2010, 01:22 AM
You can have the Controller's -> Business Delegate -> Service layer ->DAO so that the controllers remain simple.
where controller only knows about the model and the view to be shown, Delegate doing the task of conversion of Business objects to value objects vice versa and delegating to the service and the service inturn calling the DAO.