All right! It’s been a minute! Tamperproof cookies, I needed one, it’s pretty simple after thinking it through.
I feel like I always say it’s been a while since my last post… but this time it has in fact been a while.
The decorator pattern is a structural design pattern that can be used to add functionality to classes without modifying the original class or its interface.
In object-oriented programming, the decorator pattern is a design pattern that allows behavior to be added to an individual object, dynamically, without affecting the behavior of other objects from the same class. The decorator pattern is often useful for adhering to the Single Responsibility Principle, as it allows functionality to be divided between classes with unique areas of concern. …
Previously I wrote about creating Health Checks for Microsoft Orleans, but the JSON response was too minimal. In this post we’ll see about prettifying that output!
In the previous post we learned a bit about health checks, how to create them, and view their “health” from the perspective of Microsoft Orleans. The end result was a single word response of “Healthy”, “Degraded”, or “Unhealthy”; not very exciting stuff.
Health Checks are a means of seeing how a system is running at the time of performing the check. Let’s see how we can apply them to Orleans!
Health Checks are generally exposed via HTTP endpoints, and when hit (often at a “/hc” or “/health” endpoint) they are able to report of the “health” of the current system.
The health checks, at least in .net land, are comprised of an enum HealthStatus which indicates Health, Degraded, or Unhealthy. The health checks themselves are created by implementing concretions of the IHealthCheck interface.
Any system can include one or more health checks…
My notes about trying to get started with React.
I’m mostly a backend-dev. The bit of front-end dev I’ve done was on web-forms with asp.net. Getting started in this whole ecosystem seems pretty daunting coming from a background where I have access to strongly typed, easily testable code.
This is probably rehashing things I’ve stated before, but with front end I feel like it’s more of an “opinion” on if something is implemented in an “good” way.
Anyway, I’m trying to mess about with React. I want to hopefully at some point, replace the mostly placeholder site I have at…
In the last post we started talking about mTLS. In the post I pointed out that the client cert’s signing CA was not verified, let’s fix that!
The main thing accomplished in the previous post was getting a CA up and running with a client certificate signed by that CA. We updated our web api to require client certificates, and successfully connected to the application using our new client certificate.
The flaw in the previous post was though we were validating a client certificate was present, we weren’t actually validating that the client certificate was signed by the CA we…
Most people know what TLS is, but what about mTLS? How is it different from TLS, what’s it used for?
TLS, or Transport Layer Security, is the successor to SSL; both of which are means of secure communication. There have been several versions of TLS, each subsequent version being more secure, easier to use, or a combination of the two. We’re up to TLS v1.3.
You can read a lot more about TLS here.
The basic idea of TLS is to secure communications between multiple parties, you’re probably very used to “seeing” it when you visit websites like this one.
The builder is a creational pattern that can be used to construct more complex objects, without having to new them up in calling code.
Though the builder pattern is not my most used creational pattern (that’s the Factory), it is one that I often rely on for the creation of more complex objects than what the factory easily allows for.
The builder pattern is a design pattern designed to provide a flexible solution to various object creation problems in object-oriented programming. The intent of the Builder design pattern is to separate the construction of a complex object from…
Working with the IHostBuilder introduced to .netcore has been an overall pleasant experience… until I needed configuration from app settings for app bootstrapping. Luckily, there’s still a way to do it.
The docs on
IHostBuilder are a good place to start if you've not worked with it before - though if you've found this post I'd imagine you have and are having the same struggle as me!
The idea of the
IHostBuilder is the place where you "set up" all the startup bits of the application - the "services" that are a part of it like WebHost, Orleans, Logging, IOC…
The factory is a creational pattern that can be used to retrieve instances of objects, without having to new them up directly in calling code.
At my job, I find I’m using creational patterns constantly; and most of the time it’s a factory.
In class-based programming, the factory method pattern is a creational pattern that uses factory methods to deal with the problem of creating objects without having to specify the exact class of the object that will be created. …