<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Maintaining Loose Coupling in Seaside Components</title>
	<atom:link href="http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/feed/" rel="self" type="application/rss+xml" />
	<link>http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/</link>
	<description>thoughts on Smalltalk and programming in general...</description>
	<pubDate>Wed, 23 Jul 2008 20:13:17 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Sebastian</title>
		<link>http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-9367</link>
		<dc:creator>Sebastian</dc:creator>
		<pubDate>Sat, 15 Dec 2007 15:28:38 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-9367</guid>
		<description>Hey Ramon, I just found an important difference with the #on:do: and as you may guess is because of the context.
I needed to perform a reaction to an announcement that needed some object conveniently present as a temp at subscription time. So, in those cases, it has no sense use other thing but the context that will remember for you the temp needed to react.

Take a look to the code:

&lt;pre&gt;
SomeEditor&#62;&#62;wireSaveButtonFor: anItem
	self saveButton
		subscribe: MVPSubmitButtonPressed do: [:ann&#124; self onSaveRequestedFor: anItem] ;
		yourself.
&lt;/pre&gt;

If try to use there a #send:to: I'll have to find somehow that item so it's great to use #on:do: there.

The only thing I really had to take care of is to subscribe only once so subscriber evaluates only once the reaction.

Just for convenience I've made a couple of methods in Announcer so I can subscribe as usual or only if don't previously subscribed (#ifNotYetSubscribe:send:to:) for sends. 

I need the same convenient feature for #on:do: but is not as easy as with message sends where you can look the receiver to decide if already subscribed. With contexts you can compare the home but I'm not sure if that it will be enough for all cases to decide if subscribed or not.</description>
		<content:encoded><![CDATA[<p>Hey Ramon, I just found an important difference with the #on:do: and as you may guess is because of the context.<br />
I needed to perform a reaction to an announcement that needed some object conveniently present as a temp at subscription time. So, in those cases, it has no sense use other thing but the context that will remember for you the temp needed to react.</p>
<p>Take a look to the code:</p>
<pre>
SomeEditor&gt;&gt;wireSaveButtonFor: anItem
	self saveButton
		subscribe: MVPSubmitButtonPressed do: [:ann| self onSaveRequestedFor: anItem] ;
		yourself.
</pre>
<p>If try to use there a #send:to: I&#8217;ll have to find somehow that item so it&#8217;s great to use #on:do: there.</p>
<p>The only thing I really had to take care of is to subscribe only once so subscriber evaluates only once the reaction.</p>
<p>Just for convenience I&#8217;ve made a couple of methods in Announcer so I can subscribe as usual or only if don&#8217;t previously subscribed (#ifNotYetSubscribe:send:to:) for sends. </p>
<p>I need the same convenient feature for #on:do: but is not as easy as with message sends where you can look the receiver to decide if already subscribed. With contexts you can compare the home but I&#8217;m not sure if that it will be enough for all cases to decide if subscribed or not.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastian</title>
		<link>http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-9318</link>
		<dc:creator>Sebastian</dc:creator>
		<pubDate>Thu, 13 Dec 2007 01:53:46 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-9318</guid>
		<description>Oh yeah, please don't get me wrong: one thing is 
*to have a parent* and other is 
*to have and make use of knowing the parent* 
the later is the case we really want to run away from. The first is what I was seeing as normal, adding that parents can be aware of events among their children by subscribing to the announcements they have interest in react somehow (sounds a lot like real life :).
I don't see any problem of appreciable magnitude on preferring #on:do:
To be honest I'm using  #subscribe:send:to: instead of a convenient #on:do: but is more because I usually like to keep components semantically detailed. I end up with more methods with less code in them. In more than a couple of cases I used the same method, like I said before: from a reaction to an announcement or to a direct interaction. Even more, I already has one case in which the reaction was exactly the same for two different announcements so it's an obvious refactoring to put that reaction in a common method.</description>
		<content:encoded><![CDATA[<p>Oh yeah, please don&#8217;t get me wrong: one thing is<br />
*to have a parent* and other is<br />
*to have and make use of knowing the parent*<br />
the later is the case we really want to run away from. The first is what I was seeing as normal, adding that parents can be aware of events among their children by subscribing to the announcements they have interest in react somehow (sounds a lot like real life :).<br />
I don&#8217;t see any problem of appreciable magnitude on preferring #on:do:<br />
To be honest I&#8217;m using  #subscribe:send:to: instead of a convenient #on:do: but is more because I usually like to keep components semantically detailed. I end up with more methods with less code in them. In more than a couple of cases I used the same method, like I said before: from a reaction to an announcement or to a direct interaction. Even more, I already has one case in which the reaction was exactly the same for two different announcements so it&#8217;s an obvious refactoring to put that reaction in a common method.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramon Leon</title>
		<link>http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-9261</link>
		<dc:creator>Ramon Leon</dc:creator>
		<pubDate>Mon, 10 Dec 2007 15:30:28 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-9261</guid>
		<description>Well, components that know their parents become so tightly bound to them that it becomes near impossible to use that component anywhere else, it's destroys composeability. 

As for #send:to: and #on:do:, that's cool, I was just wondering if you preferred one over the other, I guess not.</description>
		<content:encoded><![CDATA[<p>Well, components that know their parents become so tightly bound to them that it becomes near impossible to use that component anywhere else, it&#8217;s destroys composeability. </p>
<p>As for #send:to: and #on:do:, that&#8217;s cool, I was just wondering if you preferred one over the other, I guess not.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastian</title>
		<link>http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-9260</link>
		<dc:creator>Sebastian</dc:creator>
		<pubDate>Mon, 10 Dec 2007 15:00:16 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-9260</guid>
		<description>Well I don't see a lack of health in a design where components have always a parent. Of course that not apply to to components you #call: I see composition as a strength and this kind of parent decoupling allows to fly high. I'm not of the idea of looking to coupled things as bad per se. There are cases and cases. But I'm aware that one have to be cautious.

Also I get your point about app to app interactions where this also apply. In fact today I was wondering how I'll make this seaside apps to run in different images and interact. For instance a simple seaside app running in an image that just login users and redirect valid sessions to the right application in the right image. Probably something like rst or remote objects should be used for that.

About the #send:to: and #on:do: I think it's not big deal. Don't make a significant difference unless you want your code more testable. If that you usually make more granular almost all just to test all that you can. Also you may want the same action of that instance to be achieved as a reaction (the category under I use to put those #onSomethingHappened: methods) of that announcement and also from other causes that are not reactions to announcements.

Beside those cases I don't see why not to use #on:do: have the two options is sweet.

I ended the refactoring and still amazed with the amount of simplified code and now I'm going ahead on the design in a very clean way. I feel there is more room now.</description>
		<content:encoded><![CDATA[<p>Well I don&#8217;t see a lack of health in a design where components have always a parent. Of course that not apply to to components you #call: I see composition as a strength and this kind of parent decoupling allows to fly high. I&#8217;m not of the idea of looking to coupled things as bad per se. There are cases and cases. But I&#8217;m aware that one have to be cautious.</p>
<p>Also I get your point about app to app interactions where this also apply. In fact today I was wondering how I&#8217;ll make this seaside apps to run in different images and interact. For instance a simple seaside app running in an image that just login users and redirect valid sessions to the right application in the right image. Probably something like rst or remote objects should be used for that.</p>
<p>About the #send:to: and #on:do: I think it&#8217;s not big deal. Don&#8217;t make a significant difference unless you want your code more testable. If that you usually make more granular almost all just to test all that you can. Also you may want the same action of that instance to be achieved as a reaction (the category under I use to put those #onSomethingHappened: methods) of that announcement and also from other causes that are not reactions to announcements.</p>
<p>Beside those cases I don&#8217;t see why not to use #on:do: have the two options is sweet.</p>
<p>I ended the refactoring and still amazed with the amount of simplified code and now I&#8217;m going ahead on the design in a very clean way. I feel there is more room now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramon Leon</title>
		<link>http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-9239</link>
		<dc:creator>Ramon Leon</dc:creator>
		<pubDate>Sun, 09 Dec 2007 07:06:02 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-9239</guid>
		<description>Yes, this feels very nice and is very composeable.  A parent component haw the knowledge to wire itself up as a mediator for all its children, who simply announce things they do.  

Personally, I prefer to sling blocks instead of symbols so I usually go for #on:do: instead of #send:to:, though I can't totally say why, other than it feels better.  I'm interested in why you prefer #send:to:, if only to test my preference.  

I do also like the idea that not every object is automatically it's own announcer, sometimes a global announcer is nice.  I wouldn't want to be constrained to child to parent events.  Thinking about it, it might even be interesting to have an event be its own announcer instead of some context specific place like the session.  Maybe you want to have user to user interactions or app to app interactions.

This is the approach people should prefer instead of wanting every component to have a parent, a common complaint about Seaside.  Having a parent inevitably leads to tighter coupling while children throwing events naturally leads to loose coupling and more composeable objects.</description>
		<content:encoded><![CDATA[<p>Yes, this feels very nice and is very composeable.  A parent component haw the knowledge to wire itself up as a mediator for all its children, who simply announce things they do.  </p>
<p>Personally, I prefer to sling blocks instead of symbols so I usually go for #on:do: instead of #send:to:, though I can&#8217;t totally say why, other than it feels better.  I&#8217;m interested in why you prefer #send:to:, if only to test my preference.  </p>
<p>I do also like the idea that not every object is automatically it&#8217;s own announcer, sometimes a global announcer is nice.  I wouldn&#8217;t want to be constrained to child to parent events.  Thinking about it, it might even be interesting to have an event be its own announcer instead of some context specific place like the session.  Maybe you want to have user to user interactions or app to app interactions.</p>
<p>This is the approach people should prefer instead of wanting every component to have a parent, a common complaint about Seaside.  Having a parent inevitably leads to tighter coupling while children throwing events naturally leads to loose coupling and more composeable objects.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastian</title>
		<link>http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-9235</link>
		<dc:creator>Sebastian</dc:creator>
		<pubDate>Sun, 09 Dec 2007 02:58:51 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-9235</guid>
		<description>Well I've just found what was getting me uncomfortable about this: too much decoupling could be not that convenient as it may seems to be at first glance. 

For components the critical decoupling is needed from a component to its parent, so.. I'm using now one Announcer per component. I've set it in an instVar in the abstract class of my components family and all the wiring stuff get massively simplified.

To illustrate this, now I can do:
&lt;pre&gt;
SomeComponent&#62;&#62;wireEvents
    super wireEvents.

    self someSubcomponent downOneItemButton
    subscribe: ButtonPressed send: #onSubcomponentDownOne: to: self.
&lt;/pre&gt;
It feels really good

PS: to be completely analog (and more because they are objects) to the #wend:send:to: of the Smalltalk itself one should have one announcer per object but for now that is unnecessary.</description>
		<content:encoded><![CDATA[<p>Well I&#8217;ve just found what was getting me uncomfortable about this: too much decoupling could be not that convenient as it may seems to be at first glance. </p>
<p>For components the critical decoupling is needed from a component to its parent, so.. I&#8217;m using now one Announcer per component. I&#8217;ve set it in an instVar in the abstract class of my components family and all the wiring stuff get massively simplified.</p>
<p>To illustrate this, now I can do:</p>
<pre>
SomeComponent&gt;&gt;wireEvents
    super wireEvents.

    self someSubcomponent downOneItemButton
    subscribe: ButtonPressed send: #onSubcomponentDownOne: to: self.
</pre>
<p>It feels really good</p>
<p>PS: to be completely analog (and more because they are objects) to the #wend:send:to: of the Smalltalk itself one should have one announcer per object but for now that is unnecessary.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastian</title>
		<link>http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-9091</link>
		<dc:creator>Sebastian</dc:creator>
		<pubDate>Thu, 29 Nov 2007 17:57:34 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-9091</guid>
		<description>Yeah, I think my English serializer is not too good but what I really care is not the rightness of the written bytes but about passing the right message :)

cheers,

Sebastian
PS: suggestion noted</description>
		<content:encoded><![CDATA[<p>Yeah, I think my English serializer is not too good but what I really care is not the rightness of the written bytes but about passing the right message :)</p>
<p>cheers,</p>
<p>Sebastian<br />
PS: suggestion noted</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramon Leon</title>
		<link>http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-9090</link>
		<dc:creator>Ramon Leon</dc:creator>
		<pubDate>Thu, 29 Nov 2007 15:24:05 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-9090</guid>
		<description>This is the first you've mentioned double dispatch in connection with announcements, interesting idea, I'll have to think about it a bit.  

Your English can be a bit hard to follow sometimes, might I suggest Smalltalk is often terser and clearer than English when you're trying to explain something interesting.</description>
		<content:encoded><![CDATA[<p>This is the first you&#8217;ve mentioned double dispatch in connection with announcements, interesting idea, I&#8217;ll have to think about it a bit.  </p>
<p>Your English can be a bit hard to follow sometimes, might I suggest Smalltalk is often terser and clearer than English when you&#8217;re trying to explain something interesting.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastian</title>
		<link>http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-9089</link>
		<dc:creator>Sebastian</dc:creator>
		<pubDate>Thu, 29 Nov 2007 14:56:03 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-9089</guid>
		<description>At some point after October 8, I decided to bet on Announcements and decided to make the best use I can give to it. There is no reason to use in the subjects of the motivations just symbols because I needed interactive entities there.

At first I've started simple and, like you said, put some collaborators on the announcements so subscribers can decide what to do.

Then I've see a valuable chance of using double dispatch. That way subscribers can understand a kind of reaction but each can implement the reaction in it's own way.

Just a comment about your last sentence:

"I see the announcement as a way to enable loose coupling, making them too specific would require too much knowledge from the subscriber to be considered loosely coupled."

Loose coupling is meant to be between the subscribers and the announcers. Aprioristically it doesn't care at all how much coupled a subscriber is to an announcement. In fact the way you describe you use them (making the subscribers what to do depending on the announcement carried objects) seems tightly coupled when compared to one single double dispatch polymorphic message. But see, that could be just fine until happens to you that you need better than that. By better I mean you *need* polymorphism among subscribers so that's why I've used there double dispatch.</description>
		<content:encoded><![CDATA[<p>At some point after October 8, I decided to bet on Announcements and decided to make the best use I can give to it. There is no reason to use in the subjects of the motivations just symbols because I needed interactive entities there.</p>
<p>At first I&#8217;ve started simple and, like you said, put some collaborators on the announcements so subscribers can decide what to do.</p>
<p>Then I&#8217;ve see a valuable chance of using double dispatch. That way subscribers can understand a kind of reaction but each can implement the reaction in it&#8217;s own way.</p>
<p>Just a comment about your last sentence:</p>
<p>&#8220;I see the announcement as a way to enable loose coupling, making them too specific would require too much knowledge from the subscriber to be considered loosely coupled.&#8221;</p>
<p>Loose coupling is meant to be between the subscribers and the announcers. Aprioristically it doesn&#8217;t care at all how much coupled a subscriber is to an announcement. In fact the way you describe you use them (making the subscribers what to do depending on the announcement carried objects) seems tightly coupled when compared to one single double dispatch polymorphic message. But see, that could be just fine until happens to you that you need better than that. By better I mean you *need* polymorphism among subscribers so that&#8217;s why I&#8217;ve used there double dispatch.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramon Leon</title>
		<link>http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-9074</link>
		<dc:creator>Ramon Leon</dc:creator>
		<pubDate>Wed, 28 Nov 2007 23:29:49 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-9074</guid>
		<description>OK, so you're not slinging symbols, your subjects are real objects, if so that makes sense.  I agree with having generalized announcements where the subscriber inspects the announcement when it happens to see if he's really interested.  

I'd never have announcements so specific that I needed hundreds of them, I'd make them general enough to have a few dozen at most, and carry the extra data on them so listeners can make the decision whether it wants to act on the announcement or not.

I see the announcement as a way to enable loose coupling, making them too specific would require too much knowledge from the subscriber to be considered loosely coupled.</description>
		<content:encoded><![CDATA[<p>OK, so you&#8217;re not slinging symbols, your subjects are real objects, if so that makes sense.  I agree with having generalized announcements where the subscriber inspects the announcement when it happens to see if he&#8217;s really interested.  </p>
<p>I&#8217;d never have announcements so specific that I needed hundreds of them, I&#8217;d make them general enough to have a few dozen at most, and carry the extra data on them so listeners can make the decision whether it wants to act on the announcement or not.</p>
<p>I see the announcement as a way to enable loose coupling, making them too specific would require too much knowledge from the subscriber to be considered loosely coupled.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastian</title>
		<link>http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-9049</link>
		<dc:creator>Sebastian</dc:creator>
		<pubDate>Tue, 27 Nov 2007 22:27:55 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-9049</guid>
		<description>Yes good question Ramon. See the problem itself is not polluting the namespace by itself, that's just one ingredient in the problem cocktail. As far as I see that cocktail has (without sorting about it's priority):

-pollution of the namespace
-consumption of time (so capital) naming things
-consumption of time in organizing classes in packages of about one hundred or two hundred announcements
-To name a new announcement of the very same nature just to make react some particular subscriber. (Now I wonder about this being the critical one)
-Other hidden costs?

 Of course each *ingredient* will be lighter of harder regarding on how heavily or lightly make use of announcements.

 For rich web apps. the trend I'm sensing is to be more heavier than lighter.

 So the short answer is: it's necessary if you want to scale the management of subscription and reaction to announcements in a more general way but maintain things cheap.

 A concrete example (that I will describe simplified): today I've made some editor component to announce aPresenterEventWiringRequested. That announcement claims that it's adding a script to #click event for one of it's buttons, let's say a save button (don't think in a submit button here but, from the DOM point of view you can think as if it where a div with an image inside). 

 The motivation bound to that announcement is the presenter itself (in fact is an editor with a toolbar (with #save and #cancel buttons) and some fields).

  A distant parent presenter of it, has also interest in performing something when #click happens on that element's button, so it register itself as motivated by any PresenterEventWiringRequested who has as subject that presenter.

 When real render time comes for the #click of that button the editor component adds it's own action scripts and announces. That way the subscribers, that distant parent between them, because it was motivated, receives that announcement so they have the chance to add it's own scripts (maintaining the separation of concerns between them). 

 With a little help on how to render things the result is that you'll have the script of that button with the effects or stuff of he's own, lets say close the editor with an effect, concern added to the other scripts added by the motivated subscribers, lets say to change some status bar or whatever task or update disconnected from the editor.

  That way I have only one general announcement for doing things about how to wire element's events that only the proper instances will react to and I'm not forced to create different ones just because it's another button (just to mention one of a dozen of widgets multiplied by about a dozed of potential events they can react). 

 I hope I'm being clear enough :)

Cheers,

Sebastian</description>
		<content:encoded><![CDATA[<p>Yes good question Ramon. See the problem itself is not polluting the namespace by itself, that&#8217;s just one ingredient in the problem cocktail. As far as I see that cocktail has (without sorting about it&#8217;s priority):</p>
<p>-pollution of the namespace<br />
-consumption of time (so capital) naming things<br />
-consumption of time in organizing classes in packages of about one hundred or two hundred announcements<br />
-To name a new announcement of the very same nature just to make react some particular subscriber. (Now I wonder about this being the critical one)<br />
-Other hidden costs?</p>
<p> Of course each *ingredient* will be lighter of harder regarding on how heavily or lightly make use of announcements.</p>
<p> For rich web apps. the trend I&#8217;m sensing is to be more heavier than lighter.</p>
<p> So the short answer is: it&#8217;s necessary if you want to scale the management of subscription and reaction to announcements in a more general way but maintain things cheap.</p>
<p> A concrete example (that I will describe simplified): today I&#8217;ve made some editor component to announce aPresenterEventWiringRequested. That announcement claims that it&#8217;s adding a script to #click event for one of it&#8217;s buttons, let&#8217;s say a save button (don&#8217;t think in a submit button here but, from the DOM point of view you can think as if it where a div with an image inside). </p>
<p> The motivation bound to that announcement is the presenter itself (in fact is an editor with a toolbar (with #save and #cancel buttons) and some fields).</p>
<p>  A distant parent presenter of it, has also interest in performing something when #click happens on that element&#8217;s button, so it register itself as motivated by any PresenterEventWiringRequested who has as subject that presenter.</p>
<p> When real render time comes for the #click of that button the editor component adds it&#8217;s own action scripts and announces. That way the subscribers, that distant parent between them, because it was motivated, receives that announcement so they have the chance to add it&#8217;s own scripts (maintaining the separation of concerns between them). </p>
<p> With a little help on how to render things the result is that you&#8217;ll have the script of that button with the effects or stuff of he&#8217;s own, lets say close the editor with an effect, concern added to the other scripts added by the motivated subscribers, lets say to change some status bar or whatever task or update disconnected from the editor.</p>
<p>  That way I have only one general announcement for doing things about how to wire element&#8217;s events that only the proper instances will react to and I&#8217;m not forced to create different ones just because it&#8217;s another button (just to mention one of a dozen of widgets multiplied by about a dozed of potential events they can react). </p>
<p> I hope I&#8217;m being clear enough :)</p>
<p>Cheers,</p>
<p>Sebastian</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramon Leon</title>
		<link>http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-9046</link>
		<dc:creator>Ramon Leon</dc:creator>
		<pubDate>Tue, 27 Nov 2007 21:36:57 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-9046</guid>
		<description>Sorry I took so long to reply, I'd forgotten.  It sounds interesting, but I wonder what this fear of "polluting the announcements space of names" is all about.  Is that really a problem?  Isn't giving an announcement a subject just going back to slinging symbols?  I'd be curious to see some more concrete examples of why this would be necessary.</description>
		<content:encoded><![CDATA[<p>Sorry I took so long to reply, I&#8217;d forgotten.  It sounds interesting, but I wonder what this fear of &#8220;polluting the announcements space of names&#8221; is all about.  Is that really a problem?  Isn&#8217;t giving an announcement a subject just going back to slinging symbols?  I&#8217;d be curious to see some more concrete examples of why this would be necessary.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastian</title>
		<link>http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-8904</link>
		<dc:creator>Sebastian</dc:creator>
		<pubDate>Sat, 24 Nov 2007 14:33:53 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-8904</guid>
		<description>Hi Ramon,

 I faced the situation in which I want to subscribe some component to an announcement but that component don't want to receive all the announcements of that kind of announcement. I just want/need that component to receive some of them and ignore others.

 In the magazine analogy you'll receive all numbers but you will select just those with the subject you are interested in.

  First I thought about creating classes is very cheap (you only pay one slot in the global namespace and use some operative time for properly name it).

  Lots of times that is enough but sometimes I actually need the same kind of motivation but with different subjects. So I wonder how you or if you know ways to deal with that.

  I also wanted to expose here this to criticism to see if it survives more than mine (which so far it is because it works well):

  I've made Motivations for that filtering process. Subscribers have a collection of motivations, empty by default. So they can define it's criteria for selecting announcements by adding Motivations about subjects.

  The announcements I'm using always have to be made and announced with a motivation.

  So if the component matches the satisfaction criteria between motivations then the announcement performs the intended action.

  As default satisfaction criteria I've implemented an affinity policy by making #satisfies: aMotivation to answer true when the motivations are same class has the same subject.

  That makes the feature and prevents me of polluting the announcements space of names.

Cheers</description>
		<content:encoded><![CDATA[<p>Hi Ramon,</p>
<p> I faced the situation in which I want to subscribe some component to an announcement but that component don&#8217;t want to receive all the announcements of that kind of announcement. I just want/need that component to receive some of them and ignore others.</p>
<p> In the magazine analogy you&#8217;ll receive all numbers but you will select just those with the subject you are interested in.</p>
<p>  First I thought about creating classes is very cheap (you only pay one slot in the global namespace and use some operative time for properly name it).</p>
<p>  Lots of times that is enough but sometimes I actually need the same kind of motivation but with different subjects. So I wonder how you or if you know ways to deal with that.</p>
<p>  I also wanted to expose here this to criticism to see if it survives more than mine (which so far it is because it works well):</p>
<p>  I&#8217;ve made Motivations for that filtering process. Subscribers have a collection of motivations, empty by default. So they can define it&#8217;s criteria for selecting announcements by adding Motivations about subjects.</p>
<p>  The announcements I&#8217;m using always have to be made and announced with a motivation.</p>
<p>  So if the component matches the satisfaction criteria between motivations then the announcement performs the intended action.</p>
<p>  As default satisfaction criteria I&#8217;ve implemented an affinity policy by making #satisfies: aMotivation to answer true when the motivations are same class has the same subject.</p>
<p>  That makes the feature and prevents me of polluting the announcements space of names.</p>
<p>Cheers</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastian</title>
		<link>http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-6224</link>
		<dc:creator>Sebastian</dc:creator>
		<pubDate>Wed, 10 Oct 2007 15:40:28 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-6224</guid>
		<description>Mmm it's a big framework so unable to find a way to put this clearly in less than 40 min but I can give you references that will show you a base.

MVP, Model View Presenter is remarkably implemented in Dolphin Smalltalk. This ST happens to be windows coupled and heavily desktop development oriented.

This environment is very good for that. It's just desktop apps are today's IMHO a more risky business than yesterdays.

You can download the community edition which is free and play around to have the MVP idea.

Several years ago in the seaside list (must be in the archives) I discussed about using seaside components as presenters (presenters in the MVP mean). So the gap between developing desktop or web apps is 5% (actually to achieve the gap to be 1% we need something full duplex like comet).

This allows reusability of basic presenters to be used and abused. I remember Avi arguing that in web the views are so custom that he was not convinced about that being good. I'm still seeing (now feeling) as a good equation for non hacker spirits. I'm feeling that the degree of compositionability is greater. Of course you can allways compose but one thing is to compose to gain just structure and other to gain structure and behavior. I'm feeling that using seaside like this brings a higher rate of real use of that common (so factorized) behavior trough composition as it used to happen in desktop development.

If you want to feed curiosity take a look in any dolphin st example how you will have to implement do a shell with a couple of TextPresenters (as inputs) and then suppose that you don't have the TextView object that connects your TextPresenters to the OS primitives and callbacks.

Instead of having a TextView talking to the OS how to draw, you have an html canvas to perform the same task (of course todays user agents will make you unable to do everything you can do directly with the OS). That way, user agents becomes the OS and/or the hardware.

That's the way I'm using seaside: for me user agents are hardware and the canvas are the assembler that gives me access to tell how I want things to be drawn (and a limited behavior by using prototype/scriptaculous).

So instead of XClassView's I have "primitives" methods that renders the presenter serializing it in a mix of html and js as it's species defines how to do it.

The user agents are who really have the View objects reified from that serialized stuff in the DOM.

So the architecture will be a kind of Model-PresenterView
a view that can do some stuff local and some other interacting with it's presenter.

My hierarchy of seaside components is progressively refining as in an analogue way as you can see in it's dolphin homologue Presenter class.

I even spend some time rising the bet by trying the next logical step: making the Views in user agents not to be a metaphore but real objects defined by it's seaside homologues. That way seaside components will define it's own behavior (at server) and the behavior of it's DOM homologues instances (events wiring and reacting included).

That, for instance, allows multiple events triggered and reacting regarding to it's species in the user agent without even one html request. The requests and the updates work only when absolutely necessary. Transparent access to factorized behavior, etc.

Was a proof of concept. Can be done. It's works, but... todays it performs miserably. So I gave a step back.. I'm disappointed with js performance, memory consumption, bad GC.. what can I say. Using it right and performing bad.. stupid machines. It's a pity. I'll wait, I don't know maybe in a couple of years. I've read that Firefox 4 will have a new js vm donated by adobe to the open community. That is promising x10 the actual performance. We shall see..</description>
		<content:encoded><![CDATA[<p>Mmm it&#8217;s a big framework so unable to find a way to put this clearly in less than 40 min but I can give you references that will show you a base.</p>
<p>MVP, Model View Presenter is remarkably implemented in Dolphin Smalltalk. This ST happens to be windows coupled and heavily desktop development oriented.</p>
<p>This environment is very good for that. It&#8217;s just desktop apps are today&#8217;s IMHO a more risky business than yesterdays.</p>
<p>You can download the community edition which is free and play around to have the MVP idea.</p>
<p>Several years ago in the seaside list (must be in the archives) I discussed about using seaside components as presenters (presenters in the MVP mean). So the gap between developing desktop or web apps is 5% (actually to achieve the gap to be 1% we need something full duplex like comet).</p>
<p>This allows reusability of basic presenters to be used and abused. I remember Avi arguing that in web the views are so custom that he was not convinced about that being good. I&#8217;m still seeing (now feeling) as a good equation for non hacker spirits. I&#8217;m feeling that the degree of compositionability is greater. Of course you can allways compose but one thing is to compose to gain just structure and other to gain structure and behavior. I&#8217;m feeling that using seaside like this brings a higher rate of real use of that common (so factorized) behavior trough composition as it used to happen in desktop development.</p>
<p>If you want to feed curiosity take a look in any dolphin st example how you will have to implement do a shell with a couple of TextPresenters (as inputs) and then suppose that you don&#8217;t have the TextView object that connects your TextPresenters to the OS primitives and callbacks.</p>
<p>Instead of having a TextView talking to the OS how to draw, you have an html canvas to perform the same task (of course todays user agents will make you unable to do everything you can do directly with the OS). That way, user agents becomes the OS and/or the hardware.</p>
<p>That&#8217;s the way I&#8217;m using seaside: for me user agents are hardware and the canvas are the assembler that gives me access to tell how I want things to be drawn (and a limited behavior by using prototype/scriptaculous).</p>
<p>So instead of XClassView&#8217;s I have &#8220;primitives&#8221; methods that renders the presenter serializing it in a mix of html and js as it&#8217;s species defines how to do it.</p>
<p>The user agents are who really have the View objects reified from that serialized stuff in the DOM.</p>
<p>So the architecture will be a kind of Model-PresenterView<br />
a view that can do some stuff local and some other interacting with it&#8217;s presenter.</p>
<p>My hierarchy of seaside components is progressively refining as in an analogue way as you can see in it&#8217;s dolphin homologue Presenter class.</p>
<p>I even spend some time rising the bet by trying the next logical step: making the Views in user agents not to be a metaphore but real objects defined by it&#8217;s seaside homologues. That way seaside components will define it&#8217;s own behavior (at server) and the behavior of it&#8217;s DOM homologues instances (events wiring and reacting included).</p>
<p>That, for instance, allows multiple events triggered and reacting regarding to it&#8217;s species in the user agent without even one html request. The requests and the updates work only when absolutely necessary. Transparent access to factorized behavior, etc.</p>
<p>Was a proof of concept. Can be done. It&#8217;s works, but&#8230; todays it performs miserably. So I gave a step back.. I&#8217;m disappointed with js performance, memory consumption, bad GC.. what can I say. Using it right and performing bad.. stupid machines. It&#8217;s a pity. I&#8217;ll wait, I don&#8217;t know maybe in a couple of years. I&#8217;ve read that Firefox 4 will have a new js vm donated by adobe to the open community. That is promising x10 the actual performance. We shall see..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramon Leon</title>
		<link>http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-6188</link>
		<dc:creator>Ramon Leon</dc:creator>
		<pubDate>Tue, 09 Oct 2007 17:25:00 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-6188</guid>
		<description>You wouldn't have a small example would you?  I'm curious to see what you mean.</description>
		<content:encoded><![CDATA[<p>You wouldn&#8217;t have a small example would you?  I&#8217;m curious to see what you mean.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastian</title>
		<link>http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-6181</link>
		<dc:creator>Sebastian</dc:creator>
		<pubDate>Tue, 09 Oct 2007 13:41:54 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-6181</guid>
		<description>Yeah, the need emerges from using seaside components ala MVP where you have separated the component graph building-time from the event wiring-time (and for last the render-time). In the way it's implemented now happens that in that process, the event wiring can be called twice. I've solved it by subscribing at subcomponents at creation time which is guaranteed that it's called once per component. Seems good</description>
		<content:encoded><![CDATA[<p>Yeah, the need emerges from using seaside components ala MVP where you have separated the component graph building-time from the event wiring-time (and for last the render-time). In the way it&#8217;s implemented now happens that in that process, the event wiring can be called twice. I&#8217;ve solved it by subscribing at subcomponents at creation time which is guaranteed that it&#8217;s called once per component. Seems good</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramon Leon</title>
		<link>http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-6171</link>
		<dc:creator>Ramon Leon</dc:creator>
		<pubDate>Tue, 09 Oct 2007 03:09:22 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-6171</guid>
		<description>Hm, I've never run into the scenario where I've subscribed twice.  I usually subscribe to interesting announcements in an object's initialize method.  I haven't found the need to subscribe and unsubscribe multiple times within an instance, yet.  The announcements themselves I create new for each subscription, so I'd expect two subscriptions to result in two callbacks, because I'd mentally link that with the instances of the announcements.</description>
		<content:encoded><![CDATA[<p>Hm, I&#8217;ve never run into the scenario where I&#8217;ve subscribed twice.  I usually subscribe to interesting announcements in an object&#8217;s initialize method.  I haven&#8217;t found the need to subscribe and unsubscribe multiple times within an instance, yet.  The announcements themselves I create new for each subscription, so I&#8217;d expect two subscriptions to result in two callbacks, because I&#8217;d mentally link that with the instances of the announcements.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastian</title>
		<link>http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-6167</link>
		<dc:creator>Sebastian</dc:creator>
		<pubDate>Mon, 08 Oct 2007 23:42:35 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-6167</guid>
		<description>Yeah, one way or another we never evade the pra$matig variable so no matter what we can't distract from it too much.

OK, now I've used announcements in the session and perceived that if a component subscribes 2 times the same announcement to send the same message to the same receiver, the receiver will receive 2 announces not 1.

Mmm subtle.. unexpected coming from a Dolphiner but it really can't be considered wrong. If I subscribe myself twice to receive Nature magazine then is expected I receive 2 copies not 1.

One should manage subscriptions with caution about this.</description>
		<content:encoded><![CDATA[<p>Yeah, one way or another we never evade the pra$matig variable so no matter what we can&#8217;t distract from it too much.</p>
<p>OK, now I&#8217;ve used announcements in the session and perceived that if a component subscribes 2 times the same announcement to send the same message to the same receiver, the receiver will receive 2 announces not 1.</p>
<p>Mmm subtle.. unexpected coming from a Dolphiner but it really can&#8217;t be considered wrong. If I subscribe myself twice to receive Nature magazine then is expected I receive 2 copies not 1.</p>
<p>One should manage subscriptions with caution about this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramon Leon</title>
		<link>http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-6079</link>
		<dc:creator>Ramon Leon</dc:creator>
		<pubDate>Fri, 05 Oct 2007 16:24:56 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-6079</guid>
		<description>OK, I certainly don't mean to put words in your mouth.  Upgrade... now that's something you haven't said before, from that point of view you're right, Announcements isn't worth the cost.  I'm only talking about the building of new applications, at least, that's an unstated assumption I was making because I don't have a bunch of older code using #triggerEvent.

Given the choice between the two, from my position of *new* code, the choice for Announcements is obvious, it's more object oriented and IMHO more elegant than #triggerEvent.

As for OmniBrowser, I think it's clearly already been adopted, all the new tools I see are being written in it, because *I guess* it makes building browsers vastly easier than prior frameworks (I've never build anything in Morphic, only Seaside so I can't really say).</description>
		<content:encoded><![CDATA[<p>OK, I certainly don&#8217;t mean to put words in your mouth.  Upgrade&#8230; now that&#8217;s something you haven&#8217;t said before, from that point of view you&#8217;re right, Announcements isn&#8217;t worth the cost.  I&#8217;m only talking about the building of new applications, at least, that&#8217;s an unstated assumption I was making because I don&#8217;t have a bunch of older code using #triggerEvent.</p>
<p>Given the choice between the two, from my position of *new* code, the choice for Announcements is obvious, it&#8217;s more object oriented and IMHO more elegant than #triggerEvent.</p>
<p>As for OmniBrowser, I think it&#8217;s clearly already been adopted, all the new tools I see are being written in it, because *I guess* it makes building browsers vastly easier than prior frameworks (I&#8217;ve never build anything in Morphic, only Seaside so I can&#8217;t really say).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastian</title>
		<link>http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-6078</link>
		<dc:creator>Sebastian</dc:creator>
		<pubDate>Fri, 05 Oct 2007 14:33:25 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-6078</guid>
		<description>That's not my attitude and I'm not saying that. Besides, would be good not to put words others did not say in their mouth don't you think?

Clarifying and taking your line of reasoning my position can be compatible with something like: “hey, #triggerEvent can do this, why should I now look at Announcements and manage to pay the operative costs of the upgrade”.

Thanks for the link, I've already read the Vassili post about Announcements and still concluding the same two differences (documentation and elegance) because I'm still unable to see any additional one (that's why I asked about that in first place summarized by the phrase "show me the value").

Now.. it's true that for new applications that cost would be less significant so it's starting to be attractive *for those cases only* to embrace Announcements now. Which I see as the most valuable conclusion related to development emerging from this discussion.

I know you're not trying of convincing me, I like that from your posts and your attitude in replies. You encourage but do not evangelize. That's very valuable and is an intelligent position from my view.

About OmniBrowser well lets see what happens, I think the squeak and the ST community in general is clever enough to embrace valuable frameworks, and, as I said before, have no aprioristic problems with more refined systems/subsystems once they prove they induce better results.</description>
		<content:encoded><![CDATA[<p>That&#8217;s not my attitude and I&#8217;m not saying that. Besides, would be good not to put words others did not say in their mouth don&#8217;t you think?</p>
<p>Clarifying and taking your line of reasoning my position can be compatible with something like: “hey, #triggerEvent can do this, why should I now look at Announcements and manage to pay the operative costs of the upgrade”.</p>
<p>Thanks for the link, I&#8217;ve already read the Vassili post about Announcements and still concluding the same two differences (documentation and elegance) because I&#8217;m still unable to see any additional one (that&#8217;s why I asked about that in first place summarized by the phrase &#8220;show me the value&#8221;).</p>
<p>Now.. it&#8217;s true that for new applications that cost would be less significant so it&#8217;s starting to be attractive *for those cases only* to embrace Announcements now. Which I see as the most valuable conclusion related to development emerging from this discussion.</p>
<p>I know you&#8217;re not trying of convincing me, I like that from your posts and your attitude in replies. You encourage but do not evangelize. That&#8217;s very valuable and is an intelligent position from my view.</p>
<p>About OmniBrowser well lets see what happens, I think the squeak and the ST community in general is clever enough to embrace valuable frameworks, and, as I said before, have no aprioristic problems with more refined systems/subsystems once they prove they induce better results.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramon Leon</title>
		<link>http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-6061</link>
		<dc:creator>Ramon Leon</dc:creator>
		<pubDate>Thu, 04 Oct 2007 17:38:04 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-6061</guid>
		<description>You're making the blub argument, saying "hey, #triggerEvent can do this, why should I ever look at anything else".  As I said, go read the &lt;a href="http://www.cincomsmalltalk.com/userblogs/vbykov/blogView?showComments=true&#038;entry=3310034894" rel="nofollow"&gt;Announcements framework&lt;/a&gt; post on the blog I linked to, he shows you the value, and makes the case.  #triggerEvent has weaknesses related to it not being object oriented, Announcements makes certain things *easier*, than with #triggerEvent, which he discusses in his post and in the comments and trackbacks linking to his post.

I'm not trying to convince you of anything, that's up to you, if you want to continue to use #triggerEvent because you're cozy with, be my guest.  Announcements are a better design, and if you want to get into the newer frameworks coming out, like Omni Browser, you need to learn Announcements because it's what people prefer and it's what is going to be used.</description>
		<content:encoded><![CDATA[<p>You&#8217;re making the blub argument, saying &#8220;hey, #triggerEvent can do this, why should I ever look at anything else&#8221;.  As I said, go read the <a href="http://www.cincomsmalltalk.com/userblogs/vbykov/blogView?showComments=true&#038;entry=3310034894" rel="nofollow">Announcements framework</a> post on the blog I linked to, he shows you the value, and makes the case.  #triggerEvent has weaknesses related to it not being object oriented, Announcements makes certain things *easier*, than with #triggerEvent, which he discusses in his post and in the comments and trackbacks linking to his post.</p>
<p>I&#8217;m not trying to convince you of anything, that&#8217;s up to you, if you want to continue to use #triggerEvent because you&#8217;re cozy with, be my guest.  Announcements are a better design, and if you want to get into the newer frameworks coming out, like Omni Browser, you need to learn Announcements because it&#8217;s what people prefer and it&#8217;s what is going to be used.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastian</title>
		<link>http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-6060</link>
		<dc:creator>Sebastian</dc:creator>
		<pubDate>Thu, 04 Oct 2007 16:56:26 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-6060</guid>
		<description>Yeah, but their arguments are objects. In the last year what do you need to solve with events that a triggered event wasn't able to help you with?

In inverse order: 

1. About your claim of more looseness. As I posted before I see it depends on how you use them so I still unable to see where announcements it's *more loosely coupled* as you claim. Can you demonstrate that?
2. About adding arguments to the announcement. It is a requeriment to solve what kind of problem? Anyway, nothing stops you to add whatever you want to the objects that came in the arguments of a triggered event.
3. You may already know that you can pass N objects as arguments of a triggered event using:  #triggerEvent: aSymbol withArguments: anArray

Todays the only thing I've see as a difference with triggered events is:
1. Documentation
2. Elegance by reinventing the subsystem more object orientedly

I have no particular problem with the last two.

Listen.. I like a lot your blog because it brings to discuss very valuable things and it is getting richer and richer material is good to experiment things. This discussions are necessary to explore new possibilities. But I'm also a pragmatic person. So.. show me the value. (LOL)

Hey.. I'm all ears to listen what are those things easily doable with announcements that would be hard or impossible with triggered events once those things proves that they are valuable. In the meantime, with a little of curiosity about announcements future and community adoption, I'll still be using triggered events.</description>
		<content:encoded><![CDATA[<p>Yeah, but their arguments are objects. In the last year what do you need to solve with events that a triggered event wasn&#8217;t able to help you with?</p>
<p>In inverse order: </p>
<p>1. About your claim of more looseness. As I posted before I see it depends on how you use them so I still unable to see where announcements it&#8217;s *more loosely coupled* as you claim. Can you demonstrate that?<br />
2. About adding arguments to the announcement. It is a requeriment to solve what kind of problem? Anyway, nothing stops you to add whatever you want to the objects that came in the arguments of a triggered event.<br />
3. You may already know that you can pass N objects as arguments of a triggered event using:  #triggerEvent: aSymbol withArguments: anArray</p>
<p>Todays the only thing I&#8217;ve see as a difference with triggered events is:<br />
1. Documentation<br />
2. Elegance by reinventing the subsystem more object orientedly</p>
<p>I have no particular problem with the last two.</p>
<p>Listen.. I like a lot your blog because it brings to discuss very valuable things and it is getting richer and richer material is good to experiment things. This discussions are necessary to explore new possibilities. But I&#8217;m also a pragmatic person. So.. show me the value. (LOL)</p>
<p>Hey.. I&#8217;m all ears to listen what are those things easily doable with announcements that would be hard or impossible with triggered events once those things proves that they are valuable. In the meantime, with a little of curiosity about announcements future and community adoption, I&#8217;ll still be using triggered events.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramon Leon</title>
		<link>http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-6052</link>
		<dc:creator>Ramon Leon</dc:creator>
		<pubDate>Thu, 04 Oct 2007 00:03:45 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-6052</guid>
		<description>I think you're missing the point, in the old event framework, events weren't objects, they were symbols

self triggerEvent: #addQuotedItem:in: with: aQuotedItem with: aHugeBudget

and you passed args knowing what the method you'd be calling looked like, i.e. it takes two args.  Announcements are more flexible because the event itself is an object, and it carries its arguments inside of it, if you add 2 or 3 more arguments to the announcement, it won't break anything.  It's more loosely coupled.  

Did you follow my link above and read Vassili's reasoning?  He goes pretty deep into explaining why Announcements are better than the old #triggerEvent and enable you do easily do things that were nigh impossible before.</description>
		<content:encoded><![CDATA[<p>I think you&#8217;re missing the point, in the old event framework, events weren&#8217;t objects, they were symbols</p>
<p>self triggerEvent: #addQuotedItem:in: with: aQuotedItem with: aHugeBudget</p>
<p>and you passed args knowing what the method you&#8217;d be calling looked like, i.e. it takes two args.  Announcements are more flexible because the event itself is an object, and it carries its arguments inside of it, if you add 2 or 3 more arguments to the announcement, it won&#8217;t break anything.  It&#8217;s more loosely coupled.  </p>
<p>Did you follow my link above and read Vassili&#8217;s reasoning?  He goes pretty deep into explaining why Announcements are better than the old #triggerEvent and enable you do easily do things that were nigh impossible before.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastian</title>
		<link>http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-6040</link>
		<dc:creator>Sebastian</dc:creator>
		<pubDate>Wed, 03 Oct 2007 12:56:47 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-6040</guid>
		<description>Mmmm not really. Look.. any object can do this anytime since what? 1972?:

   self triggerEvent: #addQuotedItem:in: with: aQuotedItem with: aHugeBudget

and any other that has previously hooked #addQuotedItem:in: from it will receive the message with the arguments. This is working like this since MVC exists.

Anyway.. to be fair I have to tell that yesterday I though I've found an answer to that question and was: "more looseness, this is, to hook even unreacheables".

When you hook a traditional event you make it by reaching the "neigher" object first like this:

  self someComponent when: #someEvent: send: #someReaction: to: self

so with traditional events the reachability of the object that will trigger them is a must. While in the other hand with announcements you don't need to reach the objects that will neigh the events and you will still receive the events when they happen. But then I've figured that it is not out of the box. That you implemented that by making one announcer reachable in the Seaside user session and all the rest hook to it.

And as traditional events makes any object the ability to be "an announcer" I'm perceiving reinventing wheel situation here because I can implement the same with traditional events.  

Take a look:

Parent&#62;&#62;initialize
    super initialize.
    self session when: #removeChild: send: #removeChild: to: self

Child&#62;&#62;removeMe
     self session triggerEvent: #removeChild: with: self

Now tell me you don't love Smalltalk...  LOL</description>
		<content:encoded><![CDATA[<p>Mmmm not really. Look.. any object can do this anytime since what? 1972?:</p>
<p>   self triggerEvent: #addQuotedItem:in: with: aQuotedItem with: aHugeBudget</p>
<p>and any other that has previously hooked #addQuotedItem:in: from it will receive the message with the arguments. This is working like this since MVC exists.</p>
<p>Anyway.. to be fair I have to tell that yesterday I though I&#8217;ve found an answer to that question and was: &#8220;more looseness, this is, to hook even unreacheables&#8221;.</p>
<p>When you hook a traditional event you make it by reaching the &#8220;neigher&#8221; object first like this:</p>
<p>  self someComponent when: #someEvent: send: #someReaction: to: self</p>
<p>so with traditional events the reachability of the object that will trigger them is a must. While in the other hand with announcements you don&#8217;t need to reach the objects that will neigh the events and you will still receive the events when they happen. But then I&#8217;ve figured that it is not out of the box. That you implemented that by making one announcer reachable in the Seaside user session and all the rest hook to it.</p>
<p>And as traditional events makes any object the ability to be &#8220;an announcer&#8221; I&#8217;m perceiving reinventing wheel situation here because I can implement the same with traditional events.  </p>
<p>Take a look:</p>
<p>Parent&gt;&gt;initialize<br />
    super initialize.<br />
    self session when: #removeChild: send: #removeChild: to: self</p>
<p>Child&gt;&gt;removeMe<br />
     self session triggerEvent: #removeChild: with: self</p>
<p>Now tell me you don&#8217;t love Smalltalk&#8230;  LOL</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramon Leon</title>
		<link>http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-6030</link>
		<dc:creator>Ramon Leon</dc:creator>
		<pubDate>Tue, 02 Oct 2007 19:02:18 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-6030</guid>
		<description>Use objects that contain arguments.  Why throw around symbols when you can throw around real objects that are so much more powerful?</description>
		<content:encoded><![CDATA[<p>Use objects that contain arguments.  Why throw around symbols when you can throw around real objects that are so much more powerful?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sebastian</title>
		<link>http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-6025</link>
		<dc:creator>Sebastian</dc:creator>
		<pubDate>Tue, 02 Oct 2007 13:48:55 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-6025</guid>
		<description>Question: What does announcements allow the developer to do that he/she can't do using regular #when:send:to: / #triggerEvent:with: mechanism?</description>
		<content:encoded><![CDATA[<p>Question: What does announcements allow the developer to do that he/she can&#8217;t do using regular #when:send:to: / #triggerEvent:with: mechanism?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramon Leon</title>
		<link>http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-2806</link>
		<dc:creator>Ramon Leon</dc:creator>
		<pubDate>Mon, 14 May 2007 20:43:40 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-2806</guid>
		<description>Have just been busy.  I'll post something soon.</description>
		<content:encoded><![CDATA[<p>Have just been busy.  I&#8217;ll post something soon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-2804</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Mon, 14 May 2007 17:22:42 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-2804</guid>
		<description>hi Ramon,
no new entry from long time ?</description>
		<content:encoded><![CDATA[<p>hi Ramon,<br />
no new entry from long time ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ramon Leon</title>
		<link>http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-2763</link>
		<dc:creator>Ramon Leon</dc:creator>
		<pubDate>Mon, 30 Apr 2007 20:46:44 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-2763</guid>
		<description>Yup, convenience methods, the session is delegating to the announcer.</description>
		<content:encoded><![CDATA[<p>Yup, convenience methods, the session is delegating to the announcer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Roberts</title>
		<link>http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-2762</link>
		<dc:creator>Mike Roberts</dc:creator>
		<pubDate>Mon, 30 Apr 2007 18:45:13 +0000</pubDate>
		<guid isPermaLink="false">http://onsmalltalk.com/programming/smalltalk/maintaining-loose-coupling-in-seaside-components/#comment-2762</guid>
		<description>Hi Ramon,
I've started to play with announcements following comments by yourself and Lukas.  Just looking at your initial example - are there sends to #announcer missing?  I'm sorry if I missed something.  e.g. 

self session on: RemoveChild send: #removeChild: to: self
self session announcer on: ...

or have you implemented convenience methods on the session itself?

Cheers,

Mike</description>
		<content:encoded><![CDATA[<p>Hi Ramon,<br />
I&#8217;ve started to play with announcements following comments by yourself and Lukas.  Just looking at your initial example - are there sends to #announcer missing?  I&#8217;m sorry if I missed something.  e.g. </p>
<p>self session on: RemoveChild send: #removeChild: to: self<br />
self session announcer on: &#8230;</p>
<p>or have you implemented convenience methods on the session itself?</p>
<p>Cheers,</p>
<p>Mike</p>
]]></content:encoded>
	</item>
</channel>
</rss>
