Book description
Learn various design patterns and best practices in Spring 5 and use them to solve common design problems.
About This Book
- Explore best practices for designing an application
- Manage your code easily with Spring's Dependency Injection pattern
- Understand the benefits that the right design patterns can offer your toolkit
Who This Book Is For
This book is for developers who would like to use design patterns to address common problems while designing an app using the Spring Framework and Reactive Programming approach. A basic knowledge of the Spring Framework and Java is assumed.
What You Will Learn
- Develop applications using dependency injection patterns
- Learn best practices to design enterprise applications
- Explore Aspect-Oriented Programming relating to transactions, security, and caching.
- Build web applications using traditional Spring MVC patterns
- Learn to configure Spring using XML, annotations, and Java.
- Implement caching to improve application performance.
- Understand concurrency and handle multiple connections inside a web server.
- Utilizing Reactive Programming Pattern to build Reactive web applications.
In Detail
Design patterns help speed up the development process by offering well tested and proven solutions to common problems. These patterns coupled with the Spring framework offer tremendous improvements in the development process.
The book begins with an overview of Spring Framework 5.0 and design patterns. You will understand the Dependency Injection pattern, which is the main principle behind the decoupling process that Spring performs, thus making it easier to manage your code. You will learn how GoF patterns can be used in Application Design. You will then learn to use Proxy patterns in Aspect Oriented Programming and remoting. Moving on, you will understand the JDBC template patterns and their use in abstracting database access. Then, you will be introduced to MVC patterns to build Reactive web applications. Finally, you will move on to more advanced topics such as Reactive streams and Concurrency.
At the end of this book, you will be well equipped to develop efficient enterprise applications using Spring 5 with common design patterns
Style and approach
The book takes a pragmatic approach, showing various design patterns and best-practice considerations, including the Reactive programming approach with the Spring 5 Framework and ways to solve common development and design problems for enterprise applications.
Table of contents
- Preface
-
Getting Started with Spring Framework 5.0 and Design Patterns
- Introducing Spring Framework
- Simplifying application development using Spring and its pattern
- Using a Spring container to manage beans with the Factory pattern
- Life of a bean in the container
- Spring modules
- New features in Spring Framework 5.0
- Summary
- Overview of GOF Design Patterns - Core Design Patterns
-
Consideration of Structural and Behavioral Patterns
-
Examining the core design patterns
- Structural design patterns
- Behavioral design patterns
- JEE design patterns
- Summary
-
Examining the core design patterns
-
Wiring Beans using the Dependency Injection Pattern
- The dependency injection pattern
- Types of dependency injection patterns
- Configuring the dependency injection pattern with Spring
- Dependency injection pattern with Java-based configuration
- Dependency injection pattern with XML-based configuration
- Dependency injection pattern with Annotation-based configuration
- Best practices for configuring the DI pattern
- Summary
- Understanding the Bean Life Cycle and Used Patterns
- Spring Aspect Oriented Programming with Proxy and Decorator pattern
- Accessing a Database with Spring and JDBC Template Patterns
- Accessing Database with Spring ORM and Transactions Implementing Patterns
-
Improving Application Performance Using Caching Patterns
- What is cache?
- Understanding cache abstraction
- Enabling caching via the Proxy pattern
- Declarative Annotation-based caching
- Declarative XML-based caching
- Configuring the cache storage
- Third-party cache implementations
- Creating custom caching annotations
- Top caching best practices to be used in a web application
- Summary
-
Implementing the MVC Pattern in a Web Application using Spring
- Implementing the MVC pattern in a web application
- Model 2 architecture MVC pattern with Spring
- Enabling the Spring MVC
- Passing model data to the view
- Data binding with Command Design pattern
- Validating forms input parameters
- Implementing View in the MVC pattern
- Best practices for web application design
- Summary
- Implementing Reactive Design Patterns
- Implementing Concurrency Patterns
Product information
- Title: Spring 5 Design Patterns
- Author(s):
- Release date: October 2017
- Publisher(s): Packt Publishing
- ISBN: 9781788299459
You might also like
book
Spring MVC: Designing Real-World Web Applications
Unleash the power of Spring MVC and build enterprise-grade, lightning-fast web applications About This Book Configure …
book
Design Patterns and Best Practices in Java
Create various design patterns to master the art of solving problems using Java About This Book …
video
Spring MVC for Java Developers
This screencast is designed to teach novice-level Java developers how to efficiently build well structured Java …
book
Spring Boot 2.0 Projects
Develop diverse real-life projects including most aspects of Spring Boot Key Features Run production-grade based applications …