Spring Tutorials

  • Spring framework is a lightweight, open source Java platform
  • Spring provides comprehensive infrastructure support for developing robust Java applications very easily and rapidly

Spring Architecture
  • Spring is modular framework, allowing you to pick and choose which modules are applicable to you, without having to bring in the rest.
  • The Spring Framework provides about 20 modules which can be used based on an application requirement.
  • Detail about all modules available in Spring Framework 
    Spring Architecture
 
Core Container

The Core Container consists of the Core, Beans, Context, and Expression Language modules whose detail is as follows:

  • The Core module provides the fundamental parts of the framework, including the Inversion of Control (IoC) and Dependency Injection features.
  • The Bean module provides BeanFactory which is a sophisticated implementation of the factory pattern.
  • The Context module builds on the solid base provided by the Core and Beans modules and it is a medium to access any objects defined and configured. The ApplicationContext interface is the focal point of the Context module.
  • The Expression Language module provides a powerful expression language for querying and manipulating an object graph at runtime.
Data Access/Integration

The Data Access/Integration layer consists of the JDBC, ORM, OXM, JMS and Transaction modules whose detail is as follows:
  • The JDBC module provides a JDBC-abstraction layer that removes the need to do tedious JDBC related coding.
  • The ORM module provides integration layers for popular object-relational mapping APIs, including JPA, JDO, Hibernate, and iBatis.
  • The OXM module provides an abstraction layer that supports Object/XML mapping implementations for JAXB, Castor, XMLBeans, JiBX and XStream.
  • The Java Messaging Service (JMS) module contains features for producing and consuming messages.
  • The Transaction module supports programmatic and declarative transaction management for classes that implement special interfaces and for all your POJOs.
Web
The Web layer consists of the Web, Web-Servlet, Web-Struts, and Web-Portlet modules whose detail is as follows:
  • The Web module provides basic web-oriented integration features such as multipart file-upload functionality and the initialization of the IoC container using servlet listeners and a web-oriented application context.
  • The Web-Servlet module contains Spring's model-view-controller (MVC) implementation for web applications.
  • The Web-Struts module contains the support classes for integrating a classic Struts web tier within a Spring application.
  • The Web-Portlet module provides the MVC implementation to be used in a portlet environment and mirrors the functionality of Web-Servlet module.
Miscellaneous
There are few other important modules like AOP, Aspects, Instrumentation, Web and Test modules whose detail is as follows:
  • The AOP module provides aspect-oriented programming implementation allowing you to define method-interceptors and pointcuts to cleanly decouple code that implements functionality that should be separated.
  • The Aspects module provides integration with AspectJ which is again a powerful and mature aspect oriented programming (AOP) framework.
  • The Instrumentation module provides class instrumentation support and class loader implementations to be used in certain application servers.
  • The Test module supports the testing of Spring components with JUnit or TestNG frameworks.
Dependency Injection (DI)
  • The technology that Spring is most identified with is the Dependency Injection (DI).
  • Dependency Injection is the heart of Spring Framework.
  • The Inversion of Control (IoC) is a general concept, and it can be expressed in many different ways and Dependency Injection is merely one concrete example of Inversion of Control.
  • When writing a complex Java application, application classes should be as independent as possible of other Java classes (i.e. Loose Coupled) to increase the possibility to reuse these classes and to test them independently of other classes while doing unit testing.
  • So Dependency Injection helps in joining these classes together (integrated) and same time keeping them independent (Loose Coupled).
Aspect Oriented Programming (AOP)
  • One of the key components of Spring is the Aspect oriented programming (AOP) framework.
  • The functions that span (cover) multiple points of an application are called cross-cutting concerns and these cross-cutting concerns are conceptually separate from the application's business logic.
  • The key unit of modularity in OOP is the class, whereas in AOP the unit of modularity is the aspect. As DI helps you decouple your application objects from each other, AOP helps you decouple cross-cutting concerns from the objects that they affect.

Newer Post Older Post

Leave a Reply

naeemgik. Powered by Blogger.