<?xml version='1.0' encoding='UTF-8' ?>
<rss version="2.0" xml:base="http://www.cincomsmalltalk.com/userblogs/traymond/" xmlns:admin="http://webns.net/mvcb/" xmlns:blogChannel="http://backend.userland.com/blogChannelModule" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:icbm="http://postneo.com/icbm" xmlns:includedComments="http://www.laudably.com/rss2-comments" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:media="http://search.yahoo.com/mrss/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/">
	<channel>
		<title>Putting it Together</title>
		<link>http://www.cincomsmalltalk.com/userblogs/traymond/blogView</link>
		<description>Terry Raymond</description>
		<webMaster>traymond@craftedsmalltalk.com</webMaster>
		<lastBuildDate>Tue, 04 Mar 2008 06:38:47 EST</lastBuildDate>
		<image>
			<url>/images/cst_small.jpg</url>
			<title>Putting it Together</title>
			<link>http://www.cincomsmalltalk.com/userblogstraymond/blogView</link>
			<height>50</height>
			<width>81</width>
		</image>
		<admin:generatorAgent rdf:resource="/CincomSmalltalkWiki/Silt"></admin:generatorAgent>
		<admin:errorReportsTo rdf:resource="mailto:traymond@craftedsmalltalk.com"></admin:errorReportsTo>
		<dc:language>en-us</dc:language>
		<dc:creator>Terry Raymond</dc:creator>
		<dc:rights>Copyright 2005 Cincom Systems, Inc.</dc:rights>
		<dc:date>2008-03-04T06:38:47-05:00</dc:date>
		<icbm:latitude>41.733333</icbm:latitude>
		<icbm:longitude>-71.433333</icbm:longitude>
		<item>
			<title>To self access - or not</title>
			<link>http://www.cincomsmalltalk.com/userblogs/traymond/blogView?showComments=true&amp;printTitle=To_self_access_-_or_not&amp;entry=3329132420</link>
			<category>programming</category>
			<pubDate>Fri, 30 Jun 2006 15:00:20 EDT</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">

<p>One topic that generates a lot of heat is the question, &quot;Should one use self accessors?&quot;. First, for clarity, self accessors are accessors used to access private instance variables. My opinion is that they should be avoided and one should not automatically use self accessors. There are situations where self accessors should be used but that should be determined as the code evolves.</p>
<p>Let's look at the reasons people use self accessors and what I think.</p><p>1. Using an accessor instead of a direct reference provides consistency with the message sending paradigm.</p><p>This only works if one does not use method temporary variables or refer to message arguments, to me this is rather weak. Additionally, when one uses a direct reference it is clear from the code that state is being read or changed. If the code uses a setter or getter a user reading the code, who is unfamiliar with the code, cannot be 100%25 sure that nothing else is being done by the accessor and must also read the accessor. Trying to maintain consistency with the message sending paradigm is a lot less important than readability.</p><p>2. Object state variables can also be considered attributes and using accessors maintains consistency with the concept that attributes are represented by methods.</p><p>I agree with this and is what I consider to be the strongest argument for using self accessors. When I am creating a new design I frequently write my code using self accessors, but later change them to use direct references. This is because, other than working, I consider readability to be the most important goal of the code. Additionally, I have seen too much code where other objects improperly used the accessors, resulting in brittle code that needed to be reworked. This tends to be more of a problem with novice smalltalk programmers who have not yet rid themselves of their procedural thinking.</p><p>3. Using accessors allows one to more readily reuse a design and specialize in a subclass.</p><p>While there is some truth to this, what frequently also occurs, is the subclass changes are sufficiently different that the method names no longer are a good representation of what the methods are doing. Also frequently, the programmer has designed the class with re-usability in mind, but has no actual use cases. This results is a class that is immature with respect to re-usability and is less readable than its actual use would dictate. Using self accessors in an abstract class is something that should be arrived at through design evolution.</p><p>4. Forcing state access through a couple of methods makes debugging easier.</p><p>This is because of a lack of good tools. The proper solution here is to get, or create, good tools instead of making your code compensate. In the current version of VisualWorks if you want to trace state access or interrupt execution, there are browser menu commands that allow the user to place probes on all instance variable accesses. </p></div>]]></description>
			<guid isPermaLink="false">3329132420</guid>
			<pingback:server>http://www.cincomsmalltalk.com/userblogs/traymond/blog/servlet/CommentAPIPBServlet?guid=3329132420</pingback:server>
			<pingback:target>http://www.cincomsmalltalk.com/userblogs/traymond/blogView?guid=3329132420</pingback:target>
			<includedComments:comment-collection>
				<includedComments:comment>
					<includedComments:guid>blogView?showComments=true&amp;printTitle=To_self_access_-_or_not&amp;entry=3329132420</includedComments:guid>
					<includedComments:puid>blogView?showComments=true&amp;printTitle=To_self_access_-_or_not&amp;entry=3329132420</includedComments:puid>
					<includedComments:author>Jeff Hallman</includedComments:author>
					<includedComments:pubDate>2006-06-30T18:57:20-04:00</includedComments:pubDate>
					<includedComments:content>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;One reason to use accessors is that Traits cannot have any state, only messages.  So every reference to an instance variable by a trait method has to go through an accessor.


