1 Spring in the real world

This chapter covers

  • What a framework is
  • When to use and when to avoid using frameworks
  • What the Spring framework is
  • Using Spring in real-world scenarios

The Spring framework (shortly, Spring) is an application framework that is part of the Java ecosystem. An application framework is a set of common software functionalities that provides a foundation structure for developing an application. An application framework eases the effort of writing an application by taking out the effort of writing all the program code from scratch.

We use Spring in the development of many kinds of applications nowadays, from large backend solutions to automation testing apps. According to many survey reports on used Java technologies (like this one of JRebel from 2020 https://www.jrebel.com/blog/2020-java-technology-report, or this one from JAXEnter: https://jaxenter.com/java-trends-top-10-frameworks-2020-168867.html), Spring is the most used Java framework today.

1.1      Why should we use frameworks?

1.2      The Spring ecosystem

1.2.1   Discovering Spring Core – the foundation of Spring

1.2.2   Using Spring Data Access feature to implement the app’s persistence

1.2.3   The Spring MVC and Spring WebFlux features for developing web apps

1.2.4   The Spring Testing feature

1.2.5   Projects from the Spring ecosystem

1.3      Spring in real-world scenarios

1.3.1  Using the Spring in the development of a backend app

1.3.2  Using Spring in a test automation app

1.3.3  Using Spring for the development of a desktop app

1.3.4  Using Spring in mobile apps

1.4      When not to use frameworks

1.4.1  You need to have a small footprint of the app

1.4.2  Security needs dictate custom code

1.4.3  Abundant existing customizations make a framework impractical

1.4.4  You won’t benefit from switching to a framework

1.5      What will you learn in this book

1.6      Summary