File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Application Frameworks and the fly likes when is Spring Framework a good choice? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "when is Spring Framework a good choice?" Watch "when is Spring Framework a good choice?" New topic
Author

when is Spring Framework a good choice?

Emman lopez
Ranch Hand

Joined: Mar 11, 2004
Posts: 38
Hi,
currently all my projects are using struts, JDO. I will start a new project soon, Spring is something I want to start using , I want to ask if it is better to integrate struts with Spring or use Spring MVC framework and Spring starting from scracth.

When is Spring Framework a good choice for a project?

Thanks in advance


E.L.<br /> <br />SCJP
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Originally posted by Emman lopez:
When is Spring Framework a good choice for a project?

Let's see. Whenever Struts would be a good choice for a project, so would Spring. In general, Spring is very flexible and can support pretty much any architecture you can build on top of a J2EE application server. My suggestion would be to take a look at some of the benefits of Spring listed in the TSS article and consider whether your environment would be receptive of Spring (many architectural decisions tend to be not technical but political...).


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Karthik Guru
Ranch Hand

Joined: Mar 06, 2001
Posts: 1209
Matt raible did some comparison of web frameworks.
Not sure if that can help you to decide what would be best for you.
But either way worth looking at
Emman lopez
Ranch Hand

Joined: Mar 11, 2004
Posts: 38
Thanks karthik, Lasse for you input!
I like what I had read/seen so far about Spring, have you guys use Spring in your projects? what do you feel is the streght and weekness about Spring?
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Originally posted by Emman lopez:
have you guys use Spring in your projects?

Yes, although just on one project so far.

Originally posted by Emman lopez:
what do you feel is the streght and weekness about Spring?

I'd say the strength of Spring is that it provides a lot of functionality without pushing dependencies to org.springframework.* into your code (except in a few rare places) and without the need to have a "heavy" container in place for executing your code (in other words, Spring works outside a J2EE server). A third strength is that the configuration model is very flexible. In fact, the configuration model is so flexible that it's a bit frightening (you can lead yourself into a real XML spaghetti if you go overboard)...
Kishore Dandu
Ranch Hand

Joined: Jul 10, 2001
Posts: 1934
Originally posted by Lasse Koskela:

I'd say the strength of Spring is that it provides a lot of functionality without pushing dependencies to org.springframework.* into your code (except in a few rare places) and without the need to have a "heavy" container in place for executing your code (in other words, Spring works outside a J2EE server). A third strength is that the configuration model is very flexible. In fact, the configuration model is so flexible that it's a bit frightening (you can lead yourself into a real XML spaghetti if you go overboard)...


Can Spring be used inside a container like Weblogic???


Kishore
SCJP, blog
Karthik Guru
Ranch Hand

Joined: Mar 06, 2001
Posts: 1209
Originally posted by Kishore Dandu:


Can Spring be used inside a container like Weblogic???


Yes. But Spring MVC obviously would need a web container to work.
Its like a wrapper on top of various services. As per j2ee spec you had to be an enterprise bean to avail nice things like declarative security, transaction etc and that enterprise bean would reside in a j2ee container. Spring brings all those cool things to a java bean.
Emman lopez
Ranch Hand

Joined: Mar 11, 2004
Posts: 38
thanks guys for your input, I appreciate your comments, I going throught a decision period where I have to double check that Spring is not just a hipe, I like the notion of Spring being a like container, EJB servers is too much power for some trivials projects.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: when is Spring Framework a good choice?