<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://wiki.apidesign.org/skins/common/feed.css?116"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.apidesign.org/index.php?action=history&amp;feed=atom&amp;title=Factory</id>
		<title>Factory - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.apidesign.org/index.php?action=history&amp;feed=atom&amp;title=Factory"/>
		<link rel="alternate" type="text/html" href="http://wiki.apidesign.org/index.php?title=Factory&amp;action=history"/>
		<updated>2026-04-11T01:23:56Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.12.0rc1</generator>

	<entry>
		<id>http://wiki.apidesign.org/index.php?title=Factory&amp;diff=1667&amp;oldid=prev</id>
		<title>JaroslavTulach: APIDesignPatterns:Factory moved to Factory</title>
		<link rel="alternate" type="text/html" href="http://wiki.apidesign.org/index.php?title=Factory&amp;diff=1667&amp;oldid=prev"/>
				<updated>2008-11-15T12:36:28Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;a href=&quot;/wiki/APIDesignPatterns:Factory&quot; class=&quot;mw-redirect&quot; title=&quot;APIDesignPatterns:Factory&quot;&gt;APIDesignPatterns:Factory&lt;/a&gt; moved to &lt;a href=&quot;/wiki/Factory&quot; title=&quot;Factory&quot;&gt;Factory&lt;/a&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 12:36, 15 November 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;/table&gt;</summary>
		<author><name>JaroslavTulach</name></author>	</entry>

	<entry>
		<id>http://wiki.apidesign.org/index.php?title=Factory&amp;diff=1650&amp;oldid=prev</id>
		<title>JaroslavTulach at 12:26, 15 November 2008</title>
		<link rel="alternate" type="text/html" href="http://wiki.apidesign.org/index.php?title=Factory&amp;diff=1650&amp;oldid=prev"/>
				<updated>2008-11-15T12:26:24Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 12:26, 15 November 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 10:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 10:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;All these details can be implemented and are hidden to some extent from the user of the [[API]]. It is impossible to achieve this with plain constructor.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;All these details can be implemented and are hidden to some extent from the user of the [[API]]. It is impossible to achieve this with plain constructor.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;APIDesignPatters&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;APIDesignPatterns&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;APIDesignPatters&lt;/del&gt;:Creational]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;APIDesignPatterns&lt;/ins&gt;:Creational]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;APIDesignPatters&lt;/del&gt;:Encapsulation]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;APIDesignPatterns&lt;/ins&gt;:Encapsulation]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>JaroslavTulach</name></author>	</entry>

	<entry>
		<id>http://wiki.apidesign.org/index.php?title=Factory&amp;diff=1649&amp;oldid=prev</id>
		<title>JaroslavTulach: New page: Factory method is well know design pattern useful in API design too. In general, instead of making constructor of some class public, you can reveal a public static method that returns ...</title>
		<link rel="alternate" type="text/html" href="http://wiki.apidesign.org/index.php?title=Factory&amp;diff=1649&amp;oldid=prev"/>
				<updated>2008-11-15T12:25:42Z</updated>
		
		<summary type="html">&lt;p&gt;New page: Factory method is well know design pattern useful in &lt;a href=&quot;/wiki/API&quot; class=&quot;mw-redirect&quot; title=&quot;API&quot;&gt;API&lt;/a&gt; design too. In general, instead of making constructor of some class public, you can reveal a public static method that returns ...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Factory method is well know design pattern useful in [[API]] design too. In general, instead of making constructor of some class public, you can reveal a public static method that returns instance of the class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot; snippet=&amp;quot;aserverinfo.regularcreate&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This has few benefits from the point of [[API]] [[evolution]]:&lt;br /&gt;
* the class is not subclassable, which solves a lot of nasty evolution problems by itself&lt;br /&gt;
* one can create a cache or have pool of instances to return&lt;br /&gt;
* the whole factory method can be synchronized, preventing parallel access&lt;br /&gt;
* one can return subclass of the return type, not the type itself&lt;br /&gt;
All these details can be implemented and are hidden to some extent from the user of the [[API]]. It is impossible to achieve this with plain constructor.&lt;br /&gt;
&lt;br /&gt;
[[Category:APIDesignPatters]]&lt;br /&gt;
[[Category:APIDesignPatters:Creational]]&lt;br /&gt;
[[Category:APIDesignPatters:Encapsulation]]&lt;/div&gt;</summary>
		<author><name>JaroslavTulach</name></author>	</entry>

	</feed>