Linker is a really simple web-based URL shortening service.
When I set out to create a Pluralsight course about my favorite built tool, Cake, I needed a .NET web application for my demos. The idea of the course was to take an existing web app and show how to use Cake to create a build and deployment pipeline for it from scratch. By the end, you'd have a Cake script that can take the application all the way from source code to running software. That idea eventually became Building and Deploying Applications with Cake, which you can read more about here.
Back to the app. Right off the bat, I had three requirements for it:
- Be simple
- Be realistic
- Don't be boring
In other words, I wanted an app that felt realistic—alas, not the ASP.NET MVC sample application—but also simple enough so not to become a cognitive burden. The last thing you want in a course (or presentation) is to spend half of the time explaining the domain of your demo app to the audience.
Of course, I could have gone for one of the classics like the music collection database or the online pet store we all know too well. But I wanted something fun and, if possible, useful.
You would never guess what I ended up making: a URL shortening service. Meet Linker.
Linker consists of a RESTful API backed by a database and consumed by a web frontend. Here's an overview:
This repository contains the complete source code, with tests and everything. Of course, there's also the complete build and deployment script written with Cake.
Since Cake is cross-platform, Linker should be as well. So I wrote two versions of it:
- One that runs only on Windows on top of the .NET Framework 4.6
- One that runs on Windows, macOS or Linux built on top of .NET Core
You'll find the Windows-only version in the
master branch, while the cross-platform one is in a branch called
What to Do with It
Although Linker came into existence to serve the needs of my Pluralsight course Building and Deploying Applications with Cake, it has proven to be equally useful for other educational purposes. In fact, I'll go as far as to say that if you ever need a demo app for a course, a talk or a workshop, you should feel free to use Linker for it. After all, it's just a simple—although complete—ASP.NET web app.
By the way, if you see any way you could improve it, pull requests are always welcome.
You can see Linker in action in the following online resources: