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

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.

主站蜘蛛池模板: 庆安县| 泸定县| 承德县| 霍林郭勒市| 铁岭县| 苏州市| 阿克苏市| 佛学| 南乐县| 文水县| 南和县| 湘乡市| 原平市| 四会市| 丰台区| 和林格尔县| 盐源县| 彝良县| 灵丘县| 清涧县| 吉首市| 牟定县| 井研县| 陈巴尔虎旗| 云安县| 简阳市| 大姚县| 柳州市| 霍山县| 新建县| 凤翔县| 贡觉县| 都江堰市| 天等县| 红原县| 衡东县| 将乐县| 富锦市| 佛学| 拜城县| 陆良县|