Spring Framework is one of the most popular Java EE frameworks. It is an open source and light weight framework created by Rod Johnson in June 2003.
Core principles of Spring Framework:
1. Dependency Injection (DI).
2. Aspect Oriented Programming (AOP).
Advantages of Spring Framework:
1. Light weight: Spring framework is light weight framework because of its POJO model implementation.
2. Non-invasive approach: As we know that struts forces programmer to extend Action Class but spring framework doesn’t force a programmer to extend class or implement interface given by Spring API.
3. Loose Coupling: Because of dependency injection concept, spring objects are loosely coupled.
4. Modular fashion: Spring framework is designed in modular fashion. A programmer can use only needed modules and ignore the rest.
5. Easy Testing: Dependency injection and POJO model makes easy to test an application.
6. Transaction management interface: Spring framework provides transaction management interface for transaction management.
7. No need of application server: Struts or EJB application require application server to run but spring application doesn’t need an application server.
8. MVC framework: Spring framework is a great alternative to web MVC frameworks like Struts.