Loading...

Wojciech Paszek

about software craftsmanship, architecture and much more ...

[PL] CQRS – Query Stack with Autofac

Jako, że trudno w szeroko pojętych “internetach” znaleźć pełną implementację stosu zapytań z wykorzystaniem kontenera Autofac zdecydowałem się zamieścić swoje podejście. Pełna implementacja wraz z wykorzystaniem dostępna jest na moim githubie. Na początek tworzymy interfejs dla pojedynczego zapytania: Potrzebujemy również abstrakcji dla później tworzonych handlerów zapytań: Podobnie jak w przypadku komend, będziemy potrzebować obiektu, który […]

Read more

Patterns for building applications over microservices – backend for frontend

The BEF pattern is relevant while there’s a need to build more than one type of client application for microservices system. BEF behaves just like API gateway but is used by only one type of application. So in this approach there’re separate BEFs for the web application, mobile application and desktop application. However you have to remember […]

Read more

Patterns for building applications over microservices – composite application

Composite applications are integrated at the fronent. They’re made up of functionalities drawn from several places – in this case of microservices that may communicate with each one directly. Each service provides both functionality and corresponding UI. Advantages: GUI is divided into small parts according to business requirements, Disadvantages: difficult integration of all functionalities in case of complex […]

Read more

Patterns for building applications over microservices – API gateway

API gateway is simply microservice providing public API that covers all of the system’s functionality. Its role is only to delegate all coming requests to other microservices – so in practice it acts as adapter between client applications and the system of microservices: Advantages: application decoupling from the way the microservices system is composed and hiding its […]

Read more

AUTOFAC FEATURES YOU MIGHT NOT KNOW PART 2

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. Differences between them are not clearly explained in literature. Below you can find short information when to use them: 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, […]

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