java-design mode (created)-"builder mode"

Source: Internet
Author: User

1.BuilderMode

Definition: Separates the construction of a complex object from its representation so that the same build process can create different representations . [Construction and presentation separation, different representations of construction]

For example, a car is made up of many parts. Parts are different and assembled in different ways.

The difference from the abstract factory: in the builder model, there is a mentor who manages the builder, and the user is in contact with the mentor,

The instructor contacted the builder and finally got the product. That is, the construction model can enforce a process of construction in stages.

Usage scenarios:

1 . When creating complex objects, the algorithm should be independent of the parts of the object and how they are assembled. 2, when the construction process must allow the constructed object to have different representations . 2. Illustrations

java-design mode (created)-"builder mode"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.