Book Image

Software Architecture with Spring 5.0

By : René Enríquez, Alberto Salazar
Book Image

Software Architecture with Spring 5.0

By: René Enríquez, Alberto Salazar

Overview of this book

Spring 5 and its ecosystem can be used to build robust architectures effectively. Software architecture is the underlying piece that helps us accomplish our business goals whilst supporting the features that a product demands. This book explains in detail how to choose the right architecture and apply best practices during your software development cycle to avoid technical debt and support every business requirement. Choosing the right architecture model to support your business requirements is one of the key decisions you need to take when a new product is being created from scratch or is being refactored to support new business demands. This book gives you insights into the most common architectural models and guides you when and where they can be used. During this journey, you’ll see cutting-edge technologies surrounding the Spring products, and understand how to use agile techniques such as DevOps and continuous delivery to take your software to production effectively. By the end of this book, you’ll not only know the ins and outs of Spring, but also be able to make critical design decisions that surpass your clients’ expectations.
Table of Contents (21 chapters)
Title Page
Copyright and Credits
Packt Upsell

Underlying concepts and key aspects

Before looking into the details of event-driven architectures, we are going to start by learning about some key aspects surrounding them.

The applications created using this approach are developed with two different but related concepts in mind: 

  • Commands
  • Events

Let's look at a brief definition of each of these concepts.


A command is an operation performed within an application that emits one or more events as the result of a successful or failed execution. We can think about these as operations that are intended to modify the state of a system.

Commands are called actions. This makes a lot of sense if we take their intended use into consideration. The following list shows some examples of such commands:

  • Transfer money
  • Update user information
  • Create an account

It's highly recommended that you use present tense verbs for naming commands, as demonstrated with these examples.


An event is the result of a command execution within an application. These are...