liveBook · Manning

Chapter 1: Spring in the real world

What you will learn in chapter 1 of Spring Start Here, Second Edition

Introduces Spring as a widely used Java/JVM application framework and explains that the book’s Java examples teach concepts applicable in other JVM languages.

After this chapter you will be able to

Section by section

Introduction

Introduces Spring as a widely used Java/JVM application framework and explains that the book’s Java examples teach concepts applicable in other JVM languages.

Key terms: Spring framework, application framework, Java/JVM ecosystem, Java examples, JVM language, Kotlin

1.1 Why should we use frameworks?

This section explains what an application framework provides and why reusing its structure and common functionality can be more effective than building everything from scratch.

Key terms: framework, opinionated architecture, predefined structure, library, business logic code, use case, plumbing, reuse

1.2 The Spring ecosystem

This section maps the main parts of the Spring ecosystem and explains, at a high level, how Spring manages application code and how several of its projects serve different needs.

Key terms: Spring ecosystem, Spring Core, Spring MVC, Spring Testing, inversion of control (IoC), IoC container, Spring context, configuration, aspects, aspecting the method

1.3 Spring in real-world scenarios

Introduces the range of applications in which Spring can be useful while cautioning that a framework is not always the right choice.

Key terms: Spring framework, backend applications, automation testing app, standalone desktop scenarios

1.3.1 Using Spring in the development of a backend app

This section describes what a backend application does and why Spring is commonly used to build one.

Key terms: backend application, client apps, server side, database, Spring ecosystem, backend applications, integration, persistence

1.3.2 Using Spring in an automation test app

The section explains why teams build and regularly run automation test apps, and how Spring can support those apps alongside testing frameworks.

Key terms: automation testing, end-to-end testing, testing app, integration tool, Spring IoC container, Spring Data, test scenarios

1.3.3 Using Spring for the development of a desktop app

The section explains how Spring components can help build maintainable desktop applications and provide features beyond object management.

Key terms: Spring IoC container, object instances, maintainability, backend, web services, remote calls, caching solution

1.4 When not to use frameworks

This section explains that frameworks are not always a good fit and identifies four situations in which to consider avoiding one.

Key terms: framework, footprint, custom code, customizations

1.4.1 You need to have a small footprint

Explains why a small application footprint can be a reason to avoid a framework, especially for serverless functions.

Key terms: containers, footprint, initialization, serverless function, framework, dependencies

1.4.2 Security needs dictate custom code

This section explains why unusually strict security requirements can lead some projects to use custom code instead of a framework.

Key terms: open-source framework, vulnerability, third-party source, stakeholders

1.4.3 Abundant existing customizations make a framework impractical

This section explains when extensive customization can make a framework a worse choice than writing the functionality without one.

Key terms: framework, components, customize

1.4.4 You won’t benefit from switching to a framework

This section argues that replacing working code with a popular framework is worthwhile only when the expected benefits justify the cost and risk, using a database-code migration as an example.

Key terms: framework, maintainable, performant, secure, JDBC, Hibernate, JdbcTemplate, proof of concept

1.5 What will you learn in this book

This section identifies the book’s intended audience and previews the Spring topics it will cover.

1.6 Questions

This section lists questions for readers to check their understanding of chapter 1; it does not explain the answers.

1.7 Summary

This summary recaps why frameworks are useful, how to evaluate one, and the breadth of the Spring ecosystem.

Where this is used later

Concepts explained in this chapter

Chapter 2: The Spring context: Defining beans →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.