&lt;/p&gt;&lt;/div&gt;</includedComments:content>
					<includedComments:title>Traits?</includedComments:title>
				</includedComments:comment>
				<includedComments:comment>
					<includedComments:guid>blogView?showComments=true&amp;printTitle=To_self_access_-_or_not&amp;entry=3329132420</includedComments:guid>
					<includedComments:puid>blogView?showComments=true&amp;printTitle=To_self_access_-_or_not&amp;entry=3329132420</includedComments:puid>
					<includedComments:author>
Terry</includedComments:author>
					<includedComments:pubDate>2006-06-30T21:02:01-04:00</includedComments:pubDate>
					<includedComments:content>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;Comment by 
Terry&lt;/p&gt;

&lt;p&gt;


&lt;p&gt;Jeff&lt;/p&gt;
&lt;p&gt;Well, I think it is one shortcoming of how Traits are defined for Squeak. If you look at VWTtraits you will see it supports Traits with state.&lt;/p&gt;&lt;/p&gt;
&lt;/div&gt;</includedComments:content>
					<includedComments:title>
VWTraits allows for state</includedComments:title>
				</includedComments:comment>
				<includedComments:comment>
					<includedComments:guid>blogView?showComments=true&amp;printTitle=To_self_access_-_or_not&amp;entry=3329132420</includedComments:guid>
					<includedComments:puid>blogView?showComments=true&amp;printTitle=To_self_access_-_or_not&amp;entry=3329132420</includedComments:puid>
					<includedComments:author>
James Robertson</includedComments:author>
					<includedComments:pubDate>2006-07-01T01:01:25-04:00</includedComments:pubDate>
					<includedComments:content>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;Comment by 
James Robertson&lt;/p&gt;

&lt;p&gt;


&lt;p&gt;I use lazy initializing accessors because it makes live updates (i.e., an update that does not involve downtime) far, far simpler. &lt;/p&gt;
&lt;/p&gt;
&lt;/div&gt;</includedComments:content>
					<includedComments:title>
Re: To self access - or not</includedComments:title>
				</includedComments:comment>
			</includedComments:comment-collection>
			<wfw:comment>http://www.cincomsmalltalk.com/userblogs/traymond/servlet/CommentAPIServlet?guid=3329132420</wfw:comment>
		</item>
		<item>
			<title>Re: Breakpoints and Probes in VisualWorks</title>
			<link>http://www.cincomsmalltalk.com/userblogs/traymond/blogView?showComments=true&amp;printTitle=Re:_Breakpoints_and_Probes_in_VisualWorks&amp;entry=3320560393</link>
			<category>general</category>
			<pubDate>Thu, 23 Mar 2006 09:53:13 EST</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">

<p><a href="http://www.cincomsmalltalk.com/userblogs/runarj/blogView?showComments=true&amp;entry=3320316301">Spotted in Runar Jordahl - Smallwalk</a></p>

<blockquote>
Just discovered... &quot;ThisProbe&quot; is a variable you can use in the code snippet. This simplifies the code for a probe that removes itself to:
</blockquote>

