- Spring 5 Design Patterns
- Dinesh Rajput
- 383字
- 2021-07-08 09:59:25
Simplifying application development using Spring and its pattern
Developing an enterprise application using the traditional Java platform has a lot of limitations when it comes to organizing the basic building blocks as individual components for reusability in your application. Creating reusable components for basic and common functionality is best design practice, so you cannot ignore it. To address the reusability problem in your application, you can use various design patterns, such as the Factory pattern, Abstract Factory pattern, Builder pattern, Decorator pattern, and Service Locator pattern, to compose the basic building blocks into a coherent whole, such as class and object instances, to promote the reusability of components. These patterns address the common and recursive application problems. Spring Framework simply implements these patterns internally, providing you with an infrastructure to use in a formalized way.
There are lots of complexities in enterprise application development, but Spring was created to address these, and makes it possible to simplify the process for developers. Spring isn't only limited to server-side development--it also helps simplifies things regarding building projects, testability, and loose coupling. Spring follows the POJO pattern, that is, a Spring component can be any type of POJO. A component is a self-contained piece of code that ideally could be reused in multiple applications.
Since this book is focused on all design patterns that are adopted by the Spring Framework to simplify Java development, we need to discuss or at least provide some basic implementation and consideration of design patterns and the best practices to design the infrastructure for enterprise application development. Spring uses the following strategies to make java development easy and testable:
- Spring uses the power of the POJO pattern for lightweight and minimally invasive development of enterprise applications
- It uses the power of the dependency injection pattern (DI pattern) for loose coupling and makes a system interface oriented
- It uses the power of the Decorator and Proxy design pattern for declarative programming through aspects and common conventions
- It uses the power of the Template Design pattern for eliminating boilerplate code with aspects and templates
In this chapter, I'll explain each of these ideas, and also show concrete examples of how Spring simplifies Java development. Let's start with exploring how Spring remains minimally invasive by encouraging POJO-oriented development by using the POJO pattern.
- Visual Basic .NET程序設計(第3版)
- 控糖控脂健康餐
- Mastering Concurrency in Go
- NumPy Essentials
- 名師講壇:Java微服務架構實戰(SpringBoot+SpringCloud+Docker+RabbitMQ)
- Learning Python by Building Games
- Gradle for Android
- C語言程序設計
- Visual Studio 2015高級編程(第6版)
- 編寫高質量代碼:改善Objective-C程序的61個建議
- Node學習指南(第2版)
- Python數據可視化之美:專業圖表繪制指南(全彩)
- Learning iOS Security
- Python機器學習與量化投資
- 交互設計師成長手冊:從零開始學交互