Posts about the C# language itself, including use, abuse and features.

Dependency Injection: Views

Saturday, August 17 2019 wordtutor-redux csharp

We saw last time that setting up dependency injection for our viewmodels involved a small number of moving parts. The same applies when applying dependency injection to our views, but with a few additional complexities.

Read more »

Dependency Injection: ViewModels

Saturday, August 10 2019 wordtutor-redux csharp

Based on the foundation from last time, we can now turn our attention to our view-models. How can we use our dependency injection framework to construct each view model on demand?

Read more »

Dependency Injection: Core

Saturday, July 27 2019 wordtutor-redux csharp

To this point, we’ve been able to run each of our screens by hand-coding the necessary object initialization. We could continue this as we move forward, but the complexity would grow with each additional screen we complete. Instead, let’s take the time to configure a dependency injection framework that will take care of the complexity for us.

Read more »

Integration Testing

Saturday, July 20 2019 wordtutor-redux csharp

In addition to the unit tests we’re already writing for each of our core classes, we should also write some integration tests to ensure our types interact properly.

Read more »

Restructuring Reducers

Saturday, July 13 2019 wordtutor-redux csharp

When I got to this point of the series, I expected to be writing about some interaction testing - checking that our messages triggered the right transitions between screens.

Read more »

Vocabulary Browser

Saturday, June 29 2019 wordtutor-redux csharp

For our second screen, we’ll create a browser to show all of the words in a single vocabulary list. Let’s start with a small bit of design, so we know what we’re aiming to build.

Read more »

Revisiting ViewModelBase

Saturday, June 15 2019 wordtutor-redux csharp

When I went to write the code for our next view model (VocabularyBrowserViewModel), I ran into some problems with our original ViewModelBase. Let’s visit those problems and look at how they can be resolved.

Read more »

First Light

Saturday, June 08 2019 wordtutor-redux csharp

First light is the term used for the first time that an observation is made through a new telescope (or other astronomical instrument). Lets get our application up and running.

Read more »

Add Word View

Saturday, May 25 2019 wordtutor-redux csharp

Leveraging the add vocabulary word view model from last time, we now turn our attention to creating the associated view. Once we have that, we can wire everything up into a working WPF application.

Read more »

Add Word View Model

Saturday, May 11 2019 wordtutor-redux csharp

With the add vocabulary word screen that we defined last time, we can now look at the implementation of the related view model.

Read more »

Add Word Screen

Saturday, May 04 2019 wordtutor-redux csharp

Let’s look at the first of the screens we need to build for our application - the Add Word screen, used (surprisingly enough) to add a new word to the list of words we’re currently viewing.

Read more »

WPF Projects & ViewModelBase

Saturday, April 20 2019 wordtutor-redux csharp

Before we can start adding screens to our application, we need to set up some infrastructure for our WPF specific classes. In order to keep the WordTutor.Core technology independent, we’ll do this by creating a new project.

Read more »

Static Analysis

Saturday, April 13 2019 wordtutor-redux csharp

I’ve long been a fan of static analysis tools. They can act as a co-pilot, keeping an eye on things while you work, helping you to catch common types of problems. Let’s add (and tune!) some tools.

Read more »

Redux Store

Saturday, April 06 2019 wordtutor-redux csharp

At the core of the Redux design pattern is the store, a central place for storing the current state of the application. There’s only ever one store for the entire application. Changes in state are made by dispatching messages to the store that are processed by a reducer.

Read more »

Commandline Builds

Saturday, March 30 2019 wordtutor-redux csharp

Before we get much further in this project, we should set up command line builds while things are still simple. It’s easier to enhance the builds step by step as required than to configure a complex build system in one go.

Read more »

Application Model

Saturday, March 23 2019 wordtutor-redux csharp

