The personal blog of Dave Glick


Hi! By day, I'm a .NET and open source enthusiast and a Microsoft Visual Studio and Development Technologies MVP. By night, I'm a husband and father. Somewhere in between the two I write stuff here.

Roslyn-Based DSLs vs. Standard C# Scripts

Examining the advantages of each and when you'd want to use them.

One of the many benefits of the Roslyn compiler-as-a-platform approach is that we can use it within our own applications to enable interesting scenarios like code-based configuration or scriptable behaviors. Roslyn provides several facilities for making this possible including a compilation API, access to syntax and semantic information, and a dedicated scripting API. In addition, Roslyn also powers the execution of C# scripts (typically ending in the .csx extension) by providing a script runner executable that's basically a thin wrapper around the scripting API I just mentioned. This gives developers many different options for how to introduce the power of code-driven functionality to their codebase. This post takes a look at two such options and why you might want to use one over the other. We'll also consider some of the fundamental reasons why there are tradeoffs at all and what could be done to improve the situation.


2016 In Review

A look back.

This whole "Year in Review" blog post thing has gotten quite popular. At the risk of being cliché, here is my own entry. Even if no one else finds this to be a fascinating and important historical record, I find it personally insightful.


Moving To Netlify

Why I'm moving my blog and other sites to Netlify.

There seems to be an increasing enthusasim for static sites recently. If you're not familiar with the term, a static site is one that consists only of resources that can be delivered directly to a client such as HTML pages, images, CSS files, etc. In other words, static sites don't require any sort of compilation or interpretation on the server. To satisfy this interest, many new static site hosts have sprung up. These hosts specialize in delivering static sites without any ceremony quickly and efficiently, often by pushing some of the resources to geographically distributed content delivery networks or otherwise optimizing delivery for static resources. Perhaps the most well known of these hosts is GitHub Pages. I recently moved this blog and my other sites such as Wyam from there to Netlify, another such host. Normally a site host change wouldn't really be cause for a whole post. In this case, however, I feel that spreading the word about Netlify may help other folks who are looking for a good static site host. I swear this isn't a sponsored post or anything (though they do have an awesome free plan, so I'll admit to an interest in paying it forward).