<p>I would not recommend doing this. Adding or removing a probe changes the method bytecodes. If you change the bytecodes while you are executing a method you could crash your image. The debugger takes great pains to fix up a context if you add/remove a probe in an active context.</p></div>]]></description>
			<guid isPermaLink="false">3320560393</guid>
			<pingback:server>http://www.cincomsmalltalk.com/userblogs/traymond/blog/servlet/CommentAPIPBServlet?guid=3320560393</pingback:server>
			<pingback:target>http://www.cincomsmalltalk.com/userblogs/traymond/blogView?guid=3320560393</pingback:target>
			<includedComments:comment-collection></includedComments:comment-collection>
			<wfw:comment>http://www.cincomsmalltalk.com/userblogs/traymond/servlet/CommentAPIServlet?guid=3320560393</wfw:comment>
		</item>
		<item>
			<title>Preventing and recovering from Notifier hell</title>
			<link>http://www.cincomsmalltalk.com/userblogs/traymond/blogView?showComments=true&amp;printTitle=Preventing_and_recovering_from_Notifier_hell&amp;entry=3320478163</link>
			<category>general</category>
			<pubDate>Wed, 22 Mar 2006 11:02:43 EST</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">

<p>Notifier hell is when you have a bug that generates a continuous stream of notifiers and if you don't act quickly your image will die.</p>
<h2>Cause:</h2><p>In almost every case Notifier hell is caused by a bug that is encountered as a result of a #displayOn: message send or a bounds calculation. When the bug is hit a notifier pops up and the presence of the overlapping notifier causes another #displayOn: to be sent to your app.</p><h2>Prevention:</h2><p>In the VW settings tool under Debugger, enable &quot;Use event faithful debugging&quot;. When an exception occurs you will get only one notifier for that Window Manager. The downside for this setting is that all windows associated with the window manager will be frozen, no updates or events will be processed. For some bugs you may want to disable this setting.</p><h2>Recovery:</h2><p>In the event you did not enable &quot;Use event faithful debugging&quot;, you can use the following procedure to gain control of your image and clean out the notifiers. However, you must first load the &quot;ProcMonitor Window Close&quot; package from the <a href="http://www.cincomsmalltalk.com/CincomSmalltalkWiki/Public+Store+Repository">Open Repository</a>. This adds the &quot;Close Windows&quot; command to the process monitor.</p><ul xmlns="http://www.w3.org/1999/xhtml">
			<li>Hit ctrl-\. This will open the Process Monitor and pause all user processes.</li>
		<li>Select the Windows tab.</li><li>Select all the exception windows.</li><li>If the Process Monitor keeps scrolling to the top then stop the sampling process.</li><li>From the popup menu select &quot;Close Windows&quot;</li><li>Start the sampling process.</li><li>All the windows you selected should be closed.</li><li>Select the &quot;VisualWorks Team&quot; window, i.e. the launcher.</li><li>Select the &quot;Proceed&quot; menu command from the menu. This will unfreeze the launcher.</li><li>From the Launcher open settings and under the Debugger settings enable &quot;Use event faithful debugging&quot; and accept.</li><li>In the Process Monitor File menu, select &quot;Proceed All Paused&quot;</li></ul><p>At this point you may get another exception, but only one.</p></div>]]></description>
			<guid isPermaLink="false">3320478163</guid>
			<pingback:server>http://www.cincomsmalltalk.com/userblogs/traymond/blog/servlet/CommentAPIPBServlet?guid=3320478163</pingback:server>
			<pingback:target>http://www.cincomsmalltalk.com/userblogs/traymond/blogView?guid=3320478163</pingback:target>
			<includedComments:comment-collection></includedComments:comment-collection>
			<wfw:comment>http://www.cincomsmalltalk.com/userblogs/traymond/servlet/CommentAPIServlet?guid=3320478163</wfw:comment>
		</item>
		<item>
			<title>Slow running computer</title>
			<link>http://www.cincomsmalltalk.com/userblogs/traymond/blogView?showComments=true&amp;printTitle=Slow_running_computer&amp;entry=3310794982</link>
			<category>general</category>
			<pubDate>Wed, 30 Nov 2005 09:16:22 EST</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">

<p>I got a new desktop computer around the beginning of this year. After a few months I noticed that occasionally an application would run rather slow. It took me a few months to realize that this was happening as I was not yet accustomed to XP. Eventually, I noticed that there was some dependence on what I did when I first started up, and if it was too frequent, I could reboot and possibly not encounter it for the remainder of the day.</p>
<p>Because, I could not find a pattern with enough consistency and restarting the app or rebooting fixed it, I tolerated the situation. Furthermore, my virus scanner and spyware scanner never reported any intrusion and defragging did not improve it. But, it slowly began to happen more frequently so I got <a href="http://www.sysinternals.com/Utilities/RootkitRevealer.html">RootKitRevealer</a> but it did not report anything either, argh!</p>
<p>Recently it began to occur more frequently and it was becoming harder to get rid of. I tried a few more things to find out what was happening but nothing turned up. At this point it appears that isolating it will get real difficult so I figured I better first make sure there is no memory problem, comparatively speaking this is much easier to do. So I started looking for memory tests. My processor board is an Intel board and it came with a CD containing various utilities so I looked at it and decided to load the desktop monitor. To my surprise I found that the processor temperature was reported to be -190 C, rather weird. So, I rebooted and looked at the BIOS settings. One of the BIOS pages was a hardware monitor and it showed the temperature being 270 F, much too high, but it also seem to change too much between reboots. Anyway I decided to check out my processor board and noticed a lot of dust on the fan intake, but I did not think it was enough to severely restrict airflow. After cleaning and rebooting I still saw weird temperature readings.</p>
<p>I then went to the Intel support site and after a bit of looking around I downloaded the most recent BIOS update. Finally! After updating my BIOS the processor temperatures looked like they should. In the release notes I found that one of the updates corrected improper temperature readings.</p><p>Best of all, the problem with slow applications is now gone!</p>

</div>]]></description>
			<guid isPermaLink="false">3310794982</guid>
			<pingback:server>http://www.cincomsmalltalk.com/userblogs/traymond/blog/servlet/CommentAPIPBServlet?guid=3310794982</pingback:server>
			<pingback:target>http://www.cincomsmalltalk.com/userblogs/traymond/blogView?guid=3310794982</pingback:target>
			<includedComments:comment-collection></includedComments:comment-collection>
			<wfw:comment>http://www.cincomsmalltalk.com/userblogs/traymond/servlet/CommentAPIServlet?guid=3310794982</wfw:comment>
		</item>
		<item>
			<title>Thread-safety and the MulitProc UI</title>
			<link>http://www.cincomsmalltalk.com/userblogs/traymond/blogView?showComments=true&amp;printTitle=Thread-safety_and_the_MulitProc_UI&amp;entry=3308821200</link>
			<category>VW MultiProc UI</category>
			<pubDate>Mon, 07 Nov 2005 13:00:00 EST</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">
<p><html><div xmlns="http://www.w3.org/1999/xhtml">

<h1>Thread-safety and the MultiProc UI</h1>

<p>The MultiProc UI introduced in VW 7 provides the developer with additional flexibility in creating his application. 
However, this flexibility also presents a new potential problem, namely thread-safety. This article will provide the 
developer with techniques to address the thread-safety issues with the MultiProc UI.</p>

<h1>What is thread-safety?</h1>
<p>When multiple processes interact with a common resource and at least one process updates the resource, the potential exists 
for a process to &ldquo;read&rdquo; the resource when it is an inconsistent state, or if there are multiple updaters, then the resource 
may end up in a permanent inconsistent state.</p>
<p>The techniques employed to ensure thread-safety usually involve some form of serialization, i.e. use of semaphores, or 
simply restricting resource access to just one process. The problem with serialization is that there may be several points 
that need to be serialized and if one is missed then you can still have a problem. Additionally, serialization also 
introduces the possibility of deadlock if multiple resources are involved.</p><p>Because of its simplicity, I prefer to restrict resource access to just one process. This is not always possible but this is what I use when I begin my design. By restricting access to just one process I mean that only one process should have a 
reference to the resource at any given moment in time, the reference can be passed between processes.</p>

<h1>What does this mean in the context of the MultiProc UI?</h1>
<p>Basically, I consider all the windows and the local objects reachable from a window to be restricted to the window 
manager process. This means the application model and all the supporting domain objects. Additionally, this includes the 
window display surface. While this may seem rather restrictive there is a good reason for this.</p>

