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

  • Spring 5 Design Patterns
  • Dinesh Rajput
  • 155字
  • 2021-07-08 09:59:30

Creational design patterns

Let's look at the underlying design patterns of this category and how Spring Framework adopts them to provide loose coupling between components and create and manage the lifecycle of Spring components. Creational design patterns are associated with the method of object creation. The creation logic of the object is hidden to the caller of this object.

We are all aware of how to create an object using the new keyword in Java, as follows:

     Account account = new Account(); 

But this way is not suitable for some cases, because it is a hardcoded way of creating an object. It is also not a best practice to create an object because the object might be changed according to the nature of the program. Here, the creational design pattern provides the flexibility to create an object according to the nature of the program.

Now let's look at the different design patterns under this category.

主站蜘蛛池模板: 砚山县| 陕西省| 营山县| 翁牛特旗| 渭源县| 青田县| 康马县| 高陵县| 辽源市| 临颍县| 丰宁| 江油市| 微山县| 绥滨县| 蓬安县| 民乐县| 孟村| 丰台区| 偃师市| 夹江县| 虞城县| 江西省| 连云港市| 泸溪县| 石棉县| 横山县| 阿尔山市| 黄龙县| 班玛县| 嘉义市| 那坡县| 高台县| 长兴县| 邹城市| 宝兴县| 南昌市| 广南县| 信宜市| 穆棱市| 莱阳市| 重庆市|