Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Migrating existing application to Spring

 
Karthik Guru
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Karthik Guru
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks! the blog looks very informative.
 
Alexandru Popescu
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic