Name
The name is auto descriptive.
Intention
Initialize the data of a new object from another one. This pattern is usefull when applying to objects with the following properties:
- Complex. The data needed to describe it is large (sometimes requiring many forms).
- Similar. Some of the objects are quite similar (have many data in common).
Canonical Example
In ERP like applications a Product can be very complex, besides the basic data (Name, Description) a lot of more data is needed (accounting, production, sale, etc.). Also some products are similar to others, like different shoes or food.
In this case when creating a new product having the Copy To functionality can save lot of keystrokes.
Implementation