<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www.lostechies.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Colin Ramsay - All Comments</title><link>http://www.lostechies.com/blogs/colin_ramsay/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2008.5 (Build: 30929.2835)</generator><item><title>Anti-Patterns and Worst Practices – Monster Objects</title><link>http://www.lostechies.com/blogs/colin_ramsay/archive/2009/05/05/breaking-free-from-httpcontext.aspx#21303</link><pubDate>Thu, 28 May 2009 23:30:18 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:21303</guid><dc:creator>Chris Missal</dc:creator><description>&lt;p&gt;Monster objects (or God objects ) know too much, or do too much; monster objects are nasty beasts. The&lt;/p&gt;
&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=21303" width="1" height="1"&gt;</description></item><item><title>re: PTOM: Breaking Free from HttpContext</title><link>http://www.lostechies.com/blogs/colin_ramsay/archive/2009/05/05/breaking-free-from-httpcontext.aspx#21273</link><pubDate>Wed, 27 May 2009 23:01:09 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:21273</guid><dc:creator>mycall</dc:creator><description>&lt;p&gt;Here is another workaround to embedding HttpContext.Current.Session..&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;public class ContextStorage&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;[ThreadStatic]&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;private static Dictionary&amp;lt;string, object&amp;gt; threadContext = new Dictionary&amp;lt;string, object&amp;gt;();&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public static bool IsWebContext()&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;try&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return (HttpContext.Current != null);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;catch (HttpException) { }&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return false;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public static IDictionary Items&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;get&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return IsWebContext() ? HttpContext.Current.Items : threadContext;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=21273" width="1" height="1"&gt;</description></item><item><title>Weekly Web Nuggets #63</title><link>http://www.lostechies.com/blogs/colin_ramsay/archive/2009/05/05/breaking-free-from-httpcontext.aspx#21036</link><pubDate>Sun, 17 May 2009 02:17:13 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:21036</guid><dc:creator>Code Monkey Labs</dc:creator><description>&lt;p&gt;Pick of the week: Flash vs. Silverlight – What Suites Your Needs Best? General Castle Windsor 2.0 RTM Released : Ayende Rahien announces the 2.0 release of the Windsor project. Windows API Code Pack for Microsoft .NET Framework : This latest drop of the&lt;/p&gt;
&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=21036" width="1" height="1"&gt;</description></item><item><title>ASP.NET MVC Archived Blog Posts, Page 1</title><link>http://www.lostechies.com/blogs/colin_ramsay/archive/2009/05/05/breaking-free-from-httpcontext.aspx#20871</link><pubDate>Thu, 07 May 2009 05:44:22 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:20871</guid><dc:creator>ASP.NET MVC Archived Blog Posts, Page 1</dc:creator><description>&lt;p&gt;Pingback from &amp;nbsp;ASP.NET MVC Archived Blog Posts, Page 1&lt;/p&gt;
&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=20871" width="1" height="1"&gt;</description></item><item><title>Arjan`s World    &amp;raquo; LINKBLOG for May 6, 2009</title><link>http://www.lostechies.com/blogs/colin_ramsay/archive/2009/05/05/breaking-free-from-httpcontext.aspx#20846</link><pubDate>Wed, 06 May 2009 14:04:51 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:20846</guid><dc:creator>Arjan`s World    » LINKBLOG for May 6, 2009</dc:creator><description>&lt;p&gt;Pingback from &amp;nbsp;Arjan`s World &amp;nbsp; &amp;nbsp;&amp;raquo; LINKBLOG for May 6, 2009&lt;/p&gt;
&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=20846" width="1" height="1"&gt;</description></item><item><title>Reflective Perspective - Chris Alcock  &amp;raquo; The Morning Brew #341</title><link>http://www.lostechies.com/blogs/colin_ramsay/archive/2009/05/05/breaking-free-from-httpcontext.aspx#20840</link><pubDate>Wed, 06 May 2009 07:35:09 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:20840</guid><dc:creator>Reflective Perspective - Chris Alcock  » The Morning Brew #341</dc:creator><description>&lt;p&gt;Pingback from &amp;nbsp;Reflective Perspective - Chris Alcock &amp;nbsp;&amp;raquo; The Morning Brew #341&lt;/p&gt;
&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=20840" width="1" height="1"&gt;</description></item><item><title>PTOM: Breaking Free from HttpContext - Colin Ramsay -</title><link>http://www.lostechies.com/blogs/colin_ramsay/archive/2009/05/05/breaking-free-from-httpcontext.aspx#20834</link><pubDate>Wed, 06 May 2009 04:10:57 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:20834</guid><dc:creator>DotNetShoutout</dc:creator><description>&lt;p&gt;Thank you for submitting this cool story - Trackback from DotNetShoutout&lt;/p&gt;
&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=20834" width="1" height="1"&gt;</description></item><item><title>Pablo’s Topic of the Month – May 2009 Edition</title><link>http://www.lostechies.com/blogs/colin_ramsay/archive/2009/05/05/breaking-free-from-httpcontext.aspx#20819</link><pubDate>Tue, 05 May 2009 17:54:36 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:20819</guid><dc:creator>That Other Guy . . .</dc:creator><description>&lt;p&gt;Have you ever read a blog post about TDD, Dependency Injection, or some other concept and thought, &amp;ldquo;Sounds&lt;/p&gt;
&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=20819" width="1" height="1"&gt;</description></item><item><title>Arjan`s World    &amp;raquo; LINKBLOG for January 27, 2009</title><link>http://www.lostechies.com/blogs/colin_ramsay/archive/2009/01/25/castle-microkernel-fluent-event-wiring.aspx#14822</link><pubDate>Tue, 27 Jan 2009 20:23:05 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:14822</guid><dc:creator>Arjan`s World    » LINKBLOG for January 27, 2009</dc:creator><description>&lt;p&gt;Pingback from &amp;nbsp;Arjan`s World &amp;nbsp; &amp;nbsp;&amp;raquo; LINKBLOG for January 27, 2009&lt;/p&gt;
&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=14822" width="1" height="1"&gt;</description></item><item><title>re: Castle MicroKernel Fluent Event Wiring</title><link>http://www.lostechies.com/blogs/colin_ramsay/archive/2009/01/25/castle-microkernel-fluent-event-wiring.aspx#14815</link><pubDate>Tue, 27 Jan 2009 19:08:22 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:14815</guid><dc:creator>Brad Mead</dc:creator><description>&lt;p&gt;Nevermind... reading the referenced &amp;quot;forgottenskies&amp;quot; link: :))&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=14815" width="1" height="1"&gt;</description></item><item><title>re: Castle MicroKernel Fluent Event Wiring</title><link>http://www.lostechies.com/blogs/colin_ramsay/archive/2009/01/25/castle-microkernel-fluent-event-wiring.aspx#14812</link><pubDate>Tue, 27 Jan 2009 18:46:13 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:14812</guid><dc:creator>Brad Mead</dc:creator><description>&lt;p&gt;Or is the Subscriber-&amp;gt;SubscriberInfo &amp;nbsp;relationship &amp;quot;grease&amp;quot; for the extension method/ linq usage? Like a thin object graph&lt;/p&gt;
&lt;p&gt;i.e. Child.ForName(&amp;quot;subscriber&amp;quot;) &amp;nbsp;roughly equates to &amp;quot;give me child of the one named subscriber (SubscriberInfo?)&lt;/p&gt;
&lt;p&gt;Are Child.ForName, .Eq, Attrib.ForName MicroKernel Registration API extension methods?&lt;/p&gt;
&lt;p&gt;Sorry about the dumb questions. I am deciding on IoC containers and evaluating code-based configuration paradigms. I think I understand how to leverage your approach on down the road - I thought I might as well poke the unknowns. I am also a little linq-naive.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=14812" width="1" height="1"&gt;</description></item><item><title>re: Castle MicroKernel Fluent Event Wiring</title><link>http://www.lostechies.com/blogs/colin_ramsay/archive/2009/01/25/castle-microkernel-fluent-event-wiring.aspx#14804</link><pubDate>Tue, 27 Jan 2009 17:10:27 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:14804</guid><dc:creator>Brad Mead</dc:creator><description>&lt;p&gt;OT: @Colin &lt;/p&gt;
&lt;p&gt;Just few a questions in regard to the class encapsulation where Subscriber encapsulates SubscriberInfo. I typically warn myself off of usage like this because I don&amp;#39;t understand the qualities. &lt;/p&gt;
&lt;p&gt;Is this implementation: &lt;/p&gt;
&lt;p&gt;a) a pattern of which I am unaware &lt;/p&gt;
&lt;p&gt;b) Does it afford quality to the container or the fluency framework? &lt;/p&gt;
&lt;p&gt;c)?&lt;/p&gt;
&lt;p&gt;Thanks, Brad &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=14804" width="1" height="1"&gt;</description></item><item><title>re: Castle MicroKernel Fluent Event Wiring</title><link>http://www.lostechies.com/blogs/colin_ramsay/archive/2009/01/25/castle-microkernel-fluent-event-wiring.aspx#14799</link><pubDate>Tue, 27 Jan 2009 16:02:58 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:14799</guid><dc:creator>Tuna Toksoz</dc:creator><description>&lt;p&gt;i am just trying some tricks, &lt;/p&gt;
&lt;p&gt;Component.For&amp;lt;IService&amp;gt;()&lt;/p&gt;
&lt;p&gt;.ImplementedBy&amp;lt;PublisherService&amp;gt;()	.Subscribers(Subscriber.ForComponent&amp;lt;PublisherService,SubscriberService&amp;gt;(&amp;quot;subscriberId&amp;quot;,(x, y) =&amp;gt; x.ServiceStarted += y.Subscriber));&lt;/p&gt;
&lt;p&gt;This is possible since I&amp;#39;m using lambda&amp;#39;s as delegates. I think i can process it to get the right stuff: which subscribed to what but this ForComponent&amp;lt;Pub,Sub&amp;gt; part disturbs me as it is not necessary.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=14799" width="1" height="1"&gt;</description></item><item><title>re: Castle MicroKernel Fluent Event Wiring</title><link>http://www.lostechies.com/blogs/colin_ramsay/archive/2009/01/25/castle-microkernel-fluent-event-wiring.aspx#14798</link><pubDate>Tue, 27 Jan 2009 15:40:58 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:14798</guid><dc:creator>cramsay</dc:creator><description>&lt;p&gt;Valeriu, I agree but as Tuna has mentioned I&amp;#39;m not sure if that would be possible in this context. If someone can point us in the right direction....?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=14798" width="1" height="1"&gt;</description></item><item><title>re: Castle MicroKernel Fluent Event Wiring</title><link>http://www.lostechies.com/blogs/colin_ramsay/archive/2009/01/25/castle-microkernel-fluent-event-wiring.aspx#14797</link><pubDate>Tue, 27 Jan 2009 15:17:05 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:14797</guid><dc:creator>Tuna Toksoz</dc:creator><description>&lt;p&gt;There is one thing that I forgot about: events can only be used on the left of += operator and unfortunately an assignment operator cannot be part of an expresssion. Agh!!!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=14797" width="1" height="1"&gt;</description></item></channel></rss>