<p>Consider a domain object that is being displayed by a window and this domain object is being updated by a background 
process. Typically, when a domain object is updated it sends a changed message to its dependents which eventually results in 
the display being updated to reflect the new value. But, what happens if the user is doing something in the window related 
to the field that is being updated? Additionally, when the display is updated it usually does an invalidate, this may cause 
the field to be redisplayed immediately, by the background process, or it may post an event to the window manager event 
queue. If the widget is directed to perform the invalidate immediately, the window manager may process events in the 
background process. This is undesirable because now you can have the window manager process processing some events while 
another process processes other events for the same window, resulting in strange a display.</p><p>A common issue for an application that communicates with a server is performing the communication in a manner that does 
not block the UI while waiting for a response from the server. Usually, this involves performing the communication in a 
background process and then updating a domain object. However, as previously stated, updating the domain object should be 
done by the ui process and not the communication process. One way to do this is to use #uiEventFor:</p><dl>
<dd>
<pre>
obj := sever getMyFeature.
[myDomainObj someFeature: obj] uiEventFor: myWindow.
</pre>
</dd>
</dl><p>If you find that you need to share a domain object between applications using different window managers, then you should 
wrap your dependents so the wrapper ensures that the proper window manager process does the update. For example, if you can 
subclass AspectAdaptor, add a &ldquo;window&rdquo; instance variable, and create a new update method as follows;</p><pre font="arial">
update: anAspect with: parameter from: sender
	&quot;Propagate change if the sender is the receiver's subject and anAspect is the receiver's aspect.&quot;

		(sender == subject and: [anAspect == self forAspect])
		ifTrue: [[dependents update: #value with: parameter from: self] uiEventFor: window]
		ifFalse: [[sender == subjectChannel ifTrue: [self changedSubject]] uiEventFor: window]
</pre><h1>Summary</h1><p>Begin your design using the following two guidelines.</p><ol>
<li>Restrict all your application windows to just one common window manager.</li>
<li>When using background processes, make sure your domain models are updated by the window manager process instead of the 
background process.</li>
</ol><p>Use multiple window managers and access controls such as semaphores only when the first two rules are inadequate for your 
system.</p><div></div></div></html>
</p></div>]]></description>
			<guid isPermaLink="false">3308821200</guid>
			<pingback:server>http://www.cincomsmalltalk.com/userblogs/traymond/blog/servlet/CommentAPIPBServlet?guid=3308821200</pingback:server>
			<pingback:target>http://www.cincomsmalltalk.com/userblogs/traymond/blogView?guid=3308821200</pingback:target>
			<includedComments:comment-collection>
				<includedComments:comment>
					<includedComments:guid>blogView?showComments=true&amp;printTitle=Thread-safety_and_the_MulitProc_UI&amp;entry=3308821200</includedComments:guid>
					<includedComments:puid>blogView?showComments=true&amp;printTitle=Thread-safety_and_the_MulitProc_UI&amp;entry=3308821200</includedComments:puid>
					<includedComments:author>Reinout Heeck</includedComments:author>
					<includedComments:pubDate>2005-11-08T16:36:11-05:00</includedComments:pubDate>
					<includedComments:content>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;Thanks!
&lt;br&gt;As you know I've been asking for this kind of documentation for several years, now there is something I can shoot at :-)
&lt;p&gt;
Ever since the MPUI came out I had mixed feelings about it, I found it of great help in the IDE but hard to use (in a safe way) in applications I write. In practice our apps degenerate to a single-windowmanager setup like you suggest.
&lt;p&gt;
I have qualms with your advice though, going straight to your conclusions:
&lt;i&gt;
&lt;br&gt;1. Restrict all your application windows to just one common window manager.
&lt;br&gt;2. When using background processes, make sure your domain models are updated by the window manager process instead of the background process.
&lt;/i&gt;&lt;p&gt;
1) seems to state: "don't use the MPUI" which I perceive as odd, and then 2) goes on to say: "even with a single WM you need to do extra work to make it safe".
&lt;br&gt;So on balance it seems the MPUI enhances the IDE but penalizes the application code (you need to put in extra stuff with no payback for the end user).
&lt;p&gt;
I also want to point out that &lt;i&gt;"If you find that you need to share a domain object between applications using different window managers, then you should wrap your dependents so the wrapper ensures that the proper window manager process does the update."&lt;/i&gt; is contradictory: if there are multiple WMs dependent on a single domain instance there is no single 'proper' window manager to do the update.
&lt;p&gt;
Moreover the advise &lt;i&gt;"if you can subclass AspectAdaptor, add a 'window' instance variable, and create a new update method"&lt;/i&gt; seems to me to be totally counter to the idea of keeping the domain independent of the presentation layer: I can no longer manipulate the same domain instance through both http and the window system since the domain now hard-wires the notion of being manipulated by a window (and only one single window).
&lt;br&gt;I guess to keep the domain decoupled from the UI implementation (and the knowledge of it's number of threads) the synchronization should be moved to the object that is aware of the number of threads. IOW don't extend AspectAdaptor as you suggest but put that logic at the dependent side: when the ApplicationModel receives a #update:with:from: the receiver (UI) should know whether and how synchronization with a WM thread is done, not the sender (domain).
&lt;p&gt;
My 2c.
 
&lt;/p&gt;&lt;/div&gt;</includedComments:content>
					<includedComments:title></includedComments:title>
				</includedComments:comment>
				<includedComments:comment>
					<includedComments:guid>blogView?showComments=true&amp;printTitle=Thread-safety_and_the_MulitProc_UI&amp;entry=3308821200</includedComments:guid>
					<includedComments:puid>blogView?showComments=true&amp;printTitle=Thread-safety_and_the_MulitProc_UI&amp;entry=3308821200</includedComments:puid>
					<includedComments:author>
Terry</includedComments:author>
					<includedComments:pubDate>2005-11-08T18:11:31-05:00</includedComments:pubDate>
					<includedComments:content>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;Comment by 
Terry&lt;/p&gt;

&lt;p&gt;


&lt;p&gt;First, &amp;quot;most&amp;quot; applications that are using a common set of domain objects will want to use only one window manager because it would not seem right to allow the user to perform multiple concurrent operations. Where the MPUI helps is with those applications where the operations and models are separate and a user may have long operations, i.e. waiting for a database operation.&lt;/p&gt;
&lt;p&gt;But, besides that, I would not consider an AspectAdaptor part of the domain model. As you know you specifiy what aspect adaptor to use in your Application model, not in your domain objects. Furthermore, the aspect adaptor is a translator between a domain object and a widget. Which also means that the application model does not even get the update from the domain object. Normally the update flows from the domain object to an aspect adaptor to a widget. So in this case, your ApplicationModel, which should know about the processes, specifies that a translation that also insures that the correct process is used in updating the widget.&lt;/p&gt;&lt;p&gt;I also think you are overstating your case that I suggest our apps degenerate to a single window manager, when I clearly stated that this is where you should &amp;quot;begin&amp;quot; because when dealing with multiple processes it is simpler and leads to fewer problems, i.e. do first what is simple.&lt;/p&gt;&lt;/p&gt;
&lt;/div&gt;</includedComments:content>
					<includedComments:title>
Re: Thread safety</includedComments:title>
				</includedComments:comment>
				<includedComments:comment>
					<includedComments:guid>blogView?showComments=true&amp;printTitle=Thread-safety_and_the_MulitProc_UI&amp;entry=3308821200</includedComments:guid>
					<includedComments:puid>blogView?showComments=true&amp;printTitle=Thread-safety_and_the_MulitProc_UI&amp;entry=3308821200</includedComments:puid>
					<includedComments:author>Reinout Heeck</includedComments:author>
					<includedComments:pubDate>2005-11-08T19:23:15-05:00</includedComments:pubDate>
					<includedComments:content>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;&lt;i&gt;I would not consider an AspectAdaptor part of the domain model.&lt;/i&gt;
&lt;br&gt;I quite strongly disagree, AspectAdaptor is part of our change-update library, it is not privvy to the UI. Creating change-update adaptors for domain aspects is domain code IMO. 
&lt;p&gt;
&lt;i&gt;As you know you specifiy what aspect adaptor to use in your Application model, not in your domain objects.&lt;/i&gt;
Which aspect to use, yes. How the adaptor is modeled, preferably not.
&lt;br&gt;
It seems most natural to create them on the domain model, else you end up with repetitive utility methods on your ApplicationModels. Implementing a simple #aspectFor: high in the domain hierarchy covers them all. Having said that it becomes clear to me that it is similarly easy to implement #aspecFor:eventWindow: there (but these cannot be shared between window managers).
&lt;p&gt;
&lt;i&gt;I also think you are overstating your case that I suggest our apps degenerate to a single window manager&lt;/i&gt;
&lt;br&gt;That is not what I tried to express, I was reporting that I saw the apps I create degenerate into single WM designs as a reaction to the MPUI threading issues and lack of guidance.
&lt;p&gt;
BTW are there any apps written with multiple window managers (with threading properly sorted that is)?  
&lt;/p&gt;&lt;/div&gt;</includedComments:content>
					<includedComments:title></includedComments:title>
				</includedComments:comment>
				<includedComments:comment>
					<includedComments:guid>blogView?showComments=true&amp;printTitle=Thread-safety_and_the_MulitProc_UI&amp;entry=3308821200</includedComments:guid>
					<includedComments:puid>blogView?showComments=true&amp;printTitle=Thread-safety_and_the_MulitProc_UI&amp;entry=3308821200</includedComments:puid>
					<includedComments:author>
James Robertson</includedComments:author>
					<includedComments:pubDate>2005-11-08T19:46:33-05:00</includedComments:pubDate>
					<includedComments:content>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;Comment by 
James Robertson&lt;/p&gt;

&lt;p&gt;


&lt;p&gt;Uses separate WindowManagers for some of the UIs. In particular, the IRC plugin runs in a different thread&lt;/p&gt;
&lt;/p&gt;
&lt;/div&gt;</includedComments:content>
					<includedComments:title>
BottomFeeder</includedComments:title>
				</includedComments:comment>
				<includedComments:comment>
					<includedComments:guid>blogView?showComments=true&amp;printTitle=Thread-safety_and_the_MulitProc_UI&amp;entry=3308821200</includedComments:guid>
					<includedComments:puid>blogView?showComments=true&amp;printTitle=Thread-safety_and_the_MulitProc_UI&amp;entry=3308821200</includedComments:puid>
					<includedComments:author>
Terry</includedComments:author>
					<includedComments:pubDate>2005-11-09T07:51:32-05:00</includedComments:pubDate>
					<includedComments:content>&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;
&lt;p&gt;Comment by 
Terry&lt;/p&gt;

&lt;p&gt;


&lt;p&gt;Reinout&lt;/p&gt;&lt;p&gt;You wrote: &amp;quot;(but these cannot be shared between window managers)&amp;quot;. What are you referring to, i.e. &amp;quot;these&amp;quot;? If you mean aspect adaptors, then yes. But you don't share aspect adaptors between windows belonging to different application models anyway.&lt;/p&gt;&lt;p&gt;The MPUI threading issues are general multiprocess issues. As I see it, the main problem is that people do not realize what resources they need to consider when working with multiple window managers.&lt;/p&gt;
&lt;p&gt;James' bf example is a good one. The irc plugin is a logically separate application from bf. If it were not for the smalltalk image concept, the code would be completely separate. Here is a situation where one should use multiple window managers and because the domain models are completely separate there would be no threading issues.&lt;/p&gt;&lt;/p&gt;
&lt;/div&gt;</includedComments:content>
					<includedComments:title>
Re: Thread safety</includedComments:title>
				</includedComments:comment>
			</includedComments:comment-collection>
			<wfw:comment>http://www.cincomsmalltalk.com/userblogs/traymond/servlet/CommentAPIServlet?guid=3308821200</wfw:comment>
		</item>
		<item>
			<title>Method Defactoring tool</title>
			<link>http://www.cincomsmalltalk.com/userblogs/traymond/blogView?showComments=true&amp;printTitle=Method_Defactoring_tool&amp;entry=3308226450</link>
			<category>Tools</category>
			<pubDate>Mon, 31 Oct 2005 15:47:30 EST</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">

<p>One of my pet peeves about smalltalk is that it can be a pain to read highly factored code. You end up chasing through several small methods to figure out what is going on. Once I mentioned on the VWNC mailing list that it would be nice if someone would write a defactoring browser. I think it was John Brant who responded by saying I should use the method inliner. However, the method inliner recompiles the method, which I don't want to happen.</p>
<p>So, recently I created a defactoring tool. It reuses the method inliner but does not recompile the method. If you are interested in using it you can find it <a href="http://www.craftedsmalltalk.com/downloads/defactoringTool.zip">here</a>.</p>
</div>]]></description>
			<guid isPermaLink="false">3308226450</guid>
			<pingback:server>http://www.cincomsmalltalk.com/userblogs/traymond/blog/servlet/CommentAPIPBServlet?guid=3308226450</pingback:server>
			<pingback:target>http://www.cincomsmalltalk.com/userblogs/traymond/blogView?guid=3308226450</pingback:target>
			<includedComments:comment-collection></includedComments:comment-collection>
			<wfw:comment>http://www.cincomsmalltalk.com/userblogs/traymond/servlet/CommentAPIServlet?guid=3308226450</wfw:comment>
		</item>
		<item>
			<title>Probe Libraries - Again</title>
			<link>http://www.cincomsmalltalk.com/userblogs/traymond/blogView?showComments=true&amp;printTitle=Probe_Libraries_-_Again&amp;entry=3306565059</link>
			<category>probes</category>
			<pubDate>Wed, 12 Oct 2005 10:17:39 EDT</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">

