Wayback Machine
508 captures
18 Dec 2003 - 02 Mar 2026
Aug SEP Oct
16
2019 2020 2021
success
fail

About this capture

COLLECTED BY

Organization: Archive Team

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

History is littered with hundreds of conflicts over the future of a community, group, location or business that were "resolved" when one of the parties stepped ahead and destroyed what was there. With the original point of contention destroyed, the debates would fall to the wayside. Archive Team believes that by duplicated condemned data, the conversation and debate can continue, as well as the richness and insight gained by keeping the materials. Our projects have ranged in size from a single volunteer downloading the data to a small-but-critical site, to over 100 volunteers stepping forward to acquire terabytes of user-created data to save for future generations.

The main site for Archive Team is at archiveteam.org and contains up to the date information on various projects, manifestos, plans and walkthroughs.

This collection contains the output of many Archive Team projects, both ongoing and completed. Thanks to the generous providing of disk space by the Internet Archive, multi-terabyte datasets can be made available, as well as in use by the Wayback Machine, providing a path back to lost websites and work.

Our collection has grown to the point of having sub-collections for the type of data we acquire. If you are seeking to browse the contents of these collections, the Wayback Machine is the best first stop. Otherwise, you are free to dig into the stacks to see what you may find.

The Archive Team Panic Downloads are full pulldowns of currently extant websites, meant to serve as emergency backups for needed sites that are in danger of closing, or which will be missed dearly if suddenly lost due to hard drive crashes or server failures.

Collection: ArchiveBot: The Archive Team Crowdsourced Crawler

ArchiveBot is an IRC bot designed to automate the archival of smaller websites (e.g. up to a few hundred thousand URLs). You give it a URL to start at, and it grabs all content under that URL, records it in a WARC, and then uploads that WARC to ArchiveTeam servers for eventual injection into the Internet Archive (or other archive sites).

To use ArchiveBot, drop by #archivebot on EFNet. To interact with ArchiveBot, you issue commands by typing it into the channel. Note you will need channel operator permissions in order to issue archiving jobs. The dashboard shows the sites being downloaded currently.

There is a dashboard running for the archivebot process at http://www.archivebot.com.

ArchiveBot's source code can be found at https://github.com/ArchiveTeam/ArchiveBot.

TIMESTAMPS
loading
The Wayback Machine - http://web.archive.org/web/20200916152018/https://en.wikipedia.org/wiki/Builder_pattern

Builder pattern

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

The builder pattern is a design pattern designed to provide a flexible solution to various object creation problems in object-oriented programming. The intent of the Builder design pattern is to separate the construction of a complex object from its representation. It is one of the Gang of Four design patterns.

Contents

  • 1 Overview
  • 2 Definition
  • 3 Advantages
  • 4 Disadvantages
  • 5 Structure
    • 5.1 UML class and sequence diagram
    • 5.2 Class diagram
  • 6 Examples
    • 6.1 C#
  • 7 See also
  • 8 References
  • 9 External links

Overview[edit]

The Builder design pattern is one of the GoF design patterns[1] that describe how to solve recurring design problems in object-oriented software.

The Builder design pattern solves problems like:[2]

  • How can a class (the same construction process) create different representations of a complex object?
  • How can a class that includes creating a complex object be simplified?

Creating and assembling the parts of a complex object directly within a class is inflexible. It commits the class to creating a particular representation of the complex object and makes it impossible to change the representation later independently from (without having to change) the class.

The Builder design pattern describes how to solve such problems:

  • Encapsulate creating and assembling the parts of a complex object in a separate Builder object.
  • A class delegates object creation to a Builder object instead of creating the objects directly.

A class (the same construction process) can delegate to different Builder objects to create different representations of a complex object.

Definition[edit]

The intent of the Builder design pattern is to separate the construction of a complex object from its representation. By doing so the same construction process can create different representations.[1]

Advantages[edit]

Advantages of the Builder pattern include:[3]

  • Allows you to vary a product's internal representation.
  • Encapsulates code for construction and representation.
  • Provides control over steps of construction process.

Disadvantages[edit]

Disadvantages of the Builder pattern include:[3]

  • Requires creating a separate ConcreteBuilder for each different type of product.
  • Requires the builder classes to be mutable.
  • Dependency injection may be less supported.

Structure[edit]

UML class and sequence diagram[edit]

A sample UML class and sequence diagram for the Builder design pattern.[4]

In the above UML class diagram, the Director class doesn't create and assemble the ProductA1 and ProductB1 objects directly. Instead, the Director refers to the Builder interface for building (creating and assembling) the parts of a complex object, which makes the Director independent of which concrete classes are instantiated (which representation is created). The Builder1 class implements the Builder interface by creating and assembling the ProductA1 and ProductB1 objects.
The UML sequence diagram shows the run-time interactions: The Director object calls buildPartA() on the Builder1 object, which creates and assembles the ProductA1 object. Thereafter, the Director calls buildPartB()onBuilder1, which creates and assembles the ProductB1 object.

Class diagram[edit]

Builder Structure
Builder
Abstract interface for creating objects (product).
ConcreteBuilder
Provides implementation for Builder. It is an object able to construct other objects. Constructs and assembles parts to build the objects.

Examples[edit]

C#[edit]

/// <summary>
/// Represents a product created by the builder
/// </summary>
public class Car
{
    public string Make { get; set; }
    public string Model { get; set; }
    public int NumDoors { get; set; }
    public string Colour { get; set; }

    public Car(string make, string model, string colour, int numDoors)
    {
        Make = make;
        Model = model;
        Colour = colour;
        NumDoors = numDoors;
    }
}

/// <summary>
/// The builder abstraction
/// </summary>
public interface ICarBuilder
{
    string Colour { get; set; }
    int NumDoors { get; set; }

    Car GetResult();
}

/// <summary>
/// Concrete builder implementation
/// </summary>
public class FerrariBuilder : ICarBuilder
{
    public string Colour { get; set; }
    public int NumDoors { get; set; }

    public Car GetResult()
    {
        return NumDoors == 2 ? new Car("Ferrari", "488 Spider", Colour, NumDoors) : null;        
    }
}

/// <summary>
/// The director
/// </summary>
public class SportsCarBuildDirector
{
    private ICarBuilder _builder;
    public SportsCarBuildDirector(ICarBuilder builder) 
    {
        _builder = builder;
    }

    public void Construct()
    {
        _builder.Colour = "Red";
        _builder.NumDoors = 2;
    }
}

public class Client
{
    public void DoSomethingWithCars()
    {

        var builder = new FerrariBuilder();
        var director = new SportsCarBuildDirector(builder);

        director.Construct();
        Car myRaceCar = builder.GetResult();
    }
}

The Director assembles a car instance in the example above, delegating the construction to a separate builder object that has been given to the Director by the Client.

See also[edit]

  • Currying

References[edit]

  1. ^ a b Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides (1994). Design Patterns: Elements of Reusable Object-Oriented Software. Addison Wesley. pp. 97ff. ISBN 0-201-63361-2.CS1 maint: multiple names: authors list (link)
  • ^ "The Builder design pattern - Problem, Solution, and Applicability". w3sDesign.com. Retrieved 2017-08-13.
  • ^ a b "Index of /archive/2010/winter/51023-1/presentations" (PDF). www.classes.cs.uchicago.edu. Retrieved 2016-03-03.
  • ^ "The Builder design pattern - Structure and Collaboration". w3sDesign.com. Retrieved 2017-08-12.
  • External links[edit]

    The Wikibook Computer Science Design Patterns has a page on the topic of: Builder implementations in various languages
    • The JavaWorld article Build user interfaces without getters and setters (Allen Holub) shows the complete Java source code for a Builder.
    • v
  • t
  • e
  • Software design patterns
    Creational

    • Abstract factory
    • Builder
    • Dependency injection
    • Factory method
    • Lazy initialization
    • Multiton
    • Object pool
    • Prototype
    • RAII
    • Singleton

    Structural

    • Adapter
    • Bridge
    • Composite
    • Decorator
    • Delegation
    • Facade
    • Flyweight
    • Front controller
    • Marker interface
    • Module
    • Proxy
    • Twin

    Behavioral

    • Blackboard
    • Chain of responsibility
    • Command
    • Interpreter
    • Iterator
    • Mediator
    • Memento
    • Null object
    • Observer
    • Servant
    • Specification
    • State
    • Strategy
    • Template method
    • Visitor

    Functional

    • Monoid
    • Functor
    • Applicative
    • Monad
    • Comonad
    • Free monad
    • HOF
    • Currying
    • Function composition
    • Closure
    • Generator

    Concurrency

    • Active object
    • Actor
    • Balking
    • Barrier
    • Binding properties
    • Coroutine
    • Compute kernel
    • Double-checked locking
    • Event-based asynchronous
    • Fiber
    • Futex
    • Futures and promises
    • Guarded suspension
    • Immutable object
    • Join
    • Lock
    • Messaging
    • Monitor
    • Nuclear
    • Proactor
    • Reactor
    • Read write lock
    • Scheduler
    • STM
    • Thread pool
    • Thread-local storage

    Architectural

    • ADR
    • Active record
    • Broker
    • Client–server
    • CBD
    • DAO
    • DTO
    • DDD
    • ECB
    • ECS
    • EDA
    • Front controller
    • Identity map
    • Interceptor
    • Implicit invocation
    • Inversion of control
    • Model 2
    • MOM
    • Microservices
    • MVA
    • MVC
    • MVP
    • MVVM
    • Monolithic
    • Multitier
    • Naked objects
    • ORB
    • P2P
    • Publish–subscribe
    • PAC
    • REST
    • SOA
    • Service locator
    • Specification

    Cloud
    Distributed

    • Ambassador
    • Anti-Corruption Layer
    • Bulkhead
    • Cache-Aside
    • Circuit Breaker
    • CQRS
    • Compensating Transaction
    • Competing Consumers
    • Compute Resource Consolidation
    • Event Sourcing
    • External Configuration Store
    • Federated Identity
    • Gatekeeper
    • Index Table
    • Leader Election
    • MapReduce
    • Materialized View
    • Pipes
    • Filters
    • Priority Queue
    • Publisher-Subscriber
    • Queue-Based Load Leveling
    • Retry
    • Scheduler Agent Supervisor
    • Sharding
    • Sidecar
    • Strangler
    • Throttling
    • Valet Key

    Other

    • Business delegate
    • Composite entity
    • Intercepting filter
    • Lazy loading
    • Mangler
    • Mock object
    • Type tunnel
    • Method chaining

    Books

    • Design Patterns
    • Enterprise Integration Patterns
    • Code Complete
    • POSA

    People

    • Christopher Alexander
    • Erich Gamma
    • Ralph Johnson
    • John Vlissides
    • Grady Booch
    • Kent Beck
    • Ward Cunningham
    • Martin Fowler
    • Robert Martin
    • Jim Coplien
    • Douglas Schmidt
    • Linda Rising

    Communities

    • The Hillside Group
    • The Portland Pattern Repository

    Retrieved from "https://en.wikipedia.org/w/index.php?title=Builder_pattern&oldid=968767778"
    Categories:
    • Software design patterns
    Hidden categories:
    • CS1 maint: multiple names: authors list
  • Articles with example Java code
  • Navigation menu

    Personal tools

    • Not logged in
  • Talk
  • Contributions
  • Create account
  • Log in
  • Namespaces

    • Article
  • Talk
  • Variants

    Views

    • Read
  • Edit
  • View history
  • More

    Navigation

    • Main page
  • Contents
  • Current events
  • Random article
  • About Wikipedia
  • Contact us
  • Donate
  • Wikipedia store
  • Contribute

    • Help
  • Community portal
  • Recent changes
  • Upload file
  • Tools

    • What links here
  • Related changes
  • Upload file
  • Special pages
  • Permanent link
  • Page information
  • Cite this page
  • Wikidata item
  • Print/export

    • Download as PDF
  • Printable version
  • In other projects

    • Wikimedia Commons
  • Wikibooks
  • Languages

    • العربية
  • Български
  • Català
  • Čeština
  • Deutsch
  • Español
  • فارسی
  • Français
  • 한국어
  • Հայերեն
  • Italiano
  • Magyar
  • 日本語
  • Polski
  • Português
  • Русский
  • Српски / srpski
  • Svenska
  • Українська
  • 中文
  • Edit links
    • This page was last edited on 21 July 2020, at 11:22 (UTC).
    • Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.
    • Privacy policy
    • About Wikipedia
    • Disclaimers
    • Contact Wikipedia
    • Mobile view
    • Developers
    • Statistics
    • Cookie statement
    • Wikimedia Foundation
    • Powered by MediaWiki