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 Java technologies (like this one of JRebel from 2020: http:// mng.bz/N4V7; or this one from JAXEnter: http://mng.bz/DK9a), 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 capabilities 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 Spring in the development of a backend app

1.3.2 Using Spring in a automation test 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

1.4.2 Security needs dictate custom code

1.4.3 Abundant existing customizations make a framework impractical