liveBook · Manning

Spring

As explained in Spring Start Here, Second Edition

Spring Framework is an open-source Java framework for building enterprise and web applications.

Spring is an application framework for the Java/JVM ecosystem. It supplies reusable capabilities and structure for applications ranging from backend systems to testing tools. Spring is also an ecosystem of projects, rather than just one framework. section 1.0 section 1.7

Spring works through inversion of control: instead of application code controlling all execution, the framework manages the application according to its configuration. Spring Core provides the Spring context, which manages application instances, as well as aspects that can intercept methods. section 1.2

Figure 1.4 Inversion of control. Instead of executing its own code, which makes use of several other dependencies, in an IoC scenario, the app execution is controlled by the dependency. The Spring framework controls an app during its execution. Therefore, Spring implements an IoC scenario of execution.

The diagram contrasts application-controlled execution with execution controlled by Spring. section 1.2

Spring provides capabilities for different application tasks:

  • Spring MVC helps build web applications that serve HTTP requests. section 1.2
  • Spring Data Access provides tools for connecting to SQL databases and implementing persistence. section 1.2
  • Spring Testing provides tools for writing application tests. section 1.2

A banking backend

A backend managing bank transactions might serve both web and mobile clients, store data in a database, and communicate with other backend systems. Spring provides tools for tasks such as database access and integration with other applications. section 1.3.1

Spring Boot is a Spring ecosystem project that reduces configuration by supplying defaults and dependency starters. For a minimal web request-response flow, Boot can configure the servlet container and Spring MVC components; you provide a controller and the HTML response. Annotations such as @Controller and @RequestMapping identify the controller and map its actions to requests. section 7.5

Spring is not automatically the best choice for every task. Consider avoiding a framework when a very small application footprint is essential, security requirements demand custom code, extensive customization would cost more than writing the functionality directly, or migrating an existing application offers no benefit. section 1.4

How Spring Start Here, Second Edition covers it

How deep it goes
Explains inversion of control and core capabilities, then outlines Spring Boot configuration and a minimal web request-response flow.
Examples
Uses a banking backend with web and mobile clients, a database, and other backend systems.
What you can do after
Apply Spring via Spring Boot to configure a minimal web request-response flow.
How it connects
Connects Spring to inversion of control, Spring MVC, database persistence, and Spring Boot.

Also explained in

Compare how 5 books explain Spring →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Spring Start Here, Second Edition. The section links point to the parts of the book it draws on.