Does your View-model Violate Single Responsibility

Intro The majority of us are unknowingly violating the Single Responsibility Principle when constructing our view-models. The XAML below consists of three buttons that when pressed will show a description relative to each button. There is also a clear button to clear all description fields. XAML: Now Take the following view-model: This view-model handles state …

Sex, Drugs, and C#

If you think the title of this article is inappropriate then surely you have never entertained yourself with Hollywood movies or primetime television. The very content of such programs entertains our subconscious desires. Note that it’s been less than a thousand years since religious institutions have gone mainstream in programming our primal behaviors to be …

C#: Decoupling a Subscriber from a Publisher of an Event

Introduction Inspired by Microsoft’s Prism framework, I decided to implement their EventAggregator class as a learning exercise. The EventAggregator is a class within Prism that serves as a mediator between publishers and subscribers of an event. Imagine a platform where arbitrary subscribers can place the messages that they’re interested in onto it. Next imagine publishers …