Archive for February, 2009

Progressive .NET Tutorials, May 11-13th, London, UK

February 24th, 2009

Progressive .NET Tutorials 2009

Skills Matter has agreed to co-organisie The Progressive .NET Tutorials with us. This will be a really exciting 3 day long event with 2 tracks featuring half day and full day Tutorials by me, Ayende, David Laribee, Gojko Adzic, Ian Cooper, Mike Hadlow, Scott Belware and Sebastien Lambla. I will be giving two half day tutorials on Tuesday May 12th and Wednesday May 13th. My first tutorial will be on the Castle and second will be on MEF.

For the full programme check http://skillsmatter.com/event/open-source-dot-net/progressive-dot-net-exchange

Special Community Discount

If you book on or before Feb 28th you will pay just £350

Skills Matter has given me a special promotion code that will entitle you to a nice discount off the Tutorial Fees. Simply book on or before Feb 28th, quote SM1368-622459-33L (in the Promo Code field) and pay just £350 (normal price £1000). Offer is only valid until February 28th only, and tickets are going fast, so if you would like to secure a place and claim your discount – get your skates on!

The code to use is: *SM1368-622459-33L* and must be entered in the box provided when booking online at https://skillsmatter.com/register-online/conf/280

Full details of the event can be found at http://skillsmatter.com/event/open-source-dot-net/progressive-dot-net-exchange

See you in May!

Categories: General | Top Of Page | No Comments » |

Farewell to dear friend

February 18th, 2009

I got a sad sad news this morning that a very dear friend had passed away due to a liver disease. He was only 34, recently married and had just moved to his dream house. An awesome C/C++ programmer that taught me many useful (and useless) things and all time funny person.

wenderson.png

Categories: General | Top Of Page | 1 Comment » |

Workshop on Inversion of Control Containers

February 18th, 2009

Next Friday (Feb-27) I’ll be in Seattle doing a workshop on one of my favorite topics: Inversion of Control Containers. Expect some digressions on the story of ioc containers, how they evolved, what problems they solve and what problems they introduce. Also why I think the DI term should be banished – call me a purist. Windsor, MEF and maybe others will be on my radar.

If you want to attend, keep an eye on this page. Currently registrations are closed, but should open in a few days.

I truly hope I dont have a cold next week :-)

MEF: Exporting and importing methods

February 17th, 2009

This is an interesting feature of MEF, usually overseen (maybe because it’s not documented anywhere). You can export methods with a specific shape and import them to delegates:

public class Validation
{
    [Export("validator")]
    public bool ValidateEmail(string value)
    {
        return true;
    }

    [Export("validator")]
    public bool ValidateNonEmpty(string value)
    {
        return true;
    }
}

[Export]
public class FormToValidate
{
    [Import("validator")]
    public IEnumerable<Func<string, bool>> Validators { get; set; }

    public void ValidateName(string username)
    {
        foreach(var validator in Validators)
        {
            if (!validator(username))
            {
                throw new Exception("validation error");
            }
        }
    }
}

Before you ask, yes this feature came from real world scenarios and we have plenty of customers using it. So far, we are constrained by the maximum number of arguments Func/Action supports, but Wes is in the process of fixing that.

Categories: MEF | Top Of Page | 4 Comments » |

Defaulting to Transient parts

February 8th, 2009

David has a nice blog post on having a custom container to default MEF parts to NonShared creation policy. Go MEF team! :-)

Categories: MEF | Top Of Page | 3 Comments » |