Introduction

Spring is an open source frame work to create a complex enterprise applications using java. Spring focuses on infrastructure so, you can focus on application. One of the main advantage of Spring is the layered architecture, which allows you to be selective about what components you want to add into your application.
Below are the main features of Java Spring:


Main Features:


Lightweight:
Spring is a large framework, but Spring is divided into multiple modules. Spring is designed such a way that no modules are dependent to other module except the Spring core module. That way programmers does not have to learn or include all unnecessary module. This reduces the size of the Java Spring.


Inversion of Control (IoC):
Inversion of Control (IoC) is also known as Dependency Injection (DI). It is the process where objects defines their dependencies with other objects they work with. In traditional way of programming the program created by programmers calls the useful libraries to perform generic tasks, while in Inversion of control 3rd party application framework calls the useful libraries for the program. There are two ways of Dependency Injection:

  1. Constructor based Dependency Injection
  2. Setter based Dependency Injection

Aspect Oriented Programming (AOP):
Spring supports Aspects oriented programming. AOP provides Object Oriented Programming (OOP) by providing another way of thinking about programming structure. In AOP key unit of modularity is the aspect.

Aspect helps to modularize cross-cutting concerns. Cross cutting concerns are describe as any functionality that affects multiple types and objects. As, Spring IOCcontainer doesn't depend on AOP container, you don't need to use AOP, if you don't want to - AOP supplements IOC to provide a capable middle ware solution.
  
Container:
Spring is a container based framework. Spring container contains and manages the application objects. Container gets its instructions from bean configuration file and performs related actions. 

MVC Framework:
Spring comes with the MVC web application framework, built on core Spring functionality, that can be used to develop flexible and loosely coupled web applications. Spring framework is highly configurable. Spring framework provides multiple view technologies like JSP, Velocity, Tiles, iText, and POI. 

Transaction Management:
One of the most irresistible reason to use Java Spring is transaction management. Spring framework provides the consistent transaction management which can also be configured with Java Hibernate, JDBC, Java transaction API (JTA), Java Persistent API (JPA), Java Data Object (JDO).

JDBC Exception Handling:
In a traditional programming structure programmers have to handle database exception explicitly, while in Java Spring framework it is all handled automatically for programmers. To handle the exceptions programmers have to do is catch the proper exception and throw it to relative class in the Java Spring.  

No comments:

Post a Comment