DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Because the DevOps movement has redefined engineering responsibilities, SREs now have to become stewards of observability strategy.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Related

  • Graceful Shutdown: Spring Framework vs Golang Web Services
  • Actuator Enhancements: Spring Framework 6.2 and Spring Boot 3.4
  • Implementing Exponential Backoff With Spring Retry
  • Structured Logging in Spring Boot 3.4 for Improved Logs

Trending

  • MCP Servers: The Technical Debt That Is Coming
  • Event Driven Architecture (EDA) - Optimizer or Complicator
  • GitHub Copilot's New AI Coding Agent Saves Developers Time – And Requires Their Oversight
  • Scaling Microservices With Docker and Kubernetes on Production
  1. DZone
  2. Coding
  3. Frameworks
  4. Why Is the Spring Framework so Popular?

Why Is the Spring Framework so Popular?

Want to learn more about why the Spring framework is so popular amongst Java developers? Check out this post to learn more!

By 
Rinu Gour user avatar
Rinu Gour
·
Oct. 15, 18 · Analysis
Likes (16)
Comment
Save
Tweet
Share
86.9K Views

Join the DZone community and get the full member experience.

Join For Free

Spring Framework Features - Why Spring Framework is Popular



Spring Framework Features

Spring is a powerful, lightweight framework used for application development. In broader terms, you can say that the Spring framework is a well-defined tool that supports several web applications using Java as a programming language.

Before the launching of the framework in the IT Sector, the applications were developed using JEE standards. With these standards, we can deploy an application on any JEE application server. But, it had several problems, including:

  • Code became very complicated as application progressed.
  • Performance of the system got affected due to the heaviness of the applications.
  • The look-up problem of the component.

These problems were solved with the introduction of the Spring framework. The Spring framework became prominent in the market due to basic Spring framework features, which are its modularity. That is, it can be divided into different modules, each serving their own functionality.

Most Important Features of the Spring Framework

i. Lightweight

The Spring Framework is very lightweight with respect to its size and functionality. This is due to its POJO implementation, which doesn’t force it to inherit any class or implement any interfaces.

ii. Aspect-Oriented Programming (AOP)

This is an important part of the Spring Framework. Aspect-Oriented Programming is used for separating cross-cutting concerns (for example, logging, security, etc.) from the business logic of the application. In the coming articles, you will be learning about this in greater detail.

iii. Transaction Management

This is used to unify several transaction management APIs and is used to coordinate transactions for Java objects. Also, it is not tied to the J2EE environment and is used with containerless environments.

iv. Container

The Spring framework designs and manages the lifecycle and configurations of application objects.

v. Dependency Injection

This feature of the Spring Framework allows you to develop loosely coupled applications. Therefore, the unit testing of these loosely coupled applications becomes easier. This also allows the developer to swap out some of the modules according to its need.

vi. Integration With Other Frameworks

A great thing about this framework is that it doesn’t try to solve the problems that have already been solved. It just tries to integrate them with its framework, which provides a solution to greater problems. For example, this could include IBATIS, Hibernate, Toplink, etc.

Features of Spring 5.0

Now, major enhancements are done since the introduction of Spring framework by Rod Johnson in 2003. Several versions have been released after its first. As of now, Spring 5.0x versions are on the market. So, let’s run down to the major upgraded features and enhancements of Spring 5.0 with Java 8 as a minimum requirement across all coding bases and the compatibility of JDK 9 at runtime, as well as for the build and test suit:

Spring Framework Features - Why Spring Framework is Popular

a. JDK 8 Plus 9 and Java EE 7 Baseline

The Spring framework codebase is based on the code level from Java 8. This code level provides readability using inferred generics, and the conditional support for Java 8 is directly provided in the code. Now, Java EE 7 API level is required in Spring modules along with Servlet 3.1, JMS2.0, JPA2.1, and Bean validation1.1. Recent servers, such as Jetty 9.3+, Tomcat 8.5+, and WildFly10+, have been added to Spring 5.0. The compatibility of JDK 9 has been added at runtime, as well as for the build and test suit.

b. Removal of Classes, Methods, and Packages

The package mock.staticmock has been removed from the Spring module, along with the support for  AnnotationDrivenStaticEntityMockingControl. The minimum requirement is Tiles3 and Hibernate5, which means packages web.view.tiles2 and form.hibernate3/orm.hibernate4 drop. Spring 5.0 has also withdrawn its support for Portlet, Velocity, XMLBeans, Guava, JDO, and JasperReports. Therefore, those who need them to work are recommended to use the Spring Framework 4.3.x. Many of these deprecated methods and classes have been removed with some compromises for commonly used methods in the Spring ecosystem.

c. Core Container Enhancements

With the introduction of Spring 5.0, there are major upgrades made in the Core container. These are as follows:

i. JDK 8+ Improvements

  • Some declarations of Java 8 methods in core Spring framework interfaces
  • Use of Standard Charsets from JDK 7
  • Efficient parameter method access using Java 8

ii. JDK 9 Preparations

  • Using revised exceptional handling consistency of initialization for the constructor is done.

iii. XML Related Upgrades

  • XML namespaces streamline for non-versioned schemas
  • No support for deprecated features along with a resolution for latest XSD files
  • Version-specific declarations continue to support but are validated

d. Reactive Programming Model

The Spring framework’s latest version has several changes with respect to the Reactive Programming model. One major change being the use of the Spring core data buffer, along with encoder/decoder abstractions and spring-web HTTP message codec implementations with XML and JSON support. Also, the new WebClient and the new Spring Web Reactive module introduces reactive support for the @Controller model adapting Servlet3.1 as well as non-Servlets runtime containers, for example, Undertow.

e. General Web Improvements

In web improvements, unified support for media type resolution is provided using MediaTypeFactory. Also, the full Servel 3.1 support is provided to Spring framework, along with Protobuf 3.0 support in version 5.

f. Testing Improvements

With the introduction of this version, major changes are made to the testing environment of the Spring framework.

i. Complete support to Junit 5’s Jupiter programming in the SpringTestContext framework.

  •  SpringExtension is an implementation of several API extensions from Jupiter that provide full support for an existing feature of the TestContext framework, which enables using @ExtendWith a SpringExtention.class.
  •  @SpringJUintConfig, which combines @ExtendedWith from Jupiter with @ContextConfigurationfrom  (a TestContext framework).
  •  @SpringJunitWebConfig, an annotation that combines @ExtendedWith from Jupiter with the @ContextConfiguration and the @WebAppConfiguration of a TestContext framework.

ii. New test execution callback methods introduced in the Spring TestContext framework using TestNG and JUnit 5 via SpringRunner.

iii. XMLUnit support is upgraded to version 2.2.

Conclusion

Hence, in this Spring framework tutorial, you have seen the various Spring framework features. Also, the new upgrades in the testing environment, web services, and XML-related code add to the latest features of the Spring 5.x framework from the previous Spring 4.3.x framework. Still, if you have any doubt, leave a note in the comments section below!

Spring Framework Framework

Published at DZone with permission of Rinu Gour. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Graceful Shutdown: Spring Framework vs Golang Web Services
  • Actuator Enhancements: Spring Framework 6.2 and Spring Boot 3.4
  • Implementing Exponential Backoff With Spring Retry
  • Structured Logging in Spring Boot 3.4 for Improved Logs

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!