Skip to main content

[Spring] What is Spring? Why do we use Spring?

If you are into being a Java developer, you probably would have heard about Spring here and there. What is it, and why is it so popular?

Framework

First of all, to understand what Spring is for, we need to know what a framework is. 

A framework is an abstraction that provides a standard way to build and deploy applications. It is like a set of different components that facilitate the development of software applications. 

Why are frameworks used in the industry?
  • Minimize boilerplate code, thus letting people focus on core tasks.
  • Make use of various design patterns.
  • Enforce people to follow specific guidelines, thus maintaining consistency.

Spring Framework

Spring is an open-sourced framework for the Java platform, where its core features can be used by Java applications. As such, it has all the characteristics of a framework mentioned above. The main goal and features of Spring are:
  • Allow lightweight development with Java POJOs (Plain Old Java Objects) without being dependent on Java EE.
  • Promote loose coupling through dependency injection & Inversion of Control.
  • Encourages declarative programming with Aspect-Oriented-Programming (AOP), thus increasing modularity by allowing separation of concerns. Thanks to AOP, it is possible to add functionality to objects declaratively, without having to modify the code.
  • As a lightweight container, deals with lifecycle of each object/bean such as its instantiation.
  • Reduces the amount of code through the use of helper classes.
  • Supports Test-Driven-Development with the use of mock objects and out-of-container testing.

Spring Projects

Spring has various modules built on top of its core framework, so that users can choose the ones that they need. spring.io lists all projects available in Spring.


One of the most popular projects is Spring Boot, which is for creating stand-alone, production-grade Spring applications with simplified configurations. 


Conclusion

This was a somewhat simple explanation of what Spring is, and how it is useful in production. For a java developer, Spring is one of the frameworks one must know to be able to join the development team.




Comments

Popular posts from this blog

IntelliJ IDEA Error: Cannot determine path to 'tools.jar' library for 17

[Spring] Spring Inversion of Control(IoC) through XML Configuration

[Spring] Spring MVC Configuration - How to set up Spring MVC in IntelliJ