Working on a Java position looking for Struts, but the client is intimidated by the amount of resumes being pumped in with Spring
Know the differences b/w Spring and Struts
Struts is the front end, ActionForms and Actions. Actions will call the Spring Service which has the Spring DAO injected into it. Spring makes unit testing a lot easier, you can inject your fake dao and not have to test with the database at all if you do not want to. We use it with Hibernate and my code is quite small as Spring handles exceptions quite well and you are relieved of all the Hibernate repetitive code.
Differences:
1)Struts is a web framework while Spring is not.
2)Spring is a Layered Architecture while Struts is not.
3)Struts is heavy weight while Spring is light weight.
4)Struts supports tag Library while Spring does not.
5)Spring is loosely coupled while Struts is tightly coupled.
6)Spring provides easy integration with ORM technologies while in struts, we need to do coding manually.
7)Struts easily integrate with other client side technologies. It is not easy in case of spring.
1. Spring don't have any action from, it bind the http form values directly into pojo. Instead of initializing the form bean spring directly initialize the domain object.
2. ActionForward in struts is replace with the ModelAndView in Spring. Model component contain the business object to be displayed via view component.
3. Unlike Struts Spring don't provide any separate tag library.
4. What Action class do in struts, Controller does in Spring. And action in Struts is a Abstract class but Controller in Spring is an interface, This is very good advantage of the spring.
5.Struts implement MVC Design Pattern where as Spring implements IOC Design Pattern and addresses AOP Cross cutting concerns.
6.Struts is heavy weight where as Spring is light weight framework.
Also remember,
Struts is mainly a presentation layer framework, like redirecting to a particular page ,doing client side validations etc which otherwise very tedious using jsp and servlets.
Spring is a complete J2EE framework having seven independent layers which can be used all together or few layers integrated with some other framework. Spring provides declarative transaction management and AOP. One layer of spring is for presentation purpose like struts but for only presentation layer, struts is better than spring.
I hope the client facing managers could take few questions on what is it that the client is more interested in, which would help recruiters streamline on the right resumes as well save the JavaBoys time over the phone being asked dumb questions.
No comments:
Post a Comment