- Spring 5 Design Patterns
- Dinesh Rajput
- 183字
- 2021-07-08 09:59:33
Prototype design pattern
The Prototype pattern comes under the creational design pattern family of GOF patterns in software development. This pattern is used to create the objects by using a clone method of objects. It is determined by a prototypical instance. In the enterprise application, object creation is costly in terms of creating and initializing the initial properties of objects. If such a type of object is already in your hand, then you go for the prototype pattern; you just copy an existing similar object instead of creating it, which is time-consuming.
This pattern involves implementing a prototype interface, it creates a clone of the current object. This pattern is used when the direct creation of the object is costly. For example, say that an object is to be created after a costly database operation. We can cache the object, returns its clone on the next request, and update the database as and when it is needed, thus reducing database calls.
- Mastering Visual Studio 2017
- Reactive Programming with Swift
- Learn Scala Programming
- 教孩子學編程:C++入門圖解
- WordPress Plugin Development Cookbook(Second Edition)
- HTML5入門經典
- Python編程:從入門到實踐
- Linux Shell核心編程指南
- Java語言程序設計教程
- Geospatial Development By Example with Python
- 深入實踐Kotlin元編程
- Mapping with ArcGIS Pro
- C++標準庫(第2版)
- Instant JRebel
- 微信小程序開發實戰教程(PHP+Laravel+MySQL)(微課版)