Spring Framework Helps you to Develop robust Java applications very easily and very rapidly.

Arpit Dixit
IndiaNIC
Published in
4 min readJun 10, 2017
Spring Framework Helps you to Develop robust Java applications very easily and very rapidly.

Get into the Spring Framework!

Spring is the most popular application development framework for enterprise Java and spring framework is an open source java platform. It provides high performing, easily testable and reusable code. Spring handles the infrastructure as the underlying framework so that you can focus on your application. Spring is modular in design, thereby making creation, handling and linking of individual components so much easier. Spring implements Model View Container(MVC) design pattern. Spring is Framework of the Framework, Loosely Couple, Spring is Type Compatible Means, It can work with any other Frameworks and Technology.

Why Spring is Used?

  • Spring provides support to various frameworks like: Struts, Hibernate, Tapestry, EJB and JSF etc.
  • In spring framework can be used in developing any java application, but mostly it use for building web.
  • The Spring framework comprises several modules such as IOC, AOP, DAO, Context, ORM, WEB MVC etc. on top of the java EE platform.
  • Spring’s dependency injection approach encourages writing testable code.
  • Easy to use but powerful database transaction management capabilities.
  • Spring simplifies integration with other Java frameworks like JPA/Hibernate, ORM, Struts/JSF/etc. web frameworks.
  • State of the art Web MVC framework for building web applications

Features

  • Spring Data: Simplifies data access from relational and NoSQL data stores.
  • Spring Batch: Provides powerful batch processing framework.
  • Spring Security: Robust security framework to secure applications.
  • Spring Social: Supports integration with social networking sites like Facebook, Twitter, LinkedIn, GitHub, etc.
  • Spring Integration: An implementation of Enterprise Integration Patterns to facilitate integration with other enterprise applications using lightweight messaging and declarative adapters.

Core Container

  • Spring-beans- This module provides the BeanFactory which is an implementation of the Factory design pattern. In fact the spring-beans module is what makes spring framework a container. It creates and manages the objects defined the spring bean configuration files.
  • Spring-core — This module provides the dependency injection features.
  • Spring-context — Based on the core and beans module the spring-context module provides further support for internationalization, event propagation and resource loading.
  • Spring-expression — This module provides a powerful expression language to manipulate object graph at runtime

AOP and Instrumentation

  • Aspect: An aspect is a class that implements enterprise application concerns that cut across multiple classes, such as transaction management. Aspects can be a normal class configured through Spring XML configuration or we can use Spring AspectJ integration to define a class as Aspect using @Aspectannotation.
  • Join Point: A join point is the specific point in the application such as method execution, exception handling, changing object variable values etc. In Spring AOP a join points is always the execution of a method.
  • Advice: Advices are actions taken for a particular join point. In terms of programming, they are methods that gets executed when a certain join point with matching pointcut is reached in the application.
  • Pointcut: Pointcut are expressions that is matched with join points to determine whether advice needs to be executed or not. Pointcut uses different kinds of expressions that are matched with the join points and Spring framework uses the AspectJ pointcut expression language.
  • Target Object: They are the object on which advices are applied. Spring AOP is implemented using runtime proxies so this object is always a proxied object. What is means is that a subclass is created at runtime where the target method is overridden and advices are included based on their configuration.
  • AOP proxy: Spring AOP implementation uses JDK dynamic proxy to create the Proxy classes with target classes and advice invocations, these are called AOP proxy classes. We can also use CGLIB proxy by adding it as the dependency in the Spring AOP project.
  • Weaving: It is the process of linking aspects with other objects to create the advised proxy objects. This can be done at compile time, load time or at runtime. Spring AOP performs weaving at the runtime.

Data Access/ Integration

  • The spring-jdbc module provides an abstraction layer on JDBC to simplify common CRUD operations.
  • The spring-tx module provides transaction management support.
  • The spring-orm module provides classes to simplify integrating popular ORM (object relational mapping) framework/APIs such as Hibernate and JPA.
  • The spring-jms module provides provides features for producing and consuming JMS.
  • The spring-oxm module was introduced in 3.0 . It provides an abstraction layer on top of common xml parsers such as JAXB, Castor, JiBX etc.

Web

  • The spring-web module provides basic web features such as initializing the IOC container using servlet listener and creating a web application context.
  • The spring-webmvc is also known as the Web Servlet module. This module contains the spring MVC classes and REST web services implementation.
  • The spring-websocket module provides support for socket based two way communication.
  • The spring-webmvc-portlet module mirrors the webmvc module and tailors it to support JSR-168 portal development.

Read the comparison of Struts and Spring on

https://www.linkedin.com/pulse/spring-framework-helps-you-develop-robust-java-very-easily-dixit

Thank

Arpit Dixit

--

--

Arpit Dixit
IndiaNIC

Ideapreneur | Story Teller | Tech Advisor | Technology Consultant | Enterpreneur