Spring Framework: Today's Topics
- Why Spring?
- What is Spring?
- Dependency Injection (DI) / Inversion of Control (IoC)
- Spring Bean Life Cycle
- Bean Wiring
1. Why Spring?
- Simplifies Overall Java Development: Streamlines the development process.
- Loosely Coupled Applications: Spring manages dependencies, ensuring dependent objects are completely decoupled from their dependencies.
- Design Pattern Implementation: Supplies ready-made implementations of design patterns (e.g., Singleton, Factory, Proxy, MVC, Front Controller, and many more).
- Supports the MVC pattern for developing monolithic web applications and RESTful web services.
- Reduces Boilerplate Code: Minimizes repetitive code.
- Easy, Simple, and Lightweight Applications: Facilitates building lightweight applications.
- JDBC and ORM Support: Offers excellent support for JDBC and ORM, along with automatic transaction management.
- Modular and Non-Intrusive Design: Promotes modularity without invasiveness.
- Framework Integration: Provides smooth integration with frameworks like Hibernate, Struts, and EJB.
- Aspect-Oriented Programming (AOP): Supports AOP for separating and modularizing cross-cutting concerns (repetitive tasks) from core tasks.
- Examples: Request handling logic (Controller bean), Business Logic (Service bean), Data Access Logic (DAO).
- Testing Support: Supports unit testing and integration testing.
- Web Application and RESTful Services: Simplifies developing and securing web applications and RESTful web services.
- Microservices Architecture: Excellent support for building microservices-based architecture.