Spring Framework for Web Technologies

Spring Framework is an open source application framework for java based platforms. It is used to build Web applications along with the use of Java Enterprise Edition (J2EE). It is very popular in Java Developer Community. It is highly lightweight and occupies only 2MB of storage space. It uses POJO (Plain Old Java Object) Development model to create faster J2EE applications.

Components of Spring Framework and its Architecture

Spring Framework architecture is a modular type of architecture. That means it is made up of multiple modules in the containers mentioned below:

  1. Test: It is the first and the lowest layer of Spring Architecture
  2. Core Container: It contains modules like Core, Beans, Context, and Regular Expressions etc.
  3. AOP (Aspect Oriented Programming), Aspects and Instrumentation
  4. Data Access integration: It contains modules like JDBC, ORM (Object Relational Mapping), OXM (Object XML Model), JMS (Java Messaging Service) and Transaction
  5. Web: This layer contains web connectivity and client-server connection modules like MVC, Web Socket Module, Web Portlet.

    Spring Framework Architecture

Advantages of Spring Framework

  1. Easy testing capabilities
  2. Lightweight and non invasive
  3. Fast Development Framework like JTA, JDBC, JMS etc. can be used along with Spring
  4. Powerful Abstraction implementation
  5. High validation and transaction support

Key features of Spring Framework

AOP (Aspect Oriented Programming)

AOP is a key element of this framework. In AOP the users are able to handle aspects like caching, logging, security, declarative transactions etc. AOP is used to conduct Aspect Oriented Implementation of Spring framework. Similar to a class in OOP (Object Oriented Programming), AOP is based on the concept of an Aspect.

Dependency Injection

DI or Dependency Injection keeps the Spring Framework application classes independent from other Java classes in the programming interface or API. We are able to integrate these independent classes by using DI. ‘D’ means Dependency which is an association of two classes. ‘I’ stands for Injection which is implementation of other classes with the help of the previous class.

Basic Steps to create a Application using Spring Framework

  1. Create a Java project in any IDE available like Eclipse IDE or NetBeans
  2. Install and add all the required Spring Framework Libraries that will be used in Spring Implementation
  3. Create Source Files for the Java program created in the 1st step
  4. Create Bean Configuration page inside the SRC directory to bind the classes together
  5. Run the program and deploy the application

Be First to Comment

Leave a Reply

Your email address will not be published.