Developing and Distributing Tools with DNX, DNU and NuGet
Nov 07, 2015
npm install -g for .NET? it’s here!
There is a (somewhat) hidden gem in the new .NET world with DNVM, DNX and DNU - creating and distributing global tools with ease. Global meaning the application is always available through one or more commands in the command prompt (basically being registered in the PATH system variable). In the Node.js community this has been a central part, allowing you to install useful tools using the Node Package Manager.
Visual Studio Online Build - Building and Pushing Docker Images
Oct 10, 2015
In this article we will look at an example of how to build docker images and pushing to a Docker registry using the new cross-platform Visual Studio Online Build. As the running example we will take a small Node.js application, push it to a Git repository and have VSO build take over from there.
The goal is to show how to build a docker image and push it to Docker Hub with a Linux build agent.
GOTO Copenhagen Slides
Oct 06, 2015
Yesterday I had the opportunity to give a talk on the new build system in Visual Studio Online at GOTO Copenhagen. Great conference overall and good questions afterwards! The slides are available for download.
ASP.NET Web API Request Throttling with Redis Cache
Aug 16, 2015
When developing API’s for external parties to consume, sometimes the need for request throttling becomes relevant. In this article you’ll see a simple approach to create such a middleware component for Web API in ASP.NET 5, based on Redis.
You can browse or download the complete sample on GitHub at: https://github.com/jlandersen/web-api-redis-request-throttling.
Considerations The general case usually is that you have identifiable consumers of your API. The consumers are usually identified based on an access key (or something equivalent) supplied with each request.
xUnit or NUnit with Visual Studio Online Build
Jun 19, 2015
Running unit tests as part of the build process with Visual Studio Online requires no effort if you use Visual Studio Unit Testing Framework. But really, not a lot use that these days. I have done a few presentations on using the build services in Visual Studio Online for Continuous Integration. Unfortunately it seems common that it is a bit troublesome to run either xUnit or NUnit tests as part of the build process.
Async Camera Pictures with Xamarin Forms
Jun 18, 2015
I have seen different approaches to using the device camera with Xamarin Forms. Here’s an example of how this might be implemented, with an async interface for easy async-await consumption in the shared Xamarin Forms part of the application. I will show the implementation details of the shared code and iOS version. The full example is available on https://github.com/jlandersen/xamarin-forms-camera that includes Windows Phone and Android parts as well. If you are unfamiliar with accessing native features of the different platforms, check out the official documentation.
ASP.NET 5 with Gulp and Bower From an Empty Solution
Apr 10, 2015
ASP.NET 5 is on it’s way which will level the playing field a bit in comparison with other web stacks, primarily enabled through the integration of Node.js with Visual Studio. Exciting times indeed! In the project templates provided with the currently available Visual Studio 2015 CTP, the “non-empty” projects are configured with Grunt and Bower. In this post I will walk through setting up an empty solution with Bower and Gulp, an alternative to Grunt.
Multitenancy with Subdomains in ASP.NET MVC 5
Feb 12, 2015
Developing a product that is multi-tenant is a pretty interesting challenge. Recently I was in the fortunate situation of having to work on such a thing. By giving organisations access to a tenant through a subdomain of choice is a pretty neat approach that provides users a sense of personal ownership of the product. In this post I will show a simple approach of how to use subdomains to identify the corresponding tenant in ASP.
Xamarin Forms - Customizing Tabbed Page Header and Title on Windows Phone
Dec 10, 2014
In this post I will show how to customize the title and header section of the Tabbed Page control, when running on Windows Phone. On WP this is the pivot control being used, which is quite different from the tabs used on both iOS and Android.
Let’s say you wish to just change the font or completely restyle the title or the header showing the sections. You can create the complete page as a native Windows Phone XAML page with a pivot control and let that render.
Capptain (or your app telemetry service of choice) with Xamarin Forms
Dec 03, 2014
We are increasingly developing applications targeting both iOS and Windows Phone using Xamarin Forms. In this case, when it comes to telemetry, we are interested in putting as much as possible in the shared code. Here is a way to incorporate Capptain into a Xamarin Forms app using DependencyService and a proxy on each platform. You can use the same approach with other telemetry services, as long as a native SDK is provided for the platforms you target.