Utf8Json Media Formatters for ASP.Net Core

Published by

Recently, I have been looking at the Utf8Json project and evaluating for use in our high performance payments API. Looking at the benchmarks on the Github page, and running my own benchmarks, the numbers stated seemed to tally up, so I built a few media formatters for aspnet core. Now, the project does already ship with some media formatters as a separate nuget package. However, I wanted to improve the following things:

Building Service Fabric Apps With VSTS YML Build Definitions

Published by

In my previous article, we setup a standarised build using the new YML build definitions within VSTS, using the .Net CLI tooling. In this article, we will use the same setup as our base, but we will build and publish a service fabric application. Our sample build file has the following steps: Clean Sources Install the Dotnet CLI Restore Packages Build Projects Test Projects Publish the Web App Publish Build Artifacts Tag VSTS Build For our service fabric build, we will need the following steps:

Automated Builds in VSTS with YML Build Definitions

Published by

In this article we will explore a preview feature inside of Visual Studio Team Services (VSTS) called YML Build Definitions. In essence, this allows you to change your build process from a .yml file in your git repository much in the same way as you can do with other services such as AppVeyor. During the article, we will setup a build definition for an Aspnet Core website. Prerequisites Before we take a look at the struture of the file, you will need to complete the following tasks:

Ensuring samesite cookies with URL Rewrite

Published by

In this article, we will increase our websites level of protecting against Cross-Site Request Forgery and Cross-Site Script Inclusion attacks by appending an additional modifier to the Set-Cookie HTTP header.

Ensuring httpOnly cookies with URL Rewrite

Published by

In this article, I will give a brief overview of cookies, why we want them to be httpOnly and how we can ensure this via URL Rewrite. We will also be creating our first outbound rewrite rule with a pre-condition.

Canonical host urls with URL Rewrite

Published by

In the previous post, I gave a brief intoduction to URL Rewriting and showed you how to get from HTTP to HTTPS. In this article, I will show you how to have a canonical host url. What is a canonical host url? It can be incredibly easy to distribute different urls for your website. Lets say that we have www.site.com/post1 and site.com/post1. If you’re a search engine, you think that these are different different pages with the same content.

Up and running with URL Rewrite - going from HTTP to HTTPS

Published by

In this series, I am going to take you through a few web.config snippets that have come in handy for me when using URL Rewrite on IIS. Firstly, I am going to introduce the URL Rewrite module then show a sample of going from HTTP to HTTPS.

Domain Driven Design Notes

Published by

These are my notes on domain driven design whilst watching the course by Dino Esposito on Pluralsight. Domain Driven Design (or DDD), is the process of discovering both data and behavioural requirements for a given problem domain where traditional approaches usually focus purely on data collection aspects. The aim is to provide better tools to tackle the complexity at the heart of software. Within DDD, there are two distinct parts: an analytical one and a strategical one.

5 Tips For Getting What You Want

Published by

Over recent months, some close friends and I have found ourselves in a bit of a rut and woken up to the fact that we aren’t getting any younger and don’t really have a plan. Naturally, this can be upsetting to a person and it’s something that can be easily rectified.

News Roundup March 2017

Published by

In this the first of many news roundups, I am going to look back through the news that you may have missed and the stories/blogs that have interested me over the previous month(s). In this round up I will be taking a look at content from arround mid January, through to the 1st March 2017.

OpenMessage 2017 Roadmap

Published by

OpenMessage originally started out as a replacement for an internal library that was used across teams. At the time, the team I was apart of needed the latest version of dotnet core for the library where as the other team were stuck on RC1. They were also developing features for that version of the framework and a few pre-existing details that we were unhappy with (eg: the request/response implementation). With that in mind, I created a minimal wrapper for what we needed. Looking forward, I plan to dedicate a bit more time to the project and improve it.

My 2017

Published by

I’ve been thinking about writing this post for a little while now, but never seem to get around to it. I know that I’m massively late to the 2017 blog post party, but I didn’t really think about it for quite a while. I wanted to refocus and find out what I really wanted to achieve rather than a token guesture that would likely fail like previously. I’ve split this out into two main categories below: Personal and Professional Development.

Hugo Quick Tip: Inlining Css Files

Published by

Today I have been doing a little bit of work on my site and one of the things that I wanted to do is inline the css file. It’s quite a small file anyway, and once compressed with gzip should make a fairly minimal difference to the size of the page.

Write Good Code, Not Code Hastily

Published by

This article is a rework of a draft that I’ve had sitting in my drafts folder for a long while now. Over the last six months or so, I’ve been reviewing a lot more code than I had previously thanks in part to a promotion and in part, code reviewing applicants coding entries. Some of the code has been good, with some code, really not so good!

Blog Building - Part 4 - Frontend

Published by

So far we have built a very basic site and got a basic understanding of how to configure and override the theme. Next up we are going to configure our frontend workflow using yarn and gulp.

Blog Building - Part 3 - Theming

Published by

