Open.CoreMDB Part 2 – Refactoring
You’ll find an embedded player for the recording at the top of this post. This video is just over 90 minutes long, but it forms the ground work for what will become a full test drive developed piece of open source software that I’m calling Open.CoreMDB.
I originally recorded this on the July 15th, 2018.
The idea with part two in this series was to begin a full system refactor. In the first part, we’d built the entire system in one project
and leaving it like that would be a nightmare. So, the entire system was broken up into several parts:
This way, we can work on individual parts of the system and keep them separated and loosely coupled.
leaving the entire source in one project would mean that the system was tightly coupled
We also started adding an API to the project. This took the form of an ASP.NET Core WebApi project, and has a single controller (
ResourceController) with a single method (
We also used VS Code’s built in task runner to build a task which would continuously run our unit tests
this gives us Live Unit Testing-like abilities
Essentially, whenever a change is made to anywhere in the code base, the unit tests are re-run and we see the immediate result of our code change.
The following is the task that we created:
|"label": "test with coverage (continuous)",|
This task was based on some of the points raised in this blog post, by Scott Hanselman.
Issues in the Stream
From around the 1 hour mark onward, I started having trouble with xunit’s global CLI tool
dotnet xunit command
After the stream, I found that the reason for this was because the xunit global CLI tooling has been deprecated and doesn’t support ASP.NET Core MVC. As such, what I should have done was continue to run my task for continuously running the unit tests.
I mentioned the following resources in this stream:
which includes a code of conduct for folks who wish to contribute