<?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>Marcus The Blog (by MarcusTheBold) - All Comments</title><link>http://www.lostechies.com/blogs/marcus_bratton/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2008.5 (Build: 30929.2835)</generator><item><title>re: A philosophical discussion about Inversion of Control frameworks</title><link>http://www.lostechies.com/blogs/marcus_bratton/archive/2010/01/10/a-philosophical-discussion-about-inversion-of-control-frameworks.aspx#47742</link><pubDate>Fri, 15 Jan 2010 03:38:48 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:47742</guid><dc:creator>banq</dc:creator><description>&lt;p&gt;&amp;gt; I want them decoupled completely&lt;/p&gt;
&lt;p&gt;My IoC Framework is . include framework itself, please refer:&lt;a rel="nofollow" target="_new" href="https://jdon.dev.java.net/"&gt;https://jdon.dev.java.net/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;this framework &amp;#39;s core is based in picocontainer 1.1, any components can be replaced by xml.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=47742" width="1" height="1"&gt;</description></item><item><title>re: A philosophical discussion about Inversion of Control frameworks</title><link>http://www.lostechies.com/blogs/marcus_bratton/archive/2010/01/10/a-philosophical-discussion-about-inversion-of-control-frameworks.aspx#47077</link><pubDate>Mon, 11 Jan 2010 17:34:46 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:47077</guid><dc:creator>mbratton</dc:creator><description>&lt;p&gt;Man, I wish that&amp;#39;s how it was where I work. I can&amp;#39;t tell you the number of references to IKernel and IWindsorContainer that litter our codebase. &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=47077" width="1" height="1"&gt;</description></item><item><title>re: A philosophical discussion about Inversion of Control frameworks</title><link>http://www.lostechies.com/blogs/marcus_bratton/archive/2010/01/10/a-philosophical-discussion-about-inversion-of-control-frameworks.aspx#47074</link><pubDate>Mon, 11 Jan 2010 17:14:25 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:47074</guid><dc:creator>Rinat Abdullin</dc:creator><description>&lt;p&gt;I wonder, who cares about decoupling an IoC container from the rest of the code, when they touch only in config and host initialization sections anyway.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=47074" width="1" height="1"&gt;</description></item><item><title>re: Added support for Unity, Autofac to Siege.ServiceLocation</title><link>http://www.lostechies.com/blogs/marcus_bratton/archive/2009/12/23/added-support-for-unity-autofac-to-siege-servicelocation.aspx#43466</link><pubDate>Sun, 27 Dec 2009 21:24:56 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:43466</guid><dc:creator>mbratton</dc:creator><description>&lt;p&gt;Turned out not to be too hard. I went ahead and incorporated it. I posted details on it in my new blog post.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=43466" width="1" height="1"&gt;</description></item><item><title>re: Added support for Unity, Autofac to Siege.ServiceLocation</title><link>http://www.lostechies.com/blogs/marcus_bratton/archive/2009/12/23/added-support-for-unity-autofac-to-siege-servicelocation.aspx#42068</link><pubDate>Wed, 23 Dec 2009 19:40:29 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:42068</guid><dc:creator>mbratton</dc:creator><description>&lt;p&gt;It&amp;#39;s certainly possible. It&amp;#39;ll just require a custom implementation of IUseCase and some syntax to let people wire it up like that. When I&amp;#39;m putting together the extensions I&amp;#39;ll take a peek to see how difficult that is and might just throw it in.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=42068" width="1" height="1"&gt;</description></item><item><title>re: Added support for Unity, Autofac to Siege.ServiceLocation</title><link>http://www.lostechies.com/blogs/marcus_bratton/archive/2009/12/23/added-support-for-unity-autofac-to-siege-servicelocation.aspx#42043</link><pubDate>Wed, 23 Dec 2009 18:36:27 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:42043</guid><dc:creator>Adriano Machado</dc:creator><description>&lt;p&gt;Great piece of code.&lt;/p&gt;
&lt;p&gt;Is it possible to extend the container to give named instances when it is injected into a specific type? &amp;nbsp;I know that Ninject is able, but is it easy to extend this functionality to Siege?&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=42043" width="1" height="1"&gt;</description></item><item><title>re: The Siege Project: Siege.ServiceLocation, Part 2 - Contextual Registration and Resolution</title><link>http://www.lostechies.com/blogs/marcus_bratton/archive/2009/12/09/the-siege-project-siege-servicelocation-part-2-contextual-registration-and-resolution.aspx#38651</link><pubDate>Wed, 09 Dec 2009 23:02:42 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:38651</guid><dc:creator>mbratton</dc:creator><description>&lt;p&gt;Interesting!&lt;/p&gt;
&lt;p&gt;For #1 yes, context is tracked per user session. Turns out that what you&amp;#39;re asking for on #2 is possible with this framework (I&amp;#39;ll be covering areas like this in the next post, and I&amp;#39;ll post a comment afterward explaining how it applies to your scenario).&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=38651" width="1" height="1"&gt;</description></item><item><title>re: The Siege Project: Siege.ServiceLocation, Part 2 - Contextual Registration and Resolution</title><link>http://www.lostechies.com/blogs/marcus_bratton/archive/2009/12/09/the-siege-project-siege-servicelocation-part-2-contextual-registration-and-resolution.aspx#38649</link><pubDate>Wed, 09 Dec 2009 22:40:52 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:38649</guid><dc:creator>azaslow</dc:creator><description>&lt;p&gt;For #1 I don&amp;#39;t think that I expressed my question well. &amp;nbsp;What you&amp;#39;re saying is interesting, but not what I was thinking.&lt;/p&gt;
&lt;p&gt;What I&amp;#39;m thinking about is something which addresses the need that I think the httpSessionStore is trying to achive (i.e. providing different context values depending on the active user or other varying context). &amp;nbsp;I assume that your httpSessionStore returns different values based on the active session. &amp;nbsp;What I was asking was for was actually using different context stores of the same type with the same container (or with multiple containers which use the same registration catalog).&lt;/p&gt;
&lt;p&gt;The way that I implemented this is that I have a root container which has no context and where everything is registered. &amp;nbsp;Later when a context is created &amp;nbsp;a child container is created from the root container using the given context. &amp;nbsp;This child container inherits the registrations from the root container. &amp;nbsp;Once the child container is created its context cannot be changed (although I probably could allow changing the context with a little work).&lt;/p&gt;
&lt;p&gt;For #2 I started to write a scenario and then I realized that what I&amp;#39;m asking goes beyond what you&amp;#39;re trying to do. &amp;nbsp;I think that what I&amp;#39;m looking for is simply to specify a factory to build the object &amp;nbsp;and for the container (and context store) to be passed to the factory so that the factory can utilize the container to build the required object.&lt;/p&gt;
&lt;p&gt;Thanks for your response. &amp;nbsp;I think that what you&amp;#39;re trying to do is something many people would like.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=38649" width="1" height="1"&gt;</description></item><item><title>re: The Siege Project: Siege.ServiceLocation, Part 2 - Contextual Registration and Resolution</title><link>http://www.lostechies.com/blogs/marcus_bratton/archive/2009/12/09/the-siege-project-siege-servicelocation-part-2-contextual-registration-and-resolution.aspx#38641</link><pubDate>Wed, 09 Dec 2009 19:24:22 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:38641</guid><dc:creator>mbratton</dc:creator><description>&lt;p&gt;@azaslow - #1 is something I&amp;#39;ve been thinking about for a while but wasn&amp;#39;t sure I wanted to complicate things. I think my instinct right now is to leave it down to specific implementations of an IContextStore to determine how to manage it. But I&amp;#39;m not sure that&amp;#39;s enough.&lt;/p&gt;
&lt;p&gt;If I were to do a Per-Request, Per-Session, Per-Instance model, with three context stores (for example), would I predetermined a precedence for how I check? Would it be RequestContext before SessionContext before ApplicationContext? Would that force a user into a specific model (something I don&amp;#39;t want to do).&lt;/p&gt;
&lt;p&gt;Or could I allow users to add more than one context store? If I do that, do I need to allow users to specify a precedence between them? How do I make sure the correct store is looked at first for resolutions if multiple contexts are able to satisfy a use case, but they ultimately resolve to different types?&lt;/p&gt;
&lt;p&gt;Those are the questions I&amp;#39;ve been debating. So in the end I&amp;#39;ve settled that until a better way is pointed out, I&amp;#39;ll put the burden on the consumer to define an implementation of IContextStore that satisfies their needs. Maybe someone will create a ComplexContextStore that has an internal list of IContextStores for different scopes, and can it determine how to return its items in the correct fashion to the SiegeContainer. I dunno. I&amp;#39;m open to ideas.&lt;/p&gt;
&lt;p&gt;For #2... I hadn&amp;#39;t really considered that idea. Right now I suspect an object has to exist in context for it to be evaluated. I agree that it is more robust, but what I&amp;#39;m curious to see is a scenario where you&amp;#39;d do this. That will help me understand better what the goal is behind it. &amp;nbsp;:)&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=38641" width="1" height="1"&gt;</description></item><item><title>re: The Siege Project: Siege.ServiceLocation, Part 2 - Contextual Registration and Resolution</title><link>http://www.lostechies.com/blogs/marcus_bratton/archive/2009/12/09/the-siege-project-siege-servicelocation-part-2-contextual-registration-and-resolution.aspx#38628</link><pubDate>Wed, 09 Dec 2009 16:33:54 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:38628</guid><dc:creator>azaslow</dc:creator><description>&lt;p&gt;I am working on something similar to but not as elegant as what you&amp;#39;re describing. &amp;nbsp;I have two questions about what you&amp;#39;re doing:&lt;/p&gt;
&lt;p&gt;1) Is there a way to use different context store objects with a single container or is there a way to share registrations between containers?&lt;/p&gt;
&lt;p&gt;I have found that it is very useful to be able to perform all of the registrations once and then use those common registrations under different contexts at the same time (in my case I create multiple containers each with its own context and each using a single shared registration).&lt;/p&gt;
&lt;p&gt;For instance on a web server which is receiving multiple requests from different users you want to resolve using different contexts for each request but you don’t want to have to re-register everything for each request.&lt;/p&gt;
&lt;p&gt;2) In the “When” part of the registration can only objects which are part of the context store be resolved or are the resolved objects registered with the container itself?&lt;/p&gt;
&lt;p&gt;For instance, in your example where you are getting VendorStatus, must VendorStatus be an object in the context store or can it be any object which is retrieved from the container? &amp;nbsp;I think that being able to make a decision based on an object in the container is more robust than limiting decisions to items in the context store alone.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=38628" width="1" height="1"&gt;</description></item><item><title>re: The Siege Project: Siege.ServiceLocation, Part 2 - Contextual Registration and Resolution</title><link>http://www.lostechies.com/blogs/marcus_bratton/archive/2009/12/09/the-siege-project-siege-servicelocation-part-2-contextual-registration-and-resolution.aspx#38611</link><pubDate>Wed, 09 Dec 2009 15:16:42 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:38611</guid><dc:creator>mbratton</dc:creator><description>&lt;p&gt;@Mihai: There were two reasons I didn&amp;#39;t implement an AutofacAdapter or a UnityAdapter. First, I&amp;#39;ve never used them, so I&amp;#39;d have to learn them (not a big deal). Secondly, I felt that if this project had enough support from the community, and people wanted a Unity or Autofac adapter, one would be put together. Maybe I should put together a post on how to make an adapter?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=38611" width="1" height="1"&gt;</description></item><item><title>re: The Siege Project: Siege.ServiceLocation, Part 2 - Contextual Registration and Resolution</title><link>http://www.lostechies.com/blogs/marcus_bratton/archive/2009/12/09/the-siege-project-siege-servicelocation-part-2-contextual-registration-and-resolution.aspx#38571</link><pubDate>Wed, 09 Dec 2009 11:32:54 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:38571</guid><dc:creator>Mihai</dc:creator><description>&lt;p&gt;Looks pretty interesting. One argument I&amp;#39;d like to leave is that you should implement an adapter for UnityContainer.&lt;/p&gt;
&lt;p&gt;The reason for a UnitContainerAdapter is simple, most firms have the firm belief that if it&amp;#39;s from Microsoft than it is better than anything else. So as a developer you won&amp;#39;t be able to propose the use of X or Y unless it&amp;#39;s from Microsoft. &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=38571" width="1" height="1"&gt;</description></item><item><title>re: Introducing Siege</title><link>http://www.lostechies.com/blogs/marcus_bratton/archive/2009/12/06/introducing-siege.aspx#38536</link><pubDate>Tue, 08 Dec 2009 22:06:36 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:38536</guid><dc:creator>Grant Palin</dc:creator><description>&lt;p&gt;Love the name, it is very fitting. I can relate to the feeling of being under siege by all the various tools that are available.&lt;/p&gt;
&lt;p&gt;Sounds like the framework will be quite useful, if only to provide a little abstraction from the complexities of the tools.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=38536" width="1" height="1"&gt;</description></item><item><title>re: Introducing Siege</title><link>http://www.lostechies.com/blogs/marcus_bratton/archive/2009/12/06/introducing-siege.aspx#38529</link><pubDate>Tue, 08 Dec 2009 14:54:05 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:38529</guid><dc:creator>John Sonmez</dc:creator><description>&lt;p&gt;Looks like an interesting idea. &amp;nbsp;I definitely agree with you about the high levels of complexity in configuration and consumption.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=38529" width="1" height="1"&gt;</description></item><item><title>re: The Siege Project: Siege.ServiceLocation Part 1 - Introduction and General Use</title><link>http://www.lostechies.com/blogs/marcus_bratton/archive/2009/12/06/the-siege-project-siege-servicelocation.aspx#38503</link><pubDate>Tue, 08 Dec 2009 00:43:22 GMT</pubDate><guid isPermaLink="false">ded273ab-9e87-4979-8222-e4e2e46f1b46:38503</guid><dc:creator>mbratton</dc:creator><description>&lt;p&gt;@Tariq: Yes, this will be open source, and people will be able to contribute. I am still thinking through how to set it up, but I don&amp;#39;t think I want to make Siege.ServiceLocation a growing set of features, but might rather do a SiegeContrib for things like new IUseCase implementations, etc. &lt;/p&gt;
&lt;p&gt;For something like an AutoFacAdapter, I think a seperate assembly that implements IServiceLocatorAdapter would be completely inline with what I&amp;#39;ve done with the other adapters (Ninject, StructureMap and Windsor).&lt;/p&gt;
&lt;p&gt;People will definitely be encouraged to contribute.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://www.lostechies.com/aggbug.aspx?PostID=38503" width="1" height="1"&gt;</description></item></channel></rss>