Peter what do you think frameworks are? They are implementations of design patterns. Struts = MVC design pattern and Spring = IoC design pattern.
Joined: Sep 10, 2004
>Can you not see why it is beneficial? I mean really...?
Since I never used it, I can't see the necessity . What you listed sounds interesting and it might facilitate but (forgive me) I just can't see HOW this will help.
Do you know of any concrete example that exemplify the need for spring.
thank you both for you help
Joined: Apr 25, 2007
After reviewing your previous posts I get the feeling that you have never heard of Google or doing any kind of research. Personally I tend to frown upon individuals who give little effort and immediately looks to others for a hand out. If you were to search on "Why use Spring Framework?" you would find exactly what you are looking for, a hand out. I believe that forums are for individuals who truly have issues and have put the time in and are now banging their head against the wall. So when I see that effort is put forth without a solution found I am happy to help but when someone continues to complain about the explanations of others when a clear answer is available with a little research I almost have to pity that person. So please save us all some time and do some research before faulting and posting lame questions.
Joined: Sep 10, 2004
>I almost have to pity that person. So please save us all some time and do >some research before faulting and posting lame questions.
As a reminder, when you joined this forum, you signed the agreement: BE NICE! so if you can't do that, I advise you not to post.
My question was sincere and valid! I was also generous and polite. I requested if anyone has a good example of struts-spring so he can advise a newbie.
Your last comment is clearly out of line and doesn't contribute to this forum.
I downloaded appfuse --- a spring kickstart. I used the spring MVC rather than struts. I think if you're going to use Spring you might want to think about dropping struts all together. Spring will allow you to uncouple your business classes from the service classes via dependency injection - which is nice. It will also give you aspects so you can configure stuff like logging without having to pollute your business classes with code to do logging. Spring MVC goes a step farther than struts in that it will populate your backend model classes via the Command object - which saves you from having to create a model object in your controller class and then populate it with values from the struts ActionForm.
Hi there, As everyone has suggested spring can help you loosely couple the action classes and their dependencies mainly on Business Delegates and Service locators. I think that is the important thing you should look at. Beside this there are other advantages as - singleton,lifecycle management of the objects. One more thing you introduce Aspects into your spring beans (action classes,Business delegates and all other POJOs you might use). Apart from this I can also think of other things such as - if you are using a Hibernate DAO layer (which we have used earlier),you create the sessionfactory declaratively using spring configuration and then inject it in any spring bean and use it. I am able to gather this much at this time regds amit