In this article, I will show you how the theme has been constructed and show you how the overrides work. So far we have created a site, setup most of our workflow and posted our first article.

Blog Building - Part 2 - My First Post

Published by

In the last article, we setup our workflow and all the pieces that you will need to create a new site. Now we need to install a theme and begin publishing. Prior to writing this series, I began evaluating the extensibility of hugo themes and started work on something I call bones - a no thrills template with no styling, just structure. As I improve the template it will become more useful, maybe. It will remain the template behind mysite as I continue to improve it.

Blog Building - Part 1 - Hello Hugo

Published by

As promised in this first mini-series, I am going to guide you through the steps that I have taken to get my blog up and running on Github pages and Cloudflare with SSL. As these the steps that I have taken to get this blog up and running, your milage may vary with this as different versions get released. That said, you should be fine.

Hello World

Published by

Hello World. Safe to say it’s been a little while since I have blogged or even had a website come to think of it. Alas, I am back with some fresh ideas and recharged to help you dear reader.

Up And Running With Git And Powershell

Published by

We’ve all experienced a time where we use our pc’s for a prolonged period of time, accumulating a ton of crap along the way as we try out various technologies and fads. After a while, the pc begins to do funny things like crash for no apparent reason. This week, I needed to rebuild my dev machine and decided to change from Atlassian’s Source Tree over to Powershell and raw git.

DevOps

Published by

As part of my role as a .Net Developer, I have recently been getting to grips with the build and deployment features of both Teamcity and Octopus Deploy. This has been making me think about the industry buzz word “DevOps” and exactly what that means.

Dev Lunches: What, Why, How

Published by

If you’re not up-to-date, you fall behind. You fall behind in your work, which leads you to fall behind at home. If continued, it’s a never ending circle that can seem like climbing Everest in order to overcome. I propose that we, as developers, start doing is utilizing our free time to help not only ourselves but our co-workers too. We can do this via dev lunches.

Message Queue Fundementals: MSMQ

Published by

MSMQ is Microsoft’s Message Queuing service that can be used to implement both synchronous and asynchronous solutions. Typically solutions are architectured using the available C++ API’s or via the relevant COM objects. The .Net Framework exposes the System.Messaging namespace which contains all the classes that you need to work with the MSMQ API.

Message Queue Fundementals: Introduction

Published by

Message queues are a substantial part of modern day enterprise architectures and a vital part of providing scalable solutions. They are designed for asynchronous communication between different parts of the system. They help scale individual components of a system and increase reliability with the optional addition of the persistence of messages to a storage system.

Finding Reducible Expressions

Published by

Today I just wanted to share a quick note regarding a Stack Overflow answer that I recently came across. In the answer the author explains that a call to Expression.CanReduce will typically return false, while Expression.Reduce() will return the current expression. The author continues to state that one of the types that overrides Expression.Reduce() and Expression.CanReduce is MemberInitExpression.

Unit Testing Equals The Forgotten Tests

Published by

Today I wanted to cover something that is not often covered when unit testing an object. If an object has the Equals method overridden, then there are a number of tests that we should be running as a minimum

SAP Business One V9 Version Strings

Published by

Version | Patch Level ----------------------- 900046 | 00 900052 | 01 900053 | 01 Hotfix 1 900055 | 03 900056 | 04 900058 | 06 900059 | 07 900060 | 08 902000 | 09 902001 | 09 Hotfix 1 902002 | 10 Note: I added the Hotfix 1 to clarify. I believe these are correct, I can’t find a definitive source to verify these results. Then in order to check the target databases version, I ran the following against the target database:

Becoming An MCP

Published by

As the title suggests, today I passed the 70-483 Programming in C# exam to offically become a Microsoft Certifed Professional.

Using IDisposible correctly

Published by

In this article, I am going to show you how to use the IDisposable interface correctly in your code. When I read others code, it is easy to pick up on subtle bugs. We need to begin to train ourselves to see the bugs and we do this by understanding what we are using. Before we begin, we need to make sure that we understand a core piece of computer science theory: Destructors.

Semaphore vs SeamphoreSlim Micro Benchmark

Published by

In this post, I am going to show a small micro-benchmark to demonstrate the performance difference between the Semaphore and SemaphoreSlim classes in C#. A Semaphore is often used to restrict the number of threads than can access some (physical or logical) resource. In this case, we want the restriction to be as little as possible.

Flicker free forms and listview in .Net

Published by

On a project I have been working on recently, I came across a problem where under Windows an Mdi Child form would flicker when it loads. Trying to find information on what was the cause of this was near impossible. I ended up trying a lot of code snippets that I found when googling the problem and this is what I have come up with.

Extension methods in dotnet

Published by

In this article we will take a look at what extension methods are and how to use them in .Net. Personally, they are one of the best things that has been introduced into the .Net framework in terms of readability. I will take you through what extension methods are, how to create them (in c# and vb) then I will show you some of the extension methods that I have created (in c# only, conversion is for you to try).