1. Spring Overview
Spring Framework
- The Spring Framework is a comprehensive framework for enterprise Java development.
- It provides a wide range of features and functionalities that simplify the development of Java applications, particularly in the domain of enterprise and web applications.
- The framework is known for its modularity, scalability, and ease of integration.
What is Spring
- It was developed by Rod Johnson in 2003.
- Spring is a lightweight framework.
- Spring is a Dependency injection framework to make java application loosely couple.
- Spring framework makes the easy developement of javaEE (enterprise ) application.
- Spring is a tool that helps make it easier to build software, like apps or websites.
- Learning Spring is valuable because it provides you with a set of tools and techniques to create your projects more efficiently and with fewer problems.
- Example : Imagine you want to build a house. Spring is like a toolkit that has all the tools you need to build the house faster and better. If you learn how to use this toolkit (Spring), you can construct your projects more easily and with fewer mistakes. So, learning Spring is like becoming skilled with a powerful set of tools for building software.
Spring Framework History
The Spring Framework is a comprehensive framework for Java programming that provides a wide range of features to simplify the development of enterprise-level applications. It was created by Rod Johnson and first released in 2003. Over the years, Spring has become one of the most popular frameworks in the Java ecosystem, and it has significantly influenced the way Java applications are built.
- Inception (Early 2000s):
- The Spring Framework was created by Rod Johnson, who published the book "Expert One-on-One J2EE Design and Development" in 2002. The book introduced the concept of lightweight and loosely coupled components in Java development.
- Based on the ideas presented in the book, Rod Johnson and his team developed the initial version of the Spring Framework.
- First Version : Spring 1.0 (2004):
- The first official release of the Spring Framework, version 1.0, was made in March 2004.
- Spring 1.0 focused on providing a lightweight and non-intrusive alternative to the Java 2 Platform, Enterprise Edition (J2EE) for building enterprise applications.
- Current Version : Spring 6.1 (2024)
- The Current Version release of the Spring Framework, version 6.1, was made in 16 Nov 2023.
What is IOC Container
- The IOC container is Resposible to instatiate , configure and assemble the objects.
- The Ioc container gets information from the XML file and works accordingly , The main tasks perfromance container are :
- to instantiate the application class
- to configure the object
- to assemble the dependencies between the objects
- There are two types of Ioc container . There are :
1. BeanFactory
2. ApplicationContext
Dependency Injection
- it is design pattern.
- Inversion of Control(IOC)
Spring Framework Features
These Spring Framework features are as follow
1. Lightweight
The Spring Framework is very lightweight with respect to its size and functionality. It is due to its POJO implementation which doesn’t force to inherit any class or implement any interfaces.
2. Aspect Oriented Programming(AOP)
It is an important part of Spring Framework. Aspect Oriented Programming is used for separating cross-cutting concerns (for example logging, security etc.) from the business logic of the application.
3. Transaction Management
Transaction Management use for unify several transaction management APIs and is used to coordinate transactions for Java object. Also, not tie to the J2EE environment and use with containerless environments.
4. Container
The Spring Framework designs and manages the lifecycle and configurations of application objects.
5. Dependency Injection
Dependency Injection is a feature of Spring Framework allows you to develop loosely coupled applications. Therefore, the unit testing of these loosely coupled applications becomes easier. This also allows the developer to swap out some of the modules according to its need.
6. Integration with other frameworks
A great thing about this framework is that it doesn’t try to solve the problems have already solved. It just tries to integrate them with its framework which provides a solution to greater problems. Example IBATIS, Hibernate, Toplink etc.
Advantages of Spring Framework
Comments
Post a Comment