- 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.
- Learn ECMAScript(Second Edition)
- ExtGWT Rich Internet Application Cookbook
- 基于粒計算模型的圖像處理
- Java Web及其框架技術
- Access 2010數據庫基礎與應用項目式教程(第3版)
- 微信小程序入門指南
- Hands-On Natural Language Processing with Python
- C語言程序設計教程
- Learning Raspbian
- Mastering Web Application Development with AngularJS
- ScratchJr趣味編程動手玩:讓孩子用編程講故事
- 軟件工程基礎與實訓教程
- JavaScript機器人編程指南
- Qt 4開發實踐
- Head First Kotlin程序設計