Redeveloping my Word Tutor spelling application using .Net Core 3.0.

WordTutor Revisted

2 Mar 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.


Vocabulary Word

9 Mar 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.


Vocabulary Set

16 Mar 2019 wordtutor-redux csharp

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


Application Model

23 Mar 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.


Commandline Builds

30 Mar 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.


Redux Store

6 Apr 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.


Static Analysis

13 Apr 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.


WPF Projects & ViewModelBase

20 Apr 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.


Add Word Screen

4 May 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.


Add Word View Model

11 May 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.


Add Word View

25 May 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.


First Light

8 Jun 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.


Revisiting ViewModelBase

15 Jun 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.


Vocabulary Browser

29 Jun 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.


Restructuring Reducers

13 Jul 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.


Integration Testing

20 Jul 2019 wordtutor-redux csharp testing

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.


Dependency Injection: Core

27 Jul 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.


Dependency Injection: ViewModels

10 Aug 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?


Dependency Injection: Views

17 Aug 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.


Redux Subscriptions

25 Aug 2019 wordtutor-redux csharp

One of the problems we currently have is caused by lack of updates - our application model can change without our view-models being notified that the change has happened, leaving our user interface showing stale information. To solve this, we’ll extend our Redux store with subscriptions, to allow each view-models to be proactively notified when things change.


ViewModel Subscriptions

31 Aug 2019 wordtutor-redux csharp

Now that our Redux store supports subscriptions, we can register to update our existing view models, allowing them to automatically stay current as our application state changes. The changes to each will be similar, but with a few variations on the common theme.


Debugging word selection

14 Sep 2019 wordtutor-redux csharp

With subscriptions wired up to keep our view models updated, we can run our application and start clicking around. When we select a word, we can trace through the flow of messages to see how everything updates. But, it’s easy to crash. Let’s debug that crash and work out how to make the application more robust.


Commands and CommandBinding

21 Sep 2019 wordtutor-redux csharp

Up until this point, we’ve relied exclusively on data-binding for the link between our view-models and our views. While data-binding handles a lot of scenarios well, it doesn’t support buttons, menu items and so on.


C# 8 and .NET Core 3.0

28 Sep 2019 wordtutor-redux csharp

It’s been a big week of releases in the world of .NET with the release of both .NET Core 3.0 and C# 8. Let’s upgrade the Wordtutor projects to all the latest versions and see what we learn.


Nullable types redux

12 Oct 2019 wordtutor-redux csharp

Continuing our the upgrade process from last time, in this post we’ll explore the changes required to our WordTutor.Desktop project.


Code Gardening

19 Oct 2019 wordtutor-redux csharp

Continuing on the theme from our past two posts, we’ll address the remaining issues related to nullable types, as well as taming the rest of our current storm of compiler warnings.


Hashcodes

26 Oct 2019 wordtutor-redux csharp

Here’s an odd warning that came up when I was working on last weeks Code Gardening post:


Modifying Words, Part the First

9 Nov 2019 wordtutor-redux csharp

The existing model class ModifyVocabularyWordScreen only handles the creation of a new word. We need to modify it to support the modification of an existing word as well.


Modifying Words, Part the Second

16 Nov 2019 wordtutor-redux csharp

If you’ve tried out our application as it stood after last week’s post, you may have noticed that the user experience for modifying a word is a bit suboptimal. After selecting a word, you have to separately press the Modify button. Can we do better?


Convention testing for immutable types

30 Nov 2019 wordtutor-redux csharp testing

The Redux architecture we’re using for our application state relies on all our state objects being properly immutable. So far, we’ve relied on nothing more than self-discipline to ensure no mistakes are made. By adding some convention testing to our project, we can enlist some help in avoiding common errors.


Wither convention testing

14 Dec 2019 wordtutor-redux csharp testing

Following on from our previous post on convention testing we can extend the conventions by considering the standards we want to follow when we write methods on our immutable types.


Logging

28 Dec 2019 wordtutor-redux csharp

As we progress building the WordTutor application, some of the functionality will be a great deal more complex - and that requires a better way to see what’s happening inside the application than we’ve had to date. It’s time to implement some logging.


Logging Demonstrated

11 Jan 2020 wordtutor-redux csharp

After earlier defining our logging interface, some readers posed a few questions about how it would work from a consumers perspective. So before we look at implementation details, let’s look at how we’ll instrument our code and what the output might look like.


Logging Implementation

25 Jan 2020 wordtutor-redux csharp

To implement the logging interfaces described earlier, there are some issues we need to consider. There are two different usage patterns we need to support, plus we need to support concurrent use, and avoid code duplication.


Speech API

15 Feb 2020 wordtutor-redux csharp

For the WordTutor application to work, we need to be able to read words (and letters) out loud to our student. To power the speech synthesis, we’re going to integrate Azure Cognitive Services into the application.


Redux Middleware

14 Mar 2020 wordtutor-redux csharp

At this point in the development of the WordTutor, we need to properly incorporate speech generation into the application. We could hack and glue it into place on top of the existing architecture, or we can integrate it into the existing structure in a clean way.


Redux Middleware Implementation

28 Mar 2020 wordtutor-redux csharp

Based on the interfaces we defined last time, let’s integrate middleware functionality into our existing Redux store. This will lay the foundation we need for asynchronous speech generation.


Speech Middleware

11 Apr 2020 wordtutor-redux csharp

Now that we’ve modified our Redux store to support middleware, we have the foundation needed to integrate speech synthesis into the main flow of our application.


Maintenance & Speech

18 Apr 2020 wordtutor-redux csharp wpf

With our speech infrastructure in place, our next step is to hook it up with our existing maintenance screen. This will allow our users to test out pronunciation as they make changes.


Caching Speech

25 Apr 2020 wordtutor-redux csharp

If you’ve been playing around with maintenance screen and the speech integration that we completed last week you may have noticed that there can be a noticeable lag between the time you press a play button and when you hear the speech.


Improved Caching

9 May 2020 wordtutor-redux csharp

After our recent introduction of caching, I had an interesting conversation with a friend about the way I’d written the code. He was persuasive that the approach I’d taken had some significant issues and that it was worth taking the time to address them.


Caching without Race Conditions

13 Jun 2020 wordtutor-redux csharp

It wasn’t very long after my prior update on caching that a friend informed me that the code has a race condition. Yes, the same friend who persuaded me to update it last time. Worse, during a Skype call, we identified code that would outright fail for an independent reason.