Wojciech Paszek

about software craftsmanship, architecture and much more ...


AOP (Aspect Oriented Programming) is simply one of the reifications of IoC (Inversion of Control) concept. Moreover it is stronger mechanism comparing to DI or Events, used mainly in order to implement cross-cutting concerns like transactions, security, audit logs, caching etc … Using Autofac container together with DynamicProxy2 package, makes creating aspects (by intercepting methods invoking) […]

Read more

Popular structural patterns – how do they differ?

Adapter, Bridge, Decorator, Facade and Proxy are all variations of “wrapping” class. However their uses are different: Adapter simply maps exisitng interface to another object having similar functional role but different interface, used often while working with legacy or 3rd party code, Bridge can be treated as adapter’s sibling, used while defining not only abstract interface but […]

Read more

[PL] Jak uniknąć problemu constructor dependencies hell?

Bardzo często obserwuję szybką degradację jakości kodu, pomimo tego że programiści stosują dependency injection. Sprzyja temu niestety słaby design wielu systemów zawierających dziesiątki klas typu manager … albo service (ostatecznie przecież każdy system można zamodelować za pomocą zestawu service plus encja :-)), cierpiących z powodu ciągle rozrastającej się listy zależności. Sytuacja taka – co powinno być […]

Read more

HATEOAS with Nancy – being really RESTful

Have you ever thought about your HTTP API style? Have you thought how to decouple client and server to provide their full independence? Richardson Maturity Model is the concept you have to get familiar with. It’s simply a framework introduced in order to classify APIs into four levels depending on how they take advantage of […]

Read more

“Maybe” class concept in C#

Some time ago I had the misfortune to use third party component without having any documentation. After introducing integration tests to the project (what is, by the way one of the best practices to get familiar with external code without looking into it)  I discovered API to be inconsistent. It occurred that, sometimes null returned from methods […]

Read more

Autofac features you might not know

As promised we’re going to take a look at a few advanced Autofac’s features and reimplement a little bit example from previous post. First of all we need to update Application class by replacing Func delegate dependency with Autofac.Features.Indexed.IIndex<K, V> relationship type. It has become our new factory: All concrete strategy classes are registered using keyed services feature […]

Read more

Factory, Strategy and StructureMap

While implementing business requirements in our systems, very often there’s a need to add new behavior without breakng SOLID principles. It can be achieved by using strategy together with factory pattern. Let’s have a look at such example in hypothetical project with StructureMap DI container.   Strategy pattern implementation turns out to be fairly straighforward. We simply create two […]

Read more

3 2 1 Start!

Forrest Gump’s mother used to say: “Life was like a box of chocolates. You never know what you’re gonna get”. Here, I hope you’ll find valuable content regarding broadly defined software engineering. Enjoy 🙂

Read more