Spring FrameWork and Modules

♠ Posted by Java Tutorials at 11:22 PM

Page 1|2|3|4

Spring Framework

                                       Spring is a lightweight framework. It can be thought of as a framework of frameworks because it provides support to various frameworks such as Struts, Hibernate, Tapestry, EJB, JSF etc. The framework, in broader sense, can be defined as a structure where we find solution of the various technical problems.
                                       The spring framework comprises several modules such as IOC, AOP, DAO, Context, ORM, WEB MVC etc. We will learn these modules in next page. Let's understand the IOC and Dependency Injection first.

Advantages of Spring Framework

There are many advantages of Spring Framework. They are as follows:
1) Lightweight: Spring framework is lightweight because of its POJO implementation. The Spring Framework doesn't force the programmer to inherit any class or implement any interface. That is why it is said non-invasive.
2) Easy to develop JavaEE application: The Dependency Injection feature of Spring Framework and it support to various frameworks makes the easy development of JavaEE application.
3) Easy to test: The Dependency Injection makes easier to test the application. The EJB or Struts application require server to run the application but Spring framework doesn't require server.
4) Loose Coupling: The Spring applications are loosely coupled because of dependency injection.
5) Powerful abstraction: It provides powerful abstraction to JavaEE specifications such as JMS, JDBC, JPA and JTA.
6) Declarative support: It provides declarative support for caching, validation, transactions and formatting.

Spring Modules

  1. Spring Modules
  2. Test
  3. Spring Core Container
  4. AOP, Aspects and Instrumentation
  5. Data Access / Integration
  6. Web
The Spring framework comprises of many modules such as core, beans, context, expression language, AOP, Aspects, Instrumentation, JDBC, ORM, OXM, JMS, Transaction, Web, Servlet, Struts etc. These modules are grouped into Test, Core Container, AOP, Aspects, Instrumentation, Data Access / Integration, Web (MVC / Remoting) as displayed in the following diagram.

Test

This layer provides support of testing with JUnit and TestNG.

Spring Core Container

The Spring Core container contains core, beans, context and expression language (EL) modules.

Core and Beans

These modules provide IOC and Dependency Injection features.


Context

This module supports internationalization (I18N), EJB, JMS, Basic Remoting.


Expression Language

It is an extension to the EL defined in JSP. It provides support to setting and getting property values, method invocation, accessing collections and indexers, named variables, logical and arithmetic operators, retrieval of objects by name etc.

AOP, Aspects and Instrumentation

These modules support aspect oriented programming implementation where you can use Advices, Pointcuts etc. to decouple the code. The aspects module provides support to integration with AspectJ.The instrumentation module provides support to class instrumentation and classloader implementations.

Data Access / Integration

This group comprises of JDBC, ORM, OXM, JMS and Transaction modules. These modules basically provide support to interact with the database.

Web

This group comprises of Web, Web-Servlet, Web-Struts and Web-Portlet. These modules provide support to create web application.

                                                        Page 1|2|3|4


0 comments :

Post a Comment