X

Architecture/Design/Patterns

Composite command pattern

I have previously blogged about command pattern and composite pattern. I had some projects where I succesfully mixed these two together to compose a composite command. It’s a construct to have a commands hierarchy we can execute with one shot.

Implementing INotifyPropertyChanged

Short post about how to implement INotifyPropertyChanged without using any advanced tooling. I have some small UWP applications where I’m using MVVM to separate presentation and logic. Here is how I use INotifyPropertyChanged with base class for multiple view models.

Optimized hierarchy traverser

My first draft of hierarchy traversing component got some serious feedback and it’s time to make some changes before moving on to next challenges. Hierarchy traverser is not optimal yet as it uses tail-call recursion and it’s easy to run to stack overflow with it. This blog post solves this problem and prepares for next challenges like node cache and continue-from-given-node.

Universal hierarchy traversing in C#

I started playing with small idea about how to go through document repository on SharePoint using more universal approach than just piling code to using-blocks and methods that depend on these. My goal was to separate in code hierarchy traversing logic from document exporting logic so I can use traversing part also in other projects on different types of hirarchies. Here is my nice and clean solution.

Breaking static dependency

Static dependency can be nightmare for developers who write tests for their code. There is not much to do to get rid of static dependencies if they come with third-party libraries or NuGet packages. This blog post introduces two tricks to make code with static dependencies testable.

Dependency injection in .NET Core console applications

ASP.NET Core uses built-in dependency injection mechanism provided by Microsoft. This blog post intorduces how to use same mechanism in .NET Core console applications. For those who like other DI/IoC frameworks this writing provides demo about how to use Autofac with .NET Core framework-level dependency injection.

Code-behind with Blazor pages

Although there are many examples available demonstrating Blazor views it is also possible to separate code and presentation by using Razor pages with backing model. This blog post is based on my Blazor presentation and focuses on separating code and presentations of Blazor pages.

Local functions in C# 7.0

One of new features of C# 7.0 is support for local functions. Local functions are methods that are defined inside other methods to simplify more complex code and by example to support local recursion. This blog post shows how to use local functions in C# 7.0 and gives some advice in context of technical design of code.

Short introduction to serverless architecture

Serverless architecture and Functions as a Service (FaaS) are new trends in cloud computing. Besides Microsoft and Amazon there are many other vendors providing FaaS services. This blog post is short introduction to serverless architecture and here I try to explain what it is and why we need it.

Why Azure REST API-s and how to prepare for using them?

When new Microsoft Azure services come they usually have REST API-s available. Of course, there are usually client libraries available too as NuGet packages but usually not for every .NET flavour. Although Microsoft has plans to publish libraries for CoreCLR too it doesn’t happen always fast. Let’s see how REST API-s work and how to prepare for using them.