<?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=VerificationViaAOP</id>
		<title>VerificationViaAOP - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.apidesign.org/index.php?action=history&amp;feed=atom&amp;title=VerificationViaAOP"/>
		<link rel="alternate" type="text/html" href="http://wiki.apidesign.org/index.php?title=VerificationViaAOP&amp;action=history"/>
		<updated>2026-04-05T17:28:48Z</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=VerificationViaAOP&amp;diff=2140&amp;oldid=prev</id>
		<title>JaroslavTulach at 06:51, 23 March 2009</title>
		<link rel="alternate" type="text/html" href="http://wiki.apidesign.org/index.php?title=VerificationViaAOP&amp;diff=2140&amp;oldid=prev"/>
				<updated>2009-03-23T06:51:16Z</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 06:51, 23 March 2009&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&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;Still, it is important to put and enforce certain restrictions on the interactions between various modules. For example it can be extremely dangerous with respect to [[Java_Monitor|synchronization and deadlocks]] to allow those who implement storage to try to display dialogs or wizards. The access to screen may already be occupied by someone else, yet the storage access needs to work for everyone running on background. When you are supervising such modular system finding and preventing such ''inverted'' dependencies that violate overall assumptions is one of the biggest priorities.&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;Still, it is important to put and enforce certain restrictions on the interactions between various modules. For example it can be extremely dangerous with respect to [[Java_Monitor|synchronization and deadlocks]] to allow those who implement storage to try to display dialogs or wizards. The access to screen may already be occupied by someone else, yet the storage access needs to work for everyone running on background. When you are supervising such modular system finding and preventing such ''inverted'' dependencies that violate overall assumptions is one of the biggest priorities.&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;:There are various extensions to [[NetBeans]] [[Virtual File System]] library&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;.&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;:There are various extensions to [[NetBeans]] [[Virtual File System]] library&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 class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;:&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;One of them is &lt;/del&gt;support for [[CVS]], [[Subversion]] or [[Mercurial]]. &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Their job&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;:&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;including &lt;/ins&gt;support for [[CVS]], [[Subversion]] or [[Mercurial]]. &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;To deal with VCS&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;:is slightly harder then traditional task of regular file system. &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Some times&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;:is slightly harder then traditional task of regular file system. &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Sometimes&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;:they need to make decisions and they &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;needed &lt;/del&gt;to ask user questions. Indeed this&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;:they need to make decisions and they &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;need &lt;/ins&gt;to ask user questions. Indeed this&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;div&gt;:was very deadlock prone and needed to be prevented and [[TryCatchRedo|fixed]].&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;:was very deadlock prone and needed to be prevented and [[TryCatchRedo|fixed]].&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;/table&gt;</summary>
		<author><name>JaroslavTulach</name></author>	</entry>

	<entry>
		<id>http://wiki.apidesign.org/index.php?title=VerificationViaAOP&amp;diff=2138&amp;oldid=prev</id>
		<title>JaroslavTulach at 09:59, 22 March 2009</title>
		<link rel="alternate" type="text/html" href="http://wiki.apidesign.org/index.php?title=VerificationViaAOP&amp;diff=2138&amp;oldid=prev"/>
				<updated>2009-03-22T09:59:39Z</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 09:59, 22 March 2009&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;[[Use Modular Architecture|Modular applications]] assign its every piece certain role. One module shall provide [[API]] for access to storage, one for displaying wizards, etc. Other modules depend on such [[API]] modules and use them get the data from the storage or display their wizard dialogs. The intuition clearly indicates that by wrapping all the complexity of dealing with storage into a separate module, the overall complexity of the code is simplified.&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;[[Use Modular Architecture|Modular applications]] assign its every piece certain role. One module shall provide [[API]] for access to &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;storage&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;, one for displaying wizards, etc. Other modules depend on such [[API]] modules and use them get the data from the storage or display their wizard dialogs. The intuition clearly indicates that by wrapping all the complexity of dealing with storage into a separate module, the overall complexity of the code is simplified.&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;Still, it is important to put and enforce certain restrictions on the interactions between various modules. For example it can be extremely dangerous with respect to [[Java_Monitor|synchronization and deadlocks]] to allow those who implement storage to try to display dialogs or wizards. The access to screen may already be occupied by someone else, yet the storage access needs to work &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;on &lt;/del&gt;everyone running on background. When you are supervising such modular system &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;this &lt;/del&gt;is the &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;first thing that you want to prevent&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;Still, it is important to put and enforce certain restrictions on the interactions between various modules. For example it can be extremely dangerous with respect to [[Java_Monitor|synchronization and deadlocks]] to allow those who implement storage to try to display dialogs or wizards. The access to screen may already be occupied by someone else, yet the storage access needs to work &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;for &lt;/ins&gt;everyone running on background. When you are supervising such modular system &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;finding and preventing such ''inverted'' dependencies that violate overall assumptions &lt;/ins&gt;is &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;one of &lt;/ins&gt;the &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;biggest priorities&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;:There are various extensions to [[NetBeans]] [[Virtual File System]] library.&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;:There are various extensions to [[NetBeans]] [[Virtual File System]] library.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&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;:is slightly harder then traditional task of regular file system. Some times&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;:is slightly harder then traditional task of regular file system. Some times&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;div&gt;:they need to make decisions and they needed to ask user questions. Indeed this&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;:they need to make decisions and they needed to ask user questions. Indeed this&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;:was very deadlock prone and needed to prevented and [[TryCatchRedo|fixed]].&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;:was very deadlock prone and needed to &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;be &lt;/ins&gt;prevented and [[TryCatchRedo|fixed]].&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;Simplest fix, especially if you own both [[API]]s is to set some '''ThreadLocal''' variable whenever a method from storage [[API]] is on the stack and whenever one tries to show a wizard or dialog verify that this '''ThreadLocal''' is not set. If it is, rise an exception. This is simple, yet it feels like quite a brute force hack than a recommended pattern.&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;Simplest fix, especially if you own both [[API]]s is to set some '''ThreadLocal''' variable whenever a method from storage [[API]] is on the stack and whenever one tries to show a wizard or dialog verify that this '''ThreadLocal''' is not set. If it is, rise an exception. This is simple, yet it feels like quite a brute force hack than a recommended pattern.&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;As such I was very pleased to see [http://www.slideshare.net/srinip/architecture-enforcement-aspects-itarc2009-1117942 Srini Penchikala's presentation] describing use of [[AOP]] for the same task. Instead polluting &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;the &lt;/del&gt;both [[API]] with ''ThreadLocal'' tricks and making them semi-aware of each other (wizard &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;often &lt;/del&gt;do not need storage), one can define one or two ''aspects'' externally and achieve the same.&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;As such I was very pleased to see [http://www.slideshare.net/srinip/architecture-enforcement-aspects-itarc2009-1117942 Srini Penchikala's presentation] describing use of [[AOP]] for the same task. Instead polluting both &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;the &lt;/ins&gt;[[API]]&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;s &lt;/ins&gt;with &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'&lt;/ins&gt;''ThreadLocal&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'&lt;/ins&gt;'' tricks and making them semi-aware of each other (wizard do not need storage &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;otherwise&lt;/ins&gt;), one can define one or two ''aspects'' externally and achieve the same.&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;For preventing these kinds of unwanted compile or runtime dependencies the [[AOP]] seems to be perfect. Get more &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;inspication &lt;/del&gt;by [http://www.slideshare.net/srinip/architecture-enforcement-aspects-itarc2009-1117942 Srini].&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;For preventing these kinds of unwanted compile or runtime dependencies the [[AOP]] seems to be perfect. Get more &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;inspiration &lt;/ins&gt;by [http://www.slideshare.net/srinip/architecture-enforcement-aspects-itarc2009-1117942 Srini].&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;comments/&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;comments/&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: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Category:Tools]]&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:Tools]]&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=VerificationViaAOP&amp;diff=2131&amp;oldid=prev</id>
		<title>JaroslavTulach: New page: Modular applications assign its every piece certain role. One module shall provide API for access to storage, one for displaying wizards, etc. Other module...</title>
		<link rel="alternate" type="text/html" href="http://wiki.apidesign.org/index.php?title=VerificationViaAOP&amp;diff=2131&amp;oldid=prev"/>
				<updated>2009-03-22T09:43:20Z</updated>
		
		<summary type="html">&lt;p&gt;New page: &lt;a href=&quot;/wiki/Use_Modular_Architecture&quot; title=&quot;Use Modular Architecture&quot;&gt;Modular applications&lt;/a&gt; assign its every piece certain role. One module shall provide &lt;a href=&quot;/wiki/API&quot; class=&quot;mw-redirect&quot; title=&quot;API&quot;&gt;API&lt;/a&gt; for access to storage, one for displaying wizards, etc. Other module...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Use Modular Architecture|Modular applications]] assign its every piece certain role. One module shall provide [[API]] for access to storage, one for displaying wizards, etc. Other modules depend on such [[API]] modules and use them get the data from the storage or display their wizard dialogs. The intuition clearly indicates that by wrapping all the complexity of dealing with storage into a separate module, the overall complexity of the code is simplified.&lt;br /&gt;