<p>In a previous <a href="http://www.cincomsmalltalk.com/userblogs/traymond/blogView?showComments=true&amp;entry=3305275002">article</a>  I provided an example of how a developer could create his own special probe library. Well, Boris inquired as to why the library was file based instead of stored in the image using pragmas. The answer was that PDP predates pragmas and an image hosted library had not been created.</p>
<p>Well, now there is an image hosted probe library available <a href="http://www.craftedsmalltalk.com/downloads/probeLibrary.zip">here</a>.</p></div>]]></description>
			<guid isPermaLink="false">3306565059</guid>
			<pingback:server>http://www.cincomsmalltalk.com/userblogs/traymond/blog/servlet/CommentAPIPBServlet?guid=3306565059</pingback:server>
			<pingback:target>http://www.cincomsmalltalk.com/userblogs/traymond/blogView?guid=3306565059</pingback:target>
			<includedComments:comment-collection></includedComments:comment-collection>
			<wfw:comment>http://www.cincomsmalltalk.com/userblogs/traymond/servlet/CommentAPIServlet?guid=3306565059</wfw:comment>
		</item>
		<item>
			<title>Simulating Exceptions with probes</title>
			<link>http://www.cincomsmalltalk.com/userblogs/traymond/blogView?showComments=true&amp;printTitle=Simulating_Exceptions_with_probes&amp;entry=3305387813</link>
			<category>probes</category>
			<pubDate>Wed, 28 Sep 2005 19:16:53 EDT</pubDate>
			<description><![CDATA[<div xmlns="http://www.w3.org/1999/xhtml">

<p>The other day I was asked if there is a way for a probe to
generate an exception but make it appear that it was raised from the context
that contains the probe and not the probe context. This is quite easy to do.</p>

<p>If we look at GenericException class&gt;&gt;raiseSignal we see;</p>
<font face=Arial>
<p>&nbsp;&nbsp;&nbsp;^self new
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;searchFrom: thisContext sender;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;originator: thisContext sender homeReceiver;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;raiseSignal.
</font>
<p>If we generate the exception from the probe conditional
expression then the expression becomes; </p>
<font face=Arial>
<p>&nbsp;&nbsp;&nbsp;SomeException new
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;searchFrom: DOITCONTEXT;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;originator: self;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;raiseSignal.
<br>&nbsp;&nbsp;&nbsp;^false</p>
</font>


<p>You have to remember that in the probe expression  18self' is
bound to the receiver of the method in which the probe resides.</p>
</div>]]></description>
			<guid isPermaLink="false">3305387813</guid>
			<pingback:server>http://www.cincomsmalltalk.com/userblogs/traymond/blog/servlet/CommentAPIPBServlet?guid=3305387813</pingback:server>
			<pingback:target>http://www.cincomsmalltalk.com/userblogs/traymond/blogView?guid=3305387813</pingback:target>
			<includedComments:comment-collection></includedComments:comment-collection>
			<wfw:comment>http://www.cincomsmalltalk.com/userblogs/traymond/servlet/CommentAPIServlet?guid=3305387813</wfw:comment>
		</item>
	</channel>
</rss>
