Testing Versioned API’s in ASP.Net Web API

I recently wrote about a framework for Versioning ASP.Net Web API. Continuing on the theme of versioning API’s, I researched how to test the different versions of a Web API, both for unit tests and SpecFlow acceptance tests. Overview As a quick review, the SDammann.WebApi.Versioning package was used for versioning the API and provides methods for selecting the controller that is active for a particular version of the API. At the code level the controller is selected by the name space of the particular version of the controller, e.

Versioning ASP.Net Web API

One of the important things to consider when building an API is a strategy for versioning the API to manage changes. There are several reasons this is important: To support users (developers) of the API that are using an existing version so as not to force breaking changes on them. To prevent breaking existing versions of the client applications that are using an existing version of the API. Previous versions of the API will normally be maintained for either a period to allow developers and client applications to upgrade or indefinitely.

Using SpecFlow to Test the ASP.Net Web API

I previously wrote about the use of SpecFlow in an ASP.Net MVC application with the SimpleBrowser library. I’ve recently been building a project to utilize the ASP.Net Web API to study the best practices of building a “RESTful” API for an application to save research notes and links about multiple projects. Approach Since the Web API is intended to be utilized by a number of types of client applications that support the HTTP protocol (smart phones, tablets, desktop applications, as well as browsers), it is convenient to use a library that is well-suited to use the HTTP verbs used by the Web API.

Hanselminutes Podcast: On Empathy with Leon Gersing the Ruby Buddha

Scott Hanselman recently published a really great podcast on his always-good Hanselminutes show, “On Empathy with Leon Gersing the Ruby Buddha”. They discuss how important it is to maintain empathy when dealing with others on the Internet as well as in real life, and the importance of keeping a direct connection to your end customers and colleagues in your community. It is a good listen for anyone in the software industry.

Using SimpleBrowser with SpecFlow for BDD with ASP.NET MVC

The SpecFlow project provides a useful way to integrate BDD (Behavior Driven Development) testing into .NET projects using the Gherkin language. The main idea is that the project specs or user stories are written in user language and then are linked to actual tests that are automatically executed as the project is developed. There are several possible ways to implement this with ASP.NET MVC to automate the testing with the browser.

JQuery UI Autocomplete and MVC3 Remote Validation Conflict–Update

I previously posted about a fix to a problem when the JQuery UI Autocomplete doesn’t play well with the ASP.Net MVC3 Remote validation. Part of the solution included a way to ensure that the remote validation isn’t fired for each key click or change of focus in the text box. The method for doing this is to change the settings of the validation to not fire onkeyup or onfocusout, but to get there the validator settings must be obtained from the form in question.

Remembering Steve Jobs

Steve brought a lot of greatness to the world. I remember buying my first Apple computer back in early ‘82. It was an Apple II-Plus and I remember how cool it was that it did color graphics with a TV output. My brother and I were playing the Swashbuckler game right after we got it out of the box. It was also fun and easy to program in Applesoft Basic. Then along came the Apple IIc which was small and easy to haul around, although it wasn’t a true laptop.

JQuery UI Autocomplete and MVC3 Remote Validation Conflict

On a recent project I had a great deal of trouble to get JQuery UI Autocomplete and ASP.Net MVC3 Remote Validation to play nicely with each other. The goal was to have a type-in for selecting a city for a search in which the pull-down would auto-complete based on the available cities in the database: Once a city is selected from the autocomplete it should do a validation as to whether the city is populated with actual data in the database (in case the user types in an invalid city:

Clipboard Printer App

Sometimes you might want to print a small section from an email that has 30-embedded replies or just a snippet of code from that big class file. The Clipboard Printer Windows app makes it easy to do by copying what you want to print into the clipboard (CTL-C or right-mouse “Copy”) and then print it to your printer. I built this small app for this purpose a couple of years ago and thought I’d share it here in case someone else needed to use it.

User Initialization in Code First/Altairis

In a previous post I showed how Entity Framework Code First ORM could be integrated with the Altairis Web Security simple membership provider to create a simple way to add a membership provider with an application using the EF 4.1 framework. One of the issues is that when the database is regenerated during development the users would have to be manually re-registered. This is a hassle if you want to create an initial admin account or user account for testing.