In this tutorial we are going to see brief introduction about Spring Framework.This tutorials created by referring spring framework 3.2.4 reference document.
Overview of Spring Framework
The Spring framework is a lightweight framework for building the enterprise ready application.However, Spring is modular allowing you to use only those parts that you need, without having to bring in the rest. You can use the IoC container, with Struts on top, nut you can also use only Hibernate integration or the JDBC abstract layer. The Spring Framework supports declarative transaction management, remote access to your logic through RMI or web services, and various options for presenting your data. Its offer a full-featured MVC framework, and enables you to integrate AOP transparently into your software.
Spring is designed to be non-intrusive, meaning that your domain logic code generally has no dependency on framework itself. In your integration layer (such as data access layer), some dependencies on the data access technology and Spring libraries will exist. However, it should be easy to isolate these dependencies from the rest of your code base.
Introduction
Spring is a Java Platform that provides comprehensive infrastructure support for developing Java application.Spring handles the infrastructure so you can focus on your application.
Spring enables you to build application from Plain Old Java Object (POJO) and apply enterprise services non-invasively to POJO.This capability applies to the JavaSE programming model and to full and partial JavaEE.
Spring framework targets to make J2EE development easier.The important concept of Spring frameworks are
- DI – Dependency Injection
- IoC – Inversion of Control
- AOP – Aspect Oriented Programming
Inversion of Control and Dependency Injection
The most important feature of Spring framework is the Dependency Injection(DI) flavor of Inversion of Control. Dependency Injection is merely one concrete example of Inversion of Control.
Inversion of Control and Dependency Injection are the design pattern used to remove dependency from the code.It makes the code easier to maintain and test.When writing complex application, application classes must be independent to each other to increase the possibility of reuse the classes. we will learn these concept in separate chapter.
Aspect Oriented Programming
Aspect Oriented Programming is the one of the important component of spring framework.Aspect Oriented Programming is used to separate the cross-cutting concerns from the application’s business logic.Example for cross-cutting concerns are logging, transactions management, security, caching etc.
Dependency Injects help us to separate the cross-cutting concerns from application business logic.I will explain Aspect Oriented Programming in separate chapter.
Advantage of Spring Framework
1. Lightweight
Spring framework is lightweight because of its POJO style implementation.The Spring framework doesn’t force us to inherit any class or implements any interface.
2. Loosely Coupled
The spring applications are loosely coupled by using Dependency Injection
3. Easy to develop
Spring Framework support integration of various framework, its makes development easier.
4. Easy to Test
The Dependency Injection makes testing easier and also Spring Frame work doesn’t require any application server to run the application.
5. Powerful abstraction
Spring Framework provides abstraction to specification like JMS, JDBC, JPA, JTA, etc.
0 comments:
Post a Comment