Spring is a framework, which provides a bunch of classes, by using this we don’t need to write boilerplate logic in our code, so Spring provides an abstract layer on J2ee.

For Example in Simple JDBC, the Application programmer is responsible for

  1. Loading the driver class
  2. Creating the connection
  3. Creating a statement object
  4. Handling the exceptions
  5. Creating query
  6. Executing query
  7. Closing the connection

Which is treated as boilerplate code as every programmer write the same code. So for simplicity, the framework takes care of boilerplate logic and the programmer has to write only business logic.

So by using the Spring framework, we can develop projects rapidly with minimum lines of code, without any bug, the development cost and time also

So Why to choose Spring as struts are there

Struts is a framework which provides the solution to web aspects only and struts is invasive in nature. Spring has many features over struts so we have to choose Spring.

  1. Spring is Noninvasive in nature: That means you don’t need to extend any classes or implement any interfaces to your class.
  2. Spring is versatile: That means it can be integrated with any existing technology in your project.
  3. Spring provides end to end project development: That means we can develop all the modules like the business layer, persistence layer.
  4. Spring is light weight: That means if you want to work on a particular module then, you don’t need to learn complete spring, only learn that particular module(eg. Spring JDBC, Spring DAO)
  5. Spring supports dependency injection.
  6. Spring supports multiple project development eg: Core java Application, Web Application, Distributed Application, Enterprise Application.
  7. Spring supports Aspect-oriented Programming for cross-cutting concerns.

So finally we can say Spring is an alternative to Struts. But Spring is not a replacement of J2EE API, As Spring supplied classes internally uses J2EE API classes. Spring is a vast framework so it has divided into several modules. No module is dependent to another except Spring Core. Some Important modules are

  1. Spring Core
  2. Spring JDBC
  3. Spring AOP
  4. Spring Transaction
  5. Spring ORM
  6. Spring MVC


<< Getting started with Spring Framework

Spring Core>>


By Tell Me How

It is a technology blog and admin has excellent experience in programming from 5+ year. You can contact us at ceo.tellmehow@gmail.com

Share your thoughts

Leave a Reply

Loading Facebook Comments ...
Loading Disqus Comments ...