Now that we have both VocabularyWord and ‘VocabularySet`, we can turn our attention to defining application model itself, allowing us to capture the overall state of the entire application.

Read more »

Vocabulary Set

Saturday, March 16 2019 wordtutor-redux csharp

After creating VocabularyWord last time, our next step is to create VocabularySet, a container for many words.

Read more »

Vocabulary Word

Saturday, March 09 2019 wordtutor-redux csharp

To begin our little project, we need to create our initial project structure. Once that’s in place, we can create the first class from our application model - VocabularyWord.

Read more »

WordTutor Revisted

Saturday, March 02 2019 wordtutor-redux csharp

Let’s try an experiment - taking many of the things I’ve been blogging about over the past few years and applying them to the design and build of an actual application, with the source code published step by step.

Read more »

Converting a List to a Queue

Saturday, February 23 2019 priority-queues csharp

While chatting with a friend about this series, he made a suggestion about a significantly more effective way to implement the ToImmutablePriorityQueue extension method.

Read more »

Explicit Interfaces and Delegate Properties

Saturday, February 16 2019 csharp

When unit testing, it is common to create a fake implementation of an interface so that you can test another component in isolation. But how do you handle the case where each test needs a fake that does something different?

Read more »

Extension Methods

Saturday, January 19 2019 priority-queues csharp

Sometimes we’ll have an existing sequence of items that we want to prioritize - let’s explore a couple of simple extension methods that can make this easier.

Read more »

Older posts

Generating Hash Codes  12 Jan 2019
The Problem with Equality  05 Jan 2019
Queue Equality  29 Dec 2018
Smarter Queue Enumeration  22 Dec 2018
Queue Enumeration  15 Dec 2018
Queue Testing  08 Dec 2018
Creating Branching Nodes  01 Dec 2018
Two Dual Item Queues  24 Nov 2018
Simple Queues  17 Nov 2018
Enqueuing Values  10 Nov 2018
Dequeuing Values  03 Nov 2018
Designing the External API  27 Oct 2018
Introducing the Priority Queue  20 Oct 2018
A better approach to reflection  13 Oct 2018
Avoiding Magic Strings  06 Oct 2018
Capturing Validation Metadata  29 Sep 2018
Modelling Validation Metadata  22 Sep 2018
Validation Metadata  15 Sep 2018
Extending validation with warnings  08 Sep 2018
Validation recap  25 Aug 2018
Equality of validation  18 Aug 2018
Short-circuiting validation  11 Aug 2018
Aggregation of validation  04 Aug 2018
Recovery of validation types  28 Jul 2018
Basic validation  21 Jul 2018
Why we need better validation  07 Jul 2018
A question of struct performance  30 Jun 2018
Equality has Symmetry  17 Mar 2018
Type Miscellany  05 Mar 2017
Testing Immutable Types  25 Feb 2017
Factory Methods  18 Feb 2017
Queue Concatenation  11 Feb 2017
Complex Queues  04 Feb 2017
The Problem with the Simple Queue  28 Jan 2017
Enumeration of Queues  21 Jan 2017
Reversing Stacks  14 Jan 2017
Simple Queues  07 Jan 2017
Queues  30 Dec 2016
Stacks Miscellany  22 Dec 2016
Stack Equality  09 Dec 2016
Enumerating Stacks  03 Dec 2016
Stacks  19 Nov 2016
When (not) to use Var  16 Jul 2016
Semantic Types Redux  05 Jun 2016
Semantic Types in C#6  27 May 2016
Property Enhancements for C#  20 Dec 2015
Language Extensions for C#  19 May 2014
When should methods be Static?  09 Oct 2012
Of Method Naming and more  29 Sep 2012
Someone needs an intervention  16 Dec 2011
CallerInfo in C# 5  08 Dec 2011
Regions in C#  16 May 2011
Lambda expressions and Block syntax  15 Apr 2011
Parameter Attributes and more  05 Feb 2011
Elegant.Data  19 Oct 2010
Doing less with LINQ  30 Jun 2010
WCF and IList  28 May 2010
Specialist Classes  22 May 2010
Attack of the Lazy Coder  20 May 2010
A Discovery in Linq: Lookup  11 Feb 2010
Co- and Contra-Variance in .NET 3.5  15 Sep 2009
When to use Var  26 Mar 2009
Struct Weirdness  11 Feb 2009
Contravariance and Covariance at last  29 Oct 2008
Spec#  30 Apr 2008
Lambda Events  22 Mar 2008
No longer the C# we knew  21 Mar 2008
Rare C#  12 May 2007
Generics in .Net  28 Jan 2004