Web Development
YADNC3JSG–Yet Another .NET Core 3.0 JSON Serializer Gotcha
Previously I wrote about several “gotchas” in the new JSON serializer that is built in to .NET Core 3.0. Another one has cropped up, but it is different enough that I thought it warranted its own post. Type Promiscuity via GIPHY Back in 2010 or something like that, Ted Neward gave a talk about JavaScript … [Read more…]
Logging in a .NET Core 3 SignalR client
SignalR is part of the .NET Core framework that allows for real-time communication between a server and any number of clients. The traditional example is a JavaScript client that can receive updates directly from a web server asynchronously, but you can also connect to a SignalR hub with a C# client. via GIPHY HubConnectionBuilder To … [Read more…]
.NET Core 3.0 Upgrade–New JSON Serializer Gotchas
With the release of .NET Core 3.0, everyone needs to start thinking about upgrading their existing .NET Core 2.2 apps right away. Not only because .NET Core 3.0 has a bunch of performance gains that you’ll undoubtedly want to take advantage of, but also because support for .NET Core 2.2 ends mid December. Microsoft’s new, … [Read more…]
Bit Flags
Bit flags aren’t probably something that you think about in traditional/modern software development. You might if you are in the IoT space, but if you have the pleasure of a ton of RAM, you probably aren’t super concerned with saving space. However, recently I’ve been thinking a lot about network communication and how to minimize … [Read more…]
Bytes and Nibbles and Hex
I’ve never really liked hexadecimal notation. The combination of letters and numbers always made my brain turn off. I mean, I understand it, but it never seemed like it made a difference or not. via GIPHY Binary Obviously, computers think in ones and zeroes. The smallest unit is typically talked about as a byte, which … [Read more…]
SignalR Strongly-Typed Hubs
Previously I talked about how to set up the server side of SignalR for facilitating real-time communication. One of the parts that I don’t particularly care for in that default implementation is that the hub methods (the messages that are sent to connected clients) are identified by strings. Sure, you could create some string constants … [Read more…]
ASP.NET Core 2.2 SignalR Server
SignalR is a technology that allows you to write bi-directional communication between a server and a client. This can lead to some pretty cool interactions, such as a live-updating dashboard on a website, or the ability to communicate requests to a server without building HTTP endpoints. SignalR does a lot of heavy lifting behind the … [Read more…]
ASP.NET Core Unit Testing – Setting the request body
Every now and again I find it necessary to set up the request body manually (as opposed to using the [FromBody] tag). In the controller you can read from the request body easily enough: via GIPHY Testing How do you test this? Normally I would just create a controller, call the method, and check the … [Read more…]
TypeScript – Enumerating object properties with Object.keys
One of the benefits of JavaScript (and therefore TypeScript) is being able to do whatever you want with objects. This can be dangerous, of course, because of type promiscuity – which is one thing that TypeScript addresses. via GIPHY Object.keys Sometimes it is still useful to just loop through each property on an object in … [Read more…]