CodePlexProject Hosting for Open Source Software
Patterns & practices (p&p) just released a new version of the Enterprise Library and the Unity Dependency Injection Container. Grigori’s release notes can be found here. The binaries and source code for EntLib can be downloaded from MSDN. Those for Unity are quite well hidden for some reason… Grab them here.
Long time no see. About two months without anything interesting (related to dev topics at least) happening. Recently I had a look at some of the katas at Coding Dojo. Quite interesting stuff. Today I want to present my shot at the Harry Potter book discount kata. First things first: I used xUnit and especially [...]
Have you ever wished that you were able to go back in time? At least in software development that is relatively easy. If you ask someone how you could simulate the passing of time for a unit test you might get an answer that involves TypeMock Isolator or something even more wicked. But you can [...]
The first bits of EntLib6 are out! Welcome the Semantic Logging Application Block! It’s based on Event Tracing for Windows (ETW, which is baked into the Windows OS) but additionally offers support for classic logger targets like flat files, databases etc. It provides a structured, extensible log format for all of your log messages which [...]
Last week Grigori Melnik, Principal Program Manager at Microsoft patterns & practices and responsible for the development of the Microsoft Enterprise Library and Unity Dependency Injection Container, asked wether I would like to join the Advisory Board for EntLib6/Unity3. I happily accepted the invitation I’m looking forward to participating in the development of a great [...]
The WordPress.com stats helper monkeys prepared a 2012 annual report for this blog. Here’s an excerpt: The new Boeing 787 Dreamliner can carry about 250 passengers. This blog was viewed about 1,200 times in 2012. If it were a Dreamliner, it would take about 5 trips to carry that many people. Click here to see [...]
Pipes and filters (or just pipeline) is another common pattern. Oren Eini and Jeremy Likness both have very interesting posts about it on their respective blogs. While Jeremy’s post aims at the slick creation of pipelines, Oren talks more about the pattern itself and how to implement it in a specific manner (using input and [...]
I prefer unit tests over integration tests any time. But at some point you just can’t avoid the latter. You need your components to hit a database to verify that your queries are correct and that you update the right records. Some databases (like RavenDB for example, see Ayende’s answer) support running completely in-memory specifically [...]
The Specification Pattern. Yet another one I find useful in daily business. But a few enhancements can make it even more useful and a lot nicer to handle. 1, 2, many! The CompositeSpecification is most often implemented with two fields for spec1 and spec2 or left and right. The AndSpecification and OrSpecifications evaluate these fields [...]
We use tracing to find out what takes us so long when processing X or computing Y. Tracing is a cross-cutting concern. It can be used anywhere in our applications. As such there are some well-known ways to implement it to keep our business code clean such as using hand-crafted decorators or an interception framework [...]
Composition over inheritance is a known but unfortunately not very well understood OOD principle. All too often I see code like this: or this: The derived class adds a method or two. Maybe a property. And it carries all the weight of the super-class List<T>. The property of type List<Foo> is there for anybody to [...]
Oren Eini (aka Ayende Rahien) has an interesting series on his blog where he reviews the GoF Design Patterns and how they apply (or don’t) to modern software development. As part of this series he also reviews the Composite Pattern and finishes with the following advice: Recommendation: If your entire dataset can easily fit in [...]
To be frank: I don’t like XML for configuration purposes. I think it’s a plague and nothing less. It is verbose and prone to typos. It does not give you any type safety. Thus I wage a constant war against XML config files in my projects. But sometimes you can’t avoid XML for one reason [...]
In a previous post I described the steps to hide enumeration classes from the consumers of a WCF service. That works fine if you manage your client’s contracts manually i.e. each client has its own service contract as well as client versions of all data contracts used in that service. This guarantees the cleanest separation [...]
In my last post I talked about serializing Enumeration Classes for use with WCF. In this post I’m gonna show you how to add a feature that real enums have but enumeration classes don’t. Yet! Enums can be decorated with the FlagsAttribute. This allows you to combine single enum values using the ‘|’ operator. A [...]
During the last week I was working on a real fun project. It started after I stumbled across an old article by Jimmy Bogard, author of the famous AutoMapper library. In his post he talks about Enumeration Classes. What they are, how they work and what their advantages over simple enums are. He started by [...]
Back in the “good old days” static classes and singletons where widely used patterns. They could be called from anywhere and you didn’t have to spend a thought on dependency management. Or unit testing. Because most often you couldn’t test code that called methods on those objects. They usually needed config files, databases, web-services, message [...]
They are called Guards or Validators. It’s their duty to keep your business logic safe. Invalid input values are rejected by throwing exceptions at the caller to notify him about his wrong-doing. Guards enforce the contracts of your API. If you fail to get past them, it’s your problem, not that of the author of [...]
“Don’t give me what I asked for! Give me what I want!” – How often did you shout that sentence at your computer during the last week? Sometimes you misspell a word or a name. Sometimes you don’t know for sure how it is spelled but have a vague idea. Google gives you suggestions when [...]
Configurability is a member of the *-ability gang. Influence how your components work at runtime. Store configuration information somewhere. Either in code, in a config file or in some type of database. Load it at runtime and use it in your application. You can hard-code the way these values are retrieved directly in your components. [...]
Last edited Sep 5, 2012 at 6:44 AM by weberse, version 64
There is no recommended release for this project.