&lt;br /&gt;
Still, it is important to put and enforce certain restrictions on the interactions between various modules. For example it can be extremely dangerous with respect to [[Java_Monitor|synchronization and deadlocks]] to allow those who implement storage to try to display dialogs or wizards. The access to screen may already be occupied by someone else, yet the storage access needs to work on everyone running on background. When you are supervising such modular system this is the first thing that you want to prevent.&lt;br /&gt;
&lt;br /&gt;
:There are various extensions to [[NetBeans]] [[Virtual File System]] library.&lt;br /&gt;
:One of them is support for [[CVS]], [[Subversion]] or [[Mercurial]]. Their job&lt;br /&gt;
:is slightly harder then traditional task of regular file system. Some times&lt;br /&gt;
:they need to make decisions and they needed to ask user questions. Indeed this&lt;br /&gt;
:was very deadlock prone and needed to prevented and [[TryCatchRedo|fixed]].&lt;br /&gt;
&lt;br /&gt;
Simplest fix, especially if you own both [[API]]s is to set some '''ThreadLocal''' variable whenever a method from storage [[API]] is on the stack and whenever one tries to show a wizard or dialog verify that this '''ThreadLocal''' is not set. If it is, rise an exception. This is simple, yet it feels like quite a brute force hack than a recommended pattern.&lt;br /&gt;
&lt;br /&gt;
As such I was very pleased to see [http://www.slideshare.net/srinip/architecture-enforcement-aspects-itarc2009-1117942 Srini Penchikala's presentation] describing use of [[AOP]] for the same task. Instead polluting the both [[API]] with ''ThreadLocal'' tricks and making them semi-aware of each other (wizard often do not need storage), one can define one or two ''aspects'' externally and achieve the same.&lt;br /&gt;
&lt;br /&gt;
For preventing these kinds of unwanted compile or runtime dependencies the [[AOP]] seems to be perfect. Get more inspication by [http://www.slideshare.net/srinip/architecture-enforcement-aspects-itarc2009-1117942 Srini].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;comments/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Tools]]&lt;/div&gt;</summary>
		<author><name>JaroslavTulach</name></author>	</entry>

	</feed>