Five Advantages of Spring Framework

1. Spring Provides Better Leverage

2. Spring Enables POJO Programming

3. Dependency Injection Helps Testability

4. Inversion of Control Simplifies JDBC

5. Spring‘s Community Thrives

Read more on this here

Technorati tags: Spring Framework 

13 thoughts on “Five Advantages of Spring Framework

  1. Hi,
    I was searching the Internet and found your awesome blog. I have studies many PowerBuilder books on the market,If read your this site this is very informative, and your site gives planty of knowledge about PowerBuilder.
    Thank You

  2. Some developers are using Spring framework in the wrong way and using it where its not needed.
    For example, when you’ve two simple classes A and B; And you know for sure A contains B and their values are dynamic but the implementation does not change at all, then you really DONOT need to use Spring Framework.

    You need to use spring only when you want to have some kind of injectability of classes during runtime.

    Spring makes debugging horrible!
    Why would someone create / instantiate an object with an XML file.
    Spring uses reflection and hence, its start up times are very high.
    99% of the time you get NoClassDefinitionFoundError when you change that Spring bean configuration file.

    When you have a large project, you should really think, which classes would go as Spring beans. If you do not limit your beans, you end up with so many XML files and you will easily lose track of which xml which class etc. Debugging is nightmare with spring.

    I found Spring’s jdbc template and Spring stereo types are good and reduce number of lines.

    1. LOL. I’m glad to see others agree with what I’m thinking about Spring. You get lost in the xml files, and you can’t jump to references. Ends up being a search fest every time you want to locate what class is being instantiated. Isn’t it the job of the IDE to help reference stuff for you? I think Spring is a case of XML use gone too far!

      Amen brother.

  3. Spring is to Java Programmers what RUP is to Java Programmer Managers

    1. Spring Provides Better Leverage

    Huh? Refactoring the source code breaks all the XML. How do you figure? It’s pretty hard to leverage Java if I have created a bunch of files external to Java that are dynamically loaded and are not verified when my source code is expanded or refactored.

    2. Spring Enables POJO Programming

    Hmmm… so… I can’t use “plain old Java objects” with “Plain old Java ” (sans Spring) ? That’s like saying “you can’t build this building with bricks, but if you stack the bricks this way, you can.”

    3. Dependency Injection Helps Testability
    Maybe a teensy bit. Comprehensive testing is a deep issue and system specific, wrapping a little code is a trivial dimension of this issue and not a compelling argument.

    4. Inversion of Control Simplifies JDBC

    If my EclipseLink objects (loaded from my database that was generated from EclipseLink DDL generated from EclipseLink JPA compliant annotations) can’t recognize or correctly cache an object that comes from a Spring + Hibernate or whatever, then Spring is a risk.

    5. Spring’s Community Thrives
    So did Powerbuilder…. once 🙂

    1. Yeah, I’m on board with you about Spring. I don’t see the advantage, except for the testability. All these other reasons given aren’t anything that Spring is giving you inherently that you don’t get for just being smart about coding. In fact Spring adds complexity that in my opinion isn’t worth any advantage that it might have.

  4. Hi

    I am working on an application that uses home grown object factory to get the delegates for making Java Web Service calls. I want to know what benefits / advantages will I have if I replaced factory with Spring framework, i.e. using the feature of IoC/DI?

    Anup Jani

  5. Hi

    I need the detailed advantages and how to use Spring framework with Hibernate for standalone application.

    Thanks!

  6. Hi i need the detailed difference between struts and spring
    and how can we slect the which is suitable for which application

Leave a reply to Jeff S. Cancel reply