The digital home of Richard Garside

This is my digital home, a resting place for my personal and client projects. I'm a web developer based in Leeds. I specialise in .NET MVC and apps for Windows 10 and Mac. You can find out more about me here.

Recent stuff from my blog

The Hitchhiker's Guide to the Galaxy Word Search

Hitchhikers Guide to the Galaxy Word Search

The Hitchhiker’s Guide to the Galaxy is perhaps the most remarkable, certainly the most successful book ever to come out of the great publishing corporations of Ursa Minor. It is an indispensable companion to any weary traveller roaming the celestial highways. While providing a huge amount of vital galactic information, it is well known to have a hugely popular word search section to help pass the hours while waiting for the next passing spaceship.Till now this section has never been published or even seen on the mostly harmless planet Earth. So, I was very excited to find a battered and …

Be more CUPID, be less SOLID

Should we write code SOLID? I’ve always liked a bit of single responsibility principal and dependency injection, but don’t often find myself using interface segregation.

Dan North argues that the SOLID Principals are not the be all and end all of good software. On a recent .NET Rocks 1745 he explains what’s wrong with SOLID and puts forward his own set of CUPID Properties. Properties are less strict than principals, but if you write code that has more of these properties then it will be better.

Dan North seems to have plans to write a series of detailed blog posts about the CUPID properties, …

Generating links inside a .NET Core Tag Helper

Previously when generating links inside any non view code I'd always try and get hold of an instance of IUrlHelper, but I've found a simpler way that has been available since .NET Core 2.2.

LinkGenerator can be injected into a tag helper or any class. It has all the useful methods of IUrlHelper, with fewer dependencies. It only asks for HttpContext if it absolutely needs it, which in many cases it does not.

Inject it into your class like so:

private readonly LinkGenerator _linkGenerator;

public NogginTagHelper(LinkGenerator linkGenerator)

{

_linkGenerator = linkGenerator;

}

Using the …

More from my blog

You can read more from blog here.