Designing Web API Versioning

Prashant Brall's Blog

In this post I am going to talk about some of the commonly used Web API versioning strategy and hope it will help you decide which one is best suitable for your scenario.You will also see that there is no right or wrong way of designing them but I am always about options and different approaches, ultimately it is you who have to decide which approach is best suitable for you.

Uri based approach:

In this type of versioning strategy the versioning is embedded in the URI and probably the most popular one.However I personally think it is quite anti-REST as with each version the URI changes. REST is very resource oriented and it means once you have defined the URI(address) to the resource then it shouldn’t change just because you have a new version of that resource. This also means that the physical URI surface area will…

View original post 779 more words

MVC WEB HTTP, HTTPS Application Monitoring Tools

Software Engineering

This is just a collection of links, tools for monitoring, testing, tracing, debugging ASP.NET applications. When I have time I’ll evaluate each of the different tools.

Health Monitoring and ASP.NET MVC

Log exceptions with Health Monitoring in ASP.NET MVC3

Health Monitoring with ASP.NET MVC






Responsive Design Test Tools

Reverse Proxies for Mobile development


View original post

OpenLiveWriter Version Of Syntax Highlighter Plugin Available Now

In case you hadn’t heard the excellent Windows Live Writer has gone Open Source and is being kept alive by the community. It’s now called OpenLiveWriter. This is great news as it is a really useful tool, used by many, that was looking like being left to die by Microsoft. For more information check out these links:

Scott Hanselman’s post:

The .Net Foundations post:

The official OpenLiveWriter blog is here:

These are very early days for OpenLiveWriter and it looks like it will go through some changes as it evolves, including the way that it handles plugins. Despite the expectation that a lot will break through this evolution I have worked on updating my Syntax Hightlighting plugin for to work with OpenLiveWriter.

Updating the plugin to work with OpenLiveWriter was fairly straight forward thanks to the OpenLiveWriter SDK NuGet Package which can be found here:

View original post 298 more words

Generating Swagger example responses with Swashbuckle

Matt's work blog

Swashbuckle is a tool for generating Swagger, the API description language, from your ASP.NET Web Api solution.
Using Swashbuckle, which provides Swagger-UI, you can create pretty living documentation of your web api, like this:

Documenting the Response

In this post I am going to show you how to document the Response, and a new way to generate some response examples.

You can specify the type of response for Swashbuckle a number of ways. Consider a simple API endpoint which returns a list of Countries:

One way of describing the response code and content for Swashbuckle is using a combination of XML comments, and the ResponseType attribute, like so:

However, this only allows for one type of response.

If your API method can return multiple types, i.e. in the case of an error, then you can use the new SwaggerResponse attribute:

The Swagger 2.0 spec allows for examples to be…

View original post 119 more words

ASP.NET Web API Unit Testing

chsakell's Blog

Unit testing can be beneficial to many aspects in software develepment, from the lowest level that is the source code to the highest level and the end user’s experience. Writing automated tests helps finding defects earlier in the development lifecycle process which leads to fewer late nights or weekend work (happier developers). Since defects are resolved before production, less defects reach end users (happier clients). It also increases reliability of source code, since if the base code doesn’t change all tests should always return the same results. Last but not least, anyone that decides to write unit tests is also forced to write testable code which leads to better software development practices.

Web API Unit Testing

ASP.NET Web API stack has many aspects that firstly must be well understood before writing unit tests against it and that’s what makes it difficult. This post is a full stack Web API Unit…

View original post 1,949 more words

Voxel editor


I’ve been looking for some voxel-editors and found a few that are gratis:

  • MagicaVoxel: looks very nice, however, it is closed source and no Linux build is available;
  • Zoxel: open-source, but rather limited;
  • VoxelShop: closed-source, seems to work fine.

However, creating voxels manually is rather tedious work. So, I would like to generate them using a script. Furthermore, my voxel renderer supports some features that are not available elsewhere. For example, one can use extruded triangles as ‘leaf-nodes’ instead of tiny cubes, because nodes in a voxel octree can refer to themselves.

Hence, I decided that I want to make my own voxel editor. One that will be purely script based. So, if you want to make a single change, you have to change the script that generated it and re-execute that script. As scripting language I’ve chosen Lua, because it is almost trivial to create c++…

View original post 291 more words

Second Level Cache for EF 6.1

Code, the Universe and everything...

See what’s new in Beta here.

Currently Entity Framework does not natively support second level caching. For pre-EF6 versions you could use EF Caching Provider Wrapper but due to changes to the EF provider model in EF6 it does not work with newest versions of EF. In theory it would be possible to recompile the old caching provider against EF6 but, unfortunately, this would not be sufficient. A number of new features breaking some assumptions made in the old caching provider (e.g. support for passing an open connection when instantiating a new context) have been introduced in EF6 resulting in the old caching provider not working correctly in these scenarios. Also dependency injection and Code-based Configuration introduced in EF6 simplify registering wrapping providers which was rather cumbersome (especially for Code First) in the previous versions. To fill the gap I created the Second Level Cache for EF…

View original post 1,278 more words