wood burning stoves*
The moose likes Struts and the fly likes Migrating existing application to Spring Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Migrating existing application to Spring" Watch "Migrating existing application to Spring" New topic
Author

Migrating existing application to Spring

Karthik Guru
Ranch Hand

Joined: Mar 06, 2001
Posts: 1209
Matt,

Any suggestions on this? Have you / somebody else have the experience of having done that. In which tier (web , etc) do you think Spring buys us maximum benefits. Or it even a worthwhile investiment trying to port an existing application to the Spring framework

thanks.
Matt Raible
author
Ranch Hand

Joined: Jan 11, 2001
Posts: 114
Any suggestions on this? Have you / somebody else have the experience of having done that. In which tier (web , etc) do you think Spring buys us maximum benefits. Or it even a worthwhile investiment trying to port an existing application to the Spring framework.


In my experience, if you're already using tools like Hibernate or iBATIS, integrating Spring into your project is very easy. When I first integrated it into one of my projects, I was able to delete 75% of the code I had in my Hibernate DAOs. Furthermore, using Spring's IoC container, I was able to quit worrying about opening/closing sessions b/c Spring handled all of that for me.

I'd suggest starting at your data layer. If you're using JDBC, take a look at using Spring's JDBC abstraction. It's great because it gets rid of all the mundane open/close and try/catch/finally stuff you have to do with regular ol' JDBC.

I've also migrated an app from Struts to Spring. I also
took some notes while doing it.

If I were you, I'd take baby steps - start by integrating something small and then gradually add more Spring features as you see the need.

For example code, I've been trying to keep a list of sample apps on my site.


Matt<br /> <br />Author: <a href="http://springlive.com" target="_blank" rel="nofollow">Spring Live</a> and <a href="http://www.apress.com/book/bookDisplay.html?bID=256" target="_blank" rel="nofollow">Pro JSP</a><br />Weblogs: <a href="http://raibledesigns.com" target="_blank" rel="nofollow">Raible Designs</a> <a href="http://jroller.com/page/raible" target="_blank" rel="nofollow">Spring Live Blog</a>
Karthik Guru
Ranch Hand

Joined: Mar 06, 2001
Posts: 1209
thanks! the blog looks very informative.
Alexandru Popescu
Ranch Hand

Joined: Jul 12, 2004
Posts: 995
Originally posted by karthik Guru:
Matt,

Any suggestions on this? Have you / somebody else have the experience of having done that. In which tier (web , etc) do you think Spring buys us maximum benefits. Or it even a worthwhile investiment trying to port an existing application to the Spring framework

thanks.


garthik is this a requirement for you or just a learning change?
I would analyse why I would like to make the move and also try to find out exactly why should I go for one solution against others (as you probably know there are also some other good IoC solutions).

./pope


blog - InfoQ.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Migrating existing application to Spring
 
Similar Threads
Question about designing a web-service security mechanism used with desktop client
Spring Book Question
What Are the Advantages of Using the Spring Over the Struts + Other Frameworks?
whose internationalization features is good to use JSTL or jakarta tags?
Does Spring Web Flow 2 give advices for integration into existing applications?