SPRING

INTRODUCTION TO SPRING FRAMEWORK

Contents

What is Spring?  INTRODUCTION

 

In the year 2003 Rod Johnson developed the spring which is open source platform for development to make the JavaEE application development in easy and rapid manner. Initially it was released in Apache 2.0.

Spring is a lightweight framework. It is otherwise called master of framework because it supports to other frameworks Struts, EJB, Hibernate and so on.This tutorial helps you to understand the spring framework in easy way.

Note: At the same time you have to get good knowledge in java and IDE such as Net Beans or Eclipse before this tutorial.

It consists of several modules

  • OC
  • AOP
  • DAO
  • Context
  • ORM
  • WEB MVC and so on.
SPRING MODULES

 

Spring Versions:

  • Spring Framework 1.0 (which released on March 2004)
  • Spring Framework 1.2.6 (which released in the year 2006)
  • Spring Framework 2.0 (which released on October 2006)
  • Spring Framework 2.5(which released on November 2007)
  • Spring Framework 3.0(which released on December 2009)
  • Spring Framework 3.1(which released on December 2011)
  • Spring Framework 3.2.5(which released on November 2013)
  • Spring Framework 4.0(which released on December 2013)
  • Spring Framework 4.2.0 (which released on 31 July 2015)
  • Spring Framework 4.2.1 (which released on 01 Sept 2015)
  • Spring Framework 4.3 (which released on 10 June 2016)
  • Spring Framework 4.3.0.RC (up to 2019)
  • Spring 5 (under build on)

Spring is especially designed for IOC and dependency Injection. By below you can understand what is IOC? And what is dependency Injection?

DEPENDENCY INJECTION WITH EXAMPLE:

Dependency injection helps us to work on our application to replace hardly coupled to loosely couple. In other words it helps to simplify the code from complications.  There are three types of Dependency injections:

  1. Setter injection
  2. Construction injection
  3. Interface injection

Some versions in spring not support for Interface injection but Spring Version 2.X support all the injections.

IOC [Inversion of Control]

IOC is otherwise Inversion of control makes the code simpler and makes the code loosely coupled bean. Because of this Spring is Called Plain Old Java Object Framework( ie. POJO Framework)

Example:

class dog{

Animal animal;  

dog (){

Animal =new Animal ();  

}  

Tightly coupled between Animal and Dog

The above code can be written like this in IOC.

 

class dog {

Animal animal;

dog (Animal animal)

{

this.animal=animal;

}

}

Loosely Coupled

The loosely couple code helps in different environment class without any change in the code or logic. This simplifies the process of writing code again and again, modification and testing.

ADVANTAGES OF SPRING

  • Loosely coupled.
  • Easy to test and modify.
  • Simplify the development process.
  • Templates are already predefined in it. (For framework like Hibernate, Struts, etc.)
  • Light weight.
  • Strong Abstraction (for JDBC, JMS etc…,)

 

admin

Recent Posts

Password generator Online | Ultimate [2024]

Do you want to generate a password online? Our Password generator Online tool is used…

55 years ago

How to solve “Java Mail Authentication Failed Exception” in Springboot

Do you want to know how to fix the Java Mail Authentication Failed Exception in spring…

55 years ago

List Of Sac Code In GST | 2024

Do you want to know the sac code list in GST? Here you can get…

55 years ago

How To Generate GST Report in Meesho | 2024 | Updated

Are you meesho seller? Do you want to generate GST report for tax registration? Follow…

55 years ago

How Do I Create a Listing On Meesho? [2024][New]

Are you want to create Listing On Meesho? In this article you are going to…

55 years ago

Meesho Seller Registration Process [2024] [New]

Do you want to know the Meesho Seller Registration Process? Follow the steps given in…

55 years ago