Blogs @ IRM

Welcome to Blogs @ IRM Sign in | Join | Help
in Search

Browse by Tags

All Tags » Dependency Injection   (RSS)
  • MVC Framework for ASP.NET

    If you are interested in ASP.NET and design patterns, especially MVC, I think that you should take a look at ScottGu presentation of the new MVC support in ASP.NET. The framework seems to be extremely pluggable which also means that it will be very testable. This will probably be released sometimes after Visual Studio 2008. It is Scott Hanselman ...
    Posted to Eric's Blog (Weblog) by ericqu on oktober 9, 2007
  • Dependency Injection: Creating Build Strategies

    So this will be my 8:th post about ObjectBuilder and probably the last one for a while since I think I covered quite a lot by now. In this post I will use an example from CAB, but with some small modifications to decouple it from CAB and make it useful without needing CAB. CAB has great support for the Command design pattern, and the support is ...
    Posted to Eric's Blog (Weblog) by ericqu on september 18, 2006
  • Dependency Injection: Creating Your Own Attribute

    In this post I will show how you can create an attribute of your own, that you can use on properties and/or parameters, which will make ObjectBuilder setting the value of the property or parameter. So lets say that you want to know what kind of permission a user has so you have a property in your class that looks something like ...
    Posted to Eric's Blog (Weblog) by ericqu on september 5, 2006
  • Dependency Injection: Dependency Attribute

    In my last post I made a walkthrough of the Locator. The Dependency attribute is used to make searches in the Locator and then have the property (or parameter) set to the result of the search. In that previous post I used an example of an application object model like in Word, Excel and other Office applications, with an Application object as the ...
    Posted to Eric's Blog (Weblog) by ericqu on september 1, 2006
  • Dependency Injection: The Locator And LifetimeContainer

    The Locator is a dictionary of weak object references (so it does not keep objects alive). By adding objects to the locator, you make it possible for other code to ask the locator for the object, and get a reference to it. The object is added with a corresponding key. The key can be anything, but it will often be an object of ...
    Posted to Eric's Blog (Weblog) by ericqu on augusti 29, 2006
  • Dependency Injection: Policies

    You can use policies to affect how the strategies performs their tasks in ObjectBuilder. For example, for the SingletonStrategy to consider any object to be a singleton you need to use the SingletonPolicy. Since policies affect how strategies do their work, it's easier to create more general purpose strategies, that are then informed of the ...
    Posted to Eric's Blog (Weblog) by ericqu on augusti 25, 2006
  • Dependency Injection: CreateNew Attribute

    In this post I'm back covering the CreateNew attribute that you can use in a class that is instantiated by ObjectBuilder. Marking a property (or parameter to a method or constructor) with the CreateNew attributes will set that property to an instance of the object. The instance itself will of course be built by the ObjectBuilder too. A great ...
    Posted to Eric's Blog (Weblog) by ericqu on augusti 21, 2006
  • Dependency Injection: Simple Example of Instantiating Objects

    In my last post I showed how you can use the InjectionMethod attribute to have a method called after the object is instantiated. Of course this will not happen if you simply new your object, but instead you have to use ObjectBuilder to instantiate the object. Now I thought I show you just a simple example of how you instantiate objects with ...
    Posted to Eric's Blog (Weblog) by ericqu on augusti 16, 2006
  • A Series of Posts about Dependency Injection

    I’ve started to dig a little deeper into PAG:s Composite Application Block (CAB) and one place to start is to check out ObjectBuilder (which is also used by EntLib). ObjectBuilder is an implementation of Dependency Injection, which is a specific name for the pattern “Inversion of Control” (IoC). You can read more about it on Martin Fowlers ...
    Posted to Eric's Blog (Weblog) by ericqu on augusti 14, 2006
Powered by Community Server, by Telligent Systems