Kenneth Truyers
user

Kenneth Truyers

.NET developer at Appyparking, Pluralsight Author and Microsoft MVP


Featured

.NET best practices development unit testing

Flexible and expressive unit tests with the builder pattern

Posted on .

Unit tests become more valuable if they are expressive and flexible. A good unit test should not only test your code, but also document it. Creating expressive and flexible unit tests is not always easy however. The reason of this is that there’s an inherit di…

Featured

AOP best practices dependency injection patterns unit testing

A brief comparison of fundamental AOP techniques

Posted on .

In my previous post “Why choose DI Interception over Aspect Oriented Programming?” I explained my preference for DI interception over AOP. I received a lot of comments on this (especially on reddit) which pointed out some errors. In this article I want to reit…

Featured

.NET best practices dependency injection development

Why choose DI interception over aspect oriented programming?

Posted on .

Note: I have posted a follow-up post with some corrections to this post, thanks to some comments made on Reddit: A brief comparison of AOP techniques Let me start with saying that in this post I will explain why I think Dependency Injection is a better way to…

Featured

best practices c# dependency injection development unit testing

The N-layer myth and basic Dependency Injection

Posted on .

Dividing an application in N layers is considered a standard and a best practice. It is often thought that this automatically creates a decoupled application. However, just creating layers doesn’t make your code loosely coupled. A typical N-layer application L…

Featured

best practices development javascript patterns

Javascript Namespaces and Modules

Posted on .

Namespaces In most programming languages we know the concept of** namespaces (or packages)**.****Namespaces allow us to group code and help us to avoid name-collisions. In c# for example you have this declaration namespace MyNameSpace { public class MyClass {…

Featured

best practices development javascript patterns

Javascript hoisting explained

Posted on .

Often I see problems arise when people try to tackle Javascript. Taking a certain behavior for granted can get them frustrated. Javascript has little differences but they can cause unexpected results if not taken into account. One of those differences is the…

Featured

MVVM nuget pcl portable class library windows 8 windows phone 8

Must-have NuGet packages

Posted on .

NuGet is awesome! There are so many packages though that it’s very difficult to know which ones are useful and which can be missed. Therefore I have created a list of the NuGet packages that I find most useful when developing for Windows Phone and Windows 8. S…

Featured

MVVM pcl portable class library windows 8 windows phone 8 xaml

Portable class libraries or source code sharing?

Posted on .

Earlier I wrote a blog post on a specific method to implement code sharing between Windows Store and Windows Phone applications. In this post I want to zoom out a little bit and look at the different techniques available and explain what the differences and ad…

Featured

MVVM nuget windows phone 8 xaml

Tombstoning made easy in Windows Phone MVVM

Posted on .

Tombstoning your application data in Windows Phone can be tricky when you are using the MVVM pattern. In order to save your data you have to do it between the NavigatedTo and NavigatedFrom events of the page. In your ViewModel you don’t have access to these ev…

Featured

patterns pcl portable class library windows 8 windows phone 8

Patterns for sharing code in Windows Phone and Windows 8 Applications

Posted on .

Background With the latest batch of releases in Windows Phone 8 and Windows 8 Microsoft has been trying to close the gap between both development platforms. (The old “write once, run everywhere”-idea) Although both platforms are based on the same Windows 8 ker…

Featured

unit testing

Breaking dependencies to make your code testable

Posted on .

In my previous post I explained how you could use “Extract Interface” and “Subclass and override” as effective techniques for breaking dependencies and get existing code under test. In some situations there are other methods either more appropriate or easier t…