官术网_书友最值得收藏!

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.

主站蜘蛛池模板: 巫溪县| 新丰县| 绍兴县| 巴南区| 绥宁县| 株洲县| 辉南县| 武穴市| 常熟市| 望都县| 平昌县| 绍兴县| 金阳县| 平潭县| 屏东市| 始兴县| 黄大仙区| 蒙山县| 金坛市| 平武县| 抚宁县| 武城县| 湖州市| 大渡口区| 龙江县| 荣昌县| 同仁县| 岳西县| 广安市| 托里县| 东丽区| 大石桥市| 辉县市| 安塞县| 轮台县| 锡林郭勒盟| 宝丰县| 巴楚县| 且末县| 百色市| 土默特右旗|