<?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=MagicalStrings</id>
		<title>MagicalStrings - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.apidesign.org/index.php?action=history&amp;feed=atom&amp;title=MagicalStrings"/>
		<link rel="alternate" type="text/html" href="http://wiki.apidesign.org/index.php?title=MagicalStrings&amp;action=history"/>
		<updated>2026-04-11T01:23:41Z</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=MagicalStrings&amp;diff=8203&amp;oldid=prev</id>
		<title>JaroslavTulach: /* Not in the OSGi Spec! */</title>
		<link rel="alternate" type="text/html" href="http://wiki.apidesign.org/index.php?title=MagicalStrings&amp;diff=8203&amp;oldid=prev"/>
				<updated>2015-02-17T16:46:06Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Not in the OSGi Spec!&lt;/span&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 16:46, 17 February 2015&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 17:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 17:&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;According to an email that I got from [[Richard Hall]] recently, I could have read the [[OSGi]] specification as many times as I wanted and I would still find nothing. The ''reference:'' protocol is a non-spec extension honored both by [[Felix]] and [[Equinox]]!&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;According to an email that I got from [[Richard Hall]] recently, I could have read the [[OSGi]] specification as many times as I wanted and I would still find nothing. The ''reference:'' protocol is a non-spec extension honored both by [[Felix]] and [[Equinox]]!&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;This is a nice example of [[Teleinterface]]. On one side there is the user of [[Felix]] or [[Equinox]], on the other side there is the &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;implementation. In &lt;/del&gt;the middle &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;there is an &lt;/del&gt;[[OSGi]] [[API]]. The [[API]] itself knows nothing about ''reference:'' protocol, yet it allows such information to ''tunnel through''. The ''String'' parameter in this case serves as an opaque container. Its content is ignored by the [[API]] itself, and interpreted just by the actual implementation.&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;This is a nice example of [[Teleinterface]]. On one side there is the user of [[Felix]] or [[Equinox]], on the other side there is the &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;application using [[OSGi]] container via in &lt;/ins&gt;the middle [[OSGi]] [[API]]&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;s&lt;/ins&gt;. The [[API]] itself knows nothing about ''reference:'' protocol, yet it allows such information to ''tunnel through''. The ''String'' parameter in this case serves as an opaque container. Its content is ignored by the [[API]] itself, and interpreted just by the actual implementation.&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: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;I still consider this to be an anti-pattern (especially due to problems with proper documentation of all the extensions), but it is useful to keep in mind that strings can be used to implement [[Teleinterface]]s.&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;I still consider this to be an anti-pattern (especially due to problems with proper documentation of all the extensions), but it is useful to keep in mind that strings can be used to implement [[Teleinterface]]s.&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: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:APIDesignPatterns:Anti]]&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;[[Category:APIDesignPatterns:Anti]]&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=MagicalStrings&amp;diff=3702&amp;oldid=prev</id>
		<title>JaroslavTulach at 10:04, 9 May 2010</title>
		<link rel="alternate" type="text/html" href="http://wiki.apidesign.org/index.php?title=MagicalStrings&amp;diff=3702&amp;oldid=prev"/>
				<updated>2010-05-09T10:04:17Z</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 10:04, 9 May 2010&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 12:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 12:&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: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;I am going to claim that [[MagicalStrings]] are [[API]] design anti pattern. But on the other hand, they can be quite useful. They increase the value of consultancy! If you create an [[API]] full of [[MagicalStrings]], then you will be payed for helping people to use it properly (under the condition that you convince people to get locked in your [[API]]).&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;I am going to claim that [[MagicalStrings]] are [[API]] design anti pattern. But on the other hand, they can be quite useful. They increase the value of consultancy! If you create an [[API]] full of [[MagicalStrings]], then you will be payed for helping people to use it properly (under the condition that you convince people to get locked in your [[API]]).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&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;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&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;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;=== Not in the [[OSGi]] Spec! ===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&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;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&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;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;According to an email that I got from [[Richard Hall]] recently, I could have read the [[OSGi]] specification as many times as I wanted and I would still find nothing. The ''reference:'' protocol is a non-spec extension honored both by [[Felix]] and [[Equinox]]!&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&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;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&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;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;This is a nice example of [[Teleinterface]]. On one side there is the user of [[Felix]] or [[Equinox]], on the other side there is the implementation. In the middle there is an [[OSGi]] [[API]]. The [[API]] itself knows nothing about ''reference:'' protocol, yet it allows such information to ''tunnel through''. The ''String'' parameter in this case serves as an opaque container. Its content is ignored by the [[API]] itself, and interpreted just by the actual implementation.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&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;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&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;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;I still consider this to be an anti-pattern (especially due to problems with proper documentation of all the extensions), but it is useful to keep in mind that strings can be used to implement [[Teleinterface]]s.&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: #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: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:APIDesignPatterns:Anti]]&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;[[Category:APIDesignPatterns:Anti]]&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=MagicalStrings&amp;diff=3618&amp;oldid=prev</id>
		<title>JaroslavTulach at 20:18, 8 April 2010</title>
		<link rel="alternate" type="text/html" href="http://wiki.apidesign.org/index.php?title=MagicalStrings&amp;diff=3618&amp;oldid=prev"/>
				<updated>2010-04-08T20:18:47Z</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 20:18, 8 April 2010&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&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;Tom Watson (a member of [[OSGi]] secret society, imho) [[Talk:NetbinoxPerformance|replied]] and told me that I can just prefix my URL with ''reference:''. Oh, those [[MagicalStrings]]! I was searching for a special method ''installAsReference(String url)'', but it did not come to my mind to use special pseudo URL protocol! How could it, [[Javadoc]] of the method is silent about such possibility. Maybe I should have read the [[OSGi]] spec. But I did. Maybe not that carefully, but it is easy to oversight some [[MagicalStrings]] in hundred pages document anyway.&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;Tom Watson (a member of [[OSGi]] secret society, imho) [[Talk:NetbinoxPerformance|replied]] and told me that I can just prefix my URL with ''reference:''. Oh, those [[MagicalStrings]]! I was searching for a special method ''installAsReference(String url)'', but it did not come to my mind to use special pseudo URL protocol! How could it, [[Javadoc]] of the method is silent about such possibility. Maybe I should have read the [[OSGi]] spec. But I did. Maybe not that carefully, but it is easy to oversight some [[MagicalStrings]] in hundred pages document anyway.&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;I am going to claim that [[MagicalStrings]] are [[API]] design anti pattern. But on the other hand, they can be quite useful. They increase the value of consultancy! If you create an [[API]] full of [[MagicalStrings]], then you will be payed for helping people to use it (&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;if they &lt;/del&gt;get locked in your [[API]]).&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;I am going to claim that [[MagicalStrings]] are [[API]] design anti pattern. But on the other hand, they can be quite useful. They increase the value of consultancy! If you create an [[API]] full of [[MagicalStrings]], then you will be payed for helping people to use it &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;properly &lt;/ins&gt;(&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;under the condition that you convince people to &lt;/ins&gt;get locked in your [[API]]).&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: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:APIDesignPatterns:Anti]]&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;[[Category:APIDesignPatterns:Anti]]&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=MagicalStrings&amp;diff=3617&amp;oldid=prev</id>
		<title>JaroslavTulach at 20:16, 8 April 2010</title>
		<link rel="alternate" type="text/html" href="http://wiki.apidesign.org/index.php?title=MagicalStrings&amp;diff=3617&amp;oldid=prev"/>
				<updated>2010-04-08T20:16:00Z</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 20:16, 8 April 2010&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&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;One dirty trick to provide an [[API]] which looks incapable, but which people with in-depth knowledge can use to &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;do &lt;/del&gt;magical things is to use [[MagicalStrings]]. Just define:&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;One dirty trick to provide an [[API]] which looks incapable, but which people with in-depth knowledge can use to &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;perform &lt;/ins&gt;magical &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;powerful &lt;/ins&gt;things is to use [[MagicalStrings]]. Just define:&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: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&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;&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&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=MagicalStrings&amp;diff=3615&amp;oldid=prev</id>
		<title>JaroslavTulach at 20:08, 8 April 2010</title>
		<link rel="alternate" type="text/html" href="http://wiki.apidesign.org/index.php?title=MagicalStrings&amp;diff=3615&amp;oldid=prev"/>
				<updated>2010-04-08T20:08:14Z</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 20:08, 8 April 2010&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&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;Tom Watson (a member of [[OSGi]] secret society, imho) [[Talk:NetbinoxPerformance|replied]] and told me that I can just prefix my URL with ''reference:''. Oh, those [[MagicalStrings]]! I was searching for a special method ''installAsReference(String url)'', but it did not come to my mind to use special pseudo URL protocol! How could it, [[Javadoc]] of the method is silent about such possibility. Maybe I should have read the [[OSGi]] spec. But I did. Maybe not that carefully, but it is easy to oversight some [[MagicalStrings]] in hundred pages document anyway.&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;Tom Watson (a member of [[OSGi]] secret society, imho) [[Talk:NetbinoxPerformance|replied]] and told me that I can just prefix my URL with ''reference:''. Oh, those [[MagicalStrings]]! I was searching for a special method ''installAsReference(String url)'', but it did not come to my mind to use special pseudo URL protocol! How could it, [[Javadoc]] of the method is silent about such possibility. Maybe I should have read the [[OSGi]] spec. But I did. Maybe not that carefully, but it is easy to oversight some [[MagicalStrings]] in hundred pages document anyway.&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;I am going to claim that [[MagicalStrings]] are anti pattern. But on the other hand, they can be quite useful. They increase the value of consultancy! If you create an [[API]] full of [[MagicalStrings]], then you will be payed for helping people to use it (if they get locked in your [[API]]).&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;I am going to claim that [[MagicalStrings]] are &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;[[API]] design &lt;/ins&gt;anti pattern. But on the other hand, they can be quite useful. They increase the value of consultancy! If you create an [[API]] full of [[MagicalStrings]], then you will be payed for helping people to use it (if they get locked in your [[API]]).&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: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:APIDesignPatterns:Anti]]&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;[[Category:APIDesignPatterns:Anti]]&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=MagicalStrings&amp;diff=3614&amp;oldid=prev</id>
		<title>JaroslavTulach at 20:07, 8 April 2010</title>
		<link rel="alternate" type="text/html" href="http://wiki.apidesign.org/index.php?title=MagicalStrings&amp;diff=3614&amp;oldid=prev"/>
				<updated>2010-04-08T20:07:58Z</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 20:07, 8 April 2010&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&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;Recently I faced this while trying to use [[OSGi]] containers effectively. I needed to install a bundle. There is a method installBundle(String url), but it copies the [[JAR]] from the url location to internal cache. That is not really effective in [[Netigso|my case]] and I wanted to tell the container to use the original [[JAR]]. This problem puzzled me for a while. I thought I will have to use some specific container methods. That did not make me happy as [[Netigso]] supports both [[Felix]] and [[Equinox]] and having ''containerisms'' is not really flexible. I did not know what to do - so I started with [[NetbinoxPerformance|slightly arrogant blog]]. Surprisingly that helped!&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;Recently I faced this while trying to use [[OSGi]] containers effectively. I needed to install a bundle. There is a method installBundle(String url), but it copies the [[JAR]] from the url location to internal cache. That is not really effective in [[Netigso|my case]] and I wanted to tell the container to use the original [[JAR]]. This problem puzzled me for a while. I thought I will have to use some specific container methods. That did not make me happy as [[Netigso]] supports both [[Felix]] and [[Equinox]] and having ''containerisms'' is not really flexible. I did not know what to do - so I started with [[NetbinoxPerformance|slightly arrogant blog]]. Surprisingly that helped!&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;Tom Watson (a member of [[OSGi]] secret society, imho) [[Talk:NetbinoxPerformance|replied]] and told me that I can just prefix my URL with ''reference:''. Oh, those [[MagicalStrings]]! I was searching for a special method ''installAsReference(String url)'', but it did not come to my mind to use special pseudo URL protocol! How could it, [[Javadoc]] of the method is silent about such possibility. Maybe I should have read the [[OSGi]] spec. But I did. Maybe not that carefully, but it is easy to oversight some [[MagicalStrings]] in hundred &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;page &lt;/del&gt;document anyway.&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;Tom Watson (a member of [[OSGi]] secret society, imho) [[Talk:NetbinoxPerformance|replied]] and told me that I can just prefix my URL with ''reference:''. Oh, those [[MagicalStrings]]! I was searching for a special method ''installAsReference(String url)'', but it did not come to my mind to use special pseudo URL protocol! How could it, [[Javadoc]] of the method is silent about such possibility. Maybe I should have read the [[OSGi]] spec. But I did. Maybe not that carefully, but it is easy to oversight some [[MagicalStrings]] in hundred &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;pages &lt;/ins&gt;document anyway.&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: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;I am going to claim that [[MagicalStrings]] are anti pattern. But on the other hand, they can be quite useful. They increase the value of consultancy! If you create an [[API]] full of [[MagicalStrings]], then you will be payed for helping people to use it (if they get locked in your [[API]]).&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;I am going to claim that [[MagicalStrings]] are anti pattern. But on the other hand, they can be quite useful. They increase the value of consultancy! If you create an [[API]] full of [[MagicalStrings]], then you will be payed for helping people to use it (if they get locked in your [[API]]).&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: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:APIDesignPatterns:Anti]]&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;[[Category:APIDesignPatterns:Anti]]&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=MagicalStrings&amp;diff=3613&amp;oldid=prev</id>
		<title>JaroslavTulach at 20:06, 8 April 2010</title>
		<link rel="alternate" type="text/html" href="http://wiki.apidesign.org/index.php?title=MagicalStrings&amp;diff=3613&amp;oldid=prev"/>
				<updated>2010-04-08T20:06:13Z</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 20:06, 8 April 2010&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&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;&amp;lt;/source&amp;gt;&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;&amp;lt;/source&amp;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: #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;and tell people that they can pass in a location of configuration file. So far so good. But then also provide additional [[API]] which, if the string starts with ''purge!'' removes the existing configuration. To make things even more magical, don't mention this in [[Javadoc]] of the method. &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Can &lt;/del&gt;you see how capable [[API]]s you can offer member of your secret [[API]] society?&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;and tell people that they can pass in a location of configuration file. So far so good. But then also provide additional [[API]] which, if the string starts with ''purge!'' removes the existing configuration. To make things even more magical, don't mention this in [[Javadoc]] of the method. &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Silly? Maybe, but can &lt;/ins&gt;you see how capable [[API]]s you can offer member of your secret [[API]] society?&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: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Recently I faced this while trying to use [[OSGi]] containers effectively. I needed to install a bundle. There is a method installBundle(String url), but it copies the [[JAR]] from the url location to internal cache. That is not really effective in [[Netigso|my case]] and I wanted to tell the container to use the original [[JAR]]. This problem puzzled me for a while. I thought I will have to use some specific container methods. That did not make me happy as [[Netigso]] supports both [[Felix]] and [[Equinox]] and having ''containerisms'' is not really flexible. I did not know what to do - so I started with [[NetbinoxPerformance|slightly arrogant blog]]. Surprisingly that helped!&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;Recently I faced this while trying to use [[OSGi]] containers effectively. I needed to install a bundle. There is a method installBundle(String url), but it copies the [[JAR]] from the url location to internal cache. That is not really effective in [[Netigso|my case]] and I wanted to tell the container to use the original [[JAR]]. This problem puzzled me for a while. I thought I will have to use some specific container methods. That did not make me happy as [[Netigso]] supports both [[Felix]] and [[Equinox]] and having ''containerisms'' is not really flexible. I did not know what to do - so I started with [[NetbinoxPerformance|slightly arrogant blog]]. Surprisingly that helped!&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=MagicalStrings&amp;diff=3612&amp;oldid=prev</id>
		<title>JaroslavTulach: New page: One dirty trick to provide an API which looks incapable, but which people with in-depth knowledge can use to do magical things is to use MagicalStrings. Just define:  &lt;source lang=...</title>
		<link rel="alternate" type="text/html" href="http://wiki.apidesign.org/index.php?title=MagicalStrings&amp;diff=3612&amp;oldid=prev"/>
				<updated>2010-04-08T20:05:18Z</updated>
		
		<summary type="html">&lt;p&gt;New page: One dirty trick to provide an &lt;a href=&quot;/wiki/API&quot; class=&quot;mw-redirect&quot; title=&quot;API&quot;&gt;API&lt;/a&gt; which looks incapable, but which people with in-depth knowledge can use to do magical things is to use &lt;a href=&quot;/wiki/MagicalStrings&quot; title=&quot;MagicalStrings&quot;&gt;MagicalStrings&lt;/a&gt;. Just define:  &amp;lt;source lang=...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;One dirty trick to provide an [[API]] which looks incapable, but which people with in-depth knowledge can use to do magical things is to use [[MagicalStrings]]. Just define:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
