Wednesday, October 30, 2013

Agile Tour Montreal 2013

Agile tour is comming soon and I will be part of it.

If you attend, dont miss my talk on : Top 5 des meilleures façon d’améliorer votre code. Yes it will be in french, of course.

Tuesday, April 16, 2013

Are you “fluent” in C#?

I’m starting a new codeplex project to build a fluent library for design patterns. For example let’s take those examples.
Here is how to build a chain of responsibility is a standard manner:
var command1 = new Command1();
var command2 = new Command2("Test");
command1.NextInChain = command2;
command1.Execute(null);
Here is the same construct in a fluent manner:
var chain = new ChainBuilder<ChainCommand>()
  .Add<Command1>()
  .Add<Command2>(() => new Command2("Test"))
  .Build();
chain.Execute(null);
Which one do you like the most? In my case I prefer the fluent way. Building a chain of responsibility in not that difficult if you have only a handful of element to chain, but if you have more it become boring to remember to link the previous element to the next. My builder take car of that for you. Because of “fluent” concept you always now what comes next. For exmaple the ChainBuilder class only expose some overload of Add and a Build method.
So if you like this way of thinking, join my codeplex project and give me your feedback about it.
See : http://fluentpatterns.codeplex.com/