Cache busting in ASP.NET Core

Caching static resources is a good way to improve the performance of your website. Instead of your server having to deliver each static resource on every request. The user's browser caches the static resources the first time that they're requested and received, and thereafter loads them from the cache on the following requests instead of requesting them from the server again. In this post, I will show you how to implement cache busting using ASP.NET Core tag helpers.

HTTPS in ASP.NET Core using Middleware

HTTPS is now a common practice when hosting web applications. In this blog post, I will show you how to enforce SSL in an ASP.NET Core application using only middleware.

How to setup Castle Windsor in Umbraco

The concept of an inversion of control container(IOC container) is widely used in software development today. If you're new to IOC containers it can be an annoyance to get it setup correctly. The result being long hours spent with a lot of trial and error. In this blog post, I will show you have to integrate an IOC container with Umbraco CMS from start to end. Giving you a great fundament to work on.

Introduction to Sass

Sass is a superset of CSS. The word superset implies that Sass includes all the features of CSS, but also introduces a whole new range of features and concepts that developers can benefit from. In this blog post, I will go over each of the features that Sass brings and explain the benefit of using them.

Visual Studio snapshot debugger

We have all been there, a customer calls in a bug on the production environment. The first thing we do is that we go to the log files and see if we can find the error. Sadly the developer who wrote the code did not think that anything could go wrong so, so he decided not to spend the time creating a meaningful error message, after all, what could possibly go wrong?... So we end up with a generic error message which does not show the root course of the error. Luckily at Microsoft Build 2017, Microsoft introduced the Visual Studio snapshot debugger.

Async await in JavaScript

Async/await is a way to handle asynchronous code in JavaScript. Before async/await the only options were to use callbacks and promises resulting in highly nested structures. The benefit of using async/await is that it creates a cleaner way to structure asynchronous code without having to rely on nested callbacks or confusing promise chains.

Introduction to Fetch in JavaScript

Instead of using the good old XMLHttp Request Object in JavaScript. ES6 introduce the concept of Fetch. Fetch provides a cleaner interface for retrieving resources from both internal, but also external sources. The interface will seem familiar to the XMLHttpRequest, but Fetch has both a more powerful and flexible feature set.

Generators in JavaScript

ES6 came with a new type of function called a generator. A generator in JavaScript is a function that can be entered and exited that saves its current state across multiple re-enterings of the function. In this blog post, I will go over how to create a generator and how to use it. In the end of the post, I will show a use-case where a generator function can be applied.

Promises in JavaScript

In JavaScript, the most common way to retrieve data is though calling an API. Calling an API is in most cases done asynchronously instead of synchronously to create the best user experience and making it possible to call multiple APIs at the same time. The standard way to call an API asynchronous is by using function callbacks. The problem with the function callback is that it is likely to introduce big nested callback chains that can be hard to debug and maintain. The new and superior way to handle asynchronous code is by using promises.

Array methods in JavaScript

Working with collections are a daily task, as a programmer. JavaScript uses the Array as the main type of collection. In this blog post, I will go over the methods on the array that I find most useful. Hopefully, the introduction to the methods will be increasing your productivity, working with collections and increasing the readability and maintainability of your code.