My company have a requirement to build a J2EE application. So far we were using Struts and J2EE Patterns (Business Delegate, DAO etc)for other projects.My management would like to know how Spring and Hibernate can be used. Should we use stop using Struts?Team is not trained in these frameworks now. How long it will take a developer to learn these?
There is no need to dump Struts to use Spring. Unless you want to use SpringMVC. Spring and Hibernate can work just fine in a Struts application. And there is plenty of documentation on the Spring website on the topic and several books that are very good. Spring in Action and Pro Spring to name two.
That said, I made the switch seemlessly from Struts to Spring MVC. They are similar enough and there wasn't anything I needed to do in Struts that I couldn't do in Spring MVC. The primary reason I haev seen to use Struts with Spring is for the comfort and familiarity of the developers. If your developers know Struts, they shouldn't have much of a problem picking up Spring MVC if needed.
Spring is very much modular framework. It is not mandatory to use Spring framework completely. You can choose which feature of Spring you wanted to use and then integrate only that feature in your application.
If you are planning to develop entire new application then you can think about using SpringMVC, but if you want to use Spring in your existing Struts based application, then also you can choose that approach. You have to integrate Spring and Struts together with Spring's provided classes. (This is not difficult).
Using Hibenrate in existing application is littile complex. In my previous project legacy application database schema doesn't have primary key for most of the tables. As well as Hibenrate prooves to be limited helpful for database specific queries. Ex. If you are using connectby, startswith clause with Oracle database. Then it is difficult to simmulate all these types of queries in Hibernate.
My suggestion is, if you are doing bottom-up approach use framework like IBatis.
Just like you, struggeling to get the right solutions!<br /> <br />Sun Certified Java Programmer 1.5<br /> <br />Target - SCWCD