public void configure(String url);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and tell people that they can pass in a location of configuration file. So far so good. But then also provide additional [[API]] which, if the string starts with ''purge!'' removes the existing configuration. To make things even more magical, don't mention this in [[Javadoc]] of the method. Can you see how capable [[API]]s you can offer member of your secret [[API]] society?&lt;br /&gt;
&lt;br /&gt;
Recently I faced this while trying to use [[OSGi]] containers effectively. I needed to install a bundle. There is a method installBundle(String url), but it copies the [[JAR]] from the url location to internal cache. That is not really effective in [[Netigso|my case]] and I wanted to tell the container to use the original [[JAR]]. This problem puzzled me for a while. I thought I will have to use some specific container methods. That did not make me happy as [[Netigso]] supports both [[Felix]] and [[Equinox]] and having ''containerisms'' is not really flexible. I did not know what to do - so I started with [[NetbinoxPerformance|slightly arrogant blog]]. Surprisingly that helped!&lt;br /&gt;
&lt;br /&gt;
Tom Watson (a member of [[OSGi]] secret society, imho) [[Talk:NetbinoxPerformance|replied]] and told me that I can just prefix my URL with ''reference:''. Oh, those [[MagicalStrings]]! I was searching for a special method ''installAsReference(String url)'', but it did not come to my mind to use special pseudo URL protocol! How could it, [[Javadoc]] of the method is silent about such possibility. Maybe I should have read the [[OSGi]] spec. But I did. Maybe not that carefully, but it is easy to oversight some [[MagicalStrings]] in hundred page document anyway.&lt;br /&gt;
&lt;br /&gt;
I am going to claim that [[MagicalStrings]] are anti pattern. But on the other hand, they can be quite useful. They increase the value of consultancy! If you create an [[API]] full of [[MagicalStrings]], then you will be payed for helping people to use it (if they get locked in your [[API]]).&lt;br /&gt;
&lt;br /&gt;
[[Category:APIDesignPatterns:Anti]]&lt;/div&gt;</summary>
		<author><name>JaroslavTulach</name></author>	</entry>

	</feed>