Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: [OT] Re: Interface with implied Constructor Date: Mon, 15 Jul 2013 14:13:00 -0400 Organization: A noiseless patient Spider Lines: 26 Message-ID: References: <925adeb1-65b5-4a50-86a8-4f04784f8da0@googlegroups.com> <51df65bd$0$52780$742ec2ed@news.sonic.net> <51e41c16$0$52743$742ec2ed@news.sonic.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 15 Jul 2013 18:07:07 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="0d73d8cc209bff1c6395088b400d0605"; logging-data="19535"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX184bOCoN+KpFcxptSDUCDZ7" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 In-Reply-To: Cancel-Lock: sha1:ffLYwZW5fTIihtQ4V9DrYSoz/lY= Xref: csiph.com comp.lang.java.programmer:24741 On 7/15/2013 1:57 PM, Daniel Pitts wrote: > On 7/15/13 8:58 AM, Kevin McMurtrie wrote: >> In article , >> Robert Klemme wrote: >> [...] >>> I'd call that "factory pattern". Why did you pick "builder"? >> >> They're similar. I've seen the term "builder" used more often when the >> construction is done by the implementor and "factory" more often when >> the construction is performed by a single system. Builder also has a >> pattern of SomeThing a= new >> Builder().with(Options.B).add(x).add(y).addAll(Z).makeImmutable(); It's >> a way to specify arguments after construction without allowing access to >> a partially built object. >> > I would say the difference is that a builder is a type of factory which > can be configured before the factory method is invoked. Ah, the old FactoryFactory pattern. That's the second time it's been pulled on me this week! (Sorry about that, Chief.) -- Eric Sosman esosman@comcast-dot-net.invalid