Showing AJAX activity in a AngularJS application

  Showing some kind of AJAX busy indicator is a common thing in web applications. However it is something you don’t want to do with every AJAX start and end of request. First of all writing all that code would be quite tedious but more importantly the might be multiple overlapping requests ongoing at the same time. And in a case like that you only want to show the AJAX busy indicator at the first request and more importantly hide it only when the last of the requests has finished. Fortunately AngularJS has some nice integration points allowing us to … Continue reading Showing AJAX activity in a AngularJS application

On versioning WebAPI REST services

When you develop REST services you are going to run into the little matter of versioning, there is just no way to avoid it if you want to make any change to your REST service. Now there are lots of different ways to go about this and these different ways have their pro’s and con’s. What your version strategy is also depends on if your REST services are read-only or read-write with read-only services being somewhat simpler due to their smaller API surface. In these examples I am using the ASP.NET WebAPI but these same principles apply to REST services … Continue reading On versioning WebAPI REST services

Integrating the #WebAPI HttpClient and ApiController in a single test

In the two previous blog posts I showed how to unit test and ASP.NET WebAPI controller and how to unit test the client side code depending on the HttpClient class. Both unit tests are perfectly valid but as so often just adding unit tests can be deceptive. After all testing an ApiController by just calling the methods makes it perfectly possible to call them in such a way that would never be possible using a real HTTP request. So in order to complete out testing we should test the integration of the client and server parts using an integration test. … Continue reading Integrating the #WebAPI HttpClient and ApiController in a single test

Unit testing a ASP.NET WebAPI controller

  Update: If you are using the ASP.NET WebAPI 2 see the new post here.   One of he goals of the ASP.NET WebAPI is to make REST style API controllers more testable than more traditional WCF services where in the past. For the most part that is true but there are cases where an ApiController depends on the actual incoming request and its data and things can become a bit more difficult. Testing a simple ApiController that gets data Suppose we have the following ASP.NET WebAPI Controller with two Get methods, the first returns the complete list of books … Continue reading Unit testing a ASP.NET WebAPI controller

Using SignalR for real time data updates

In a previous post I showed how easy it is to create a simple chat application using SignalR. And chatting on the internet might be popular but as it turns out there are rather a lot of applications that need to do more than just chat. As it is there are a lot more CRUD style applications, where users edit data usually stored in a database for some purpose, than chat applications. So in this blog post I am using a simple CRUD, without the delete part, application to show the power of SignalR. Traditionally HTML based CRUD would generate … Continue reading Using SignalR for real time data updates

DotNed podcast: Matt Milner over REST, de ASP.NET Web API en meer

In deze podcast spreekt Maurice de Beijer met Matt Milner over zijn TechDays presentaties. Ze hebben het onder meer over REST service en waarom je die wil gebruiken ipv SOAP services. Daarnaast komt Windows Workflow Foundation aan bod en wat daar allemaal nieuw is. Verder spreken ze over Windows Azure en de Azure Service Bus. Links: TechDays presentaties: http://www.techdays.nl/SprekerDetail.aspx?cid=2229 Blog: http://mattmilner.com/blog/ Met dank aan onze sponsor RedGate.   Hij is hier te downloaden.   Enjoy!