Client side support with the ASP.NET Web API

With REST there is not a lot required on the client as far as sending requests goes. As long as you can send HTTP GET requests you are good to go and there are very few programming stacks that don’t allow for some form of doing that. Of course just doing an HTTP GET is going to give you some data back and you still have to understand that data but that is an application specific issue. In order to make life even easier the ASP.NET Web API adds some client support in the form of the HttpClient class. But … Continue reading Client side support with the ASP.NET Web API

Updating data with the ASP.NET Web API

  In the previous blog post I demonstrated how to get started with the ASP.NET Web API and retrieve some products data from the Northwind database. Something that was really easy to do But quite often we want to update data just as much as we want to retrieve it.   A quick recap of REST and HTTP methods used. The convention for REST service as defined by Roy Fielding is to use different HTTP methods to signify our intent with the HTTP request. The HTTP GET method, by far the most commonly used one on the internet, is used … Continue reading Updating data with the ASP.NET Web API

Getting started with the ASP.NET Web API

Some time ago I did a number of blog posts about the beta versions of the WCF Web API. As it turns out the WCF Web API team has moved into the ASP.NET team, a good thing as far as I am concerned, and as a result it is now called ASP.NET Web API. Now this is much more that just a name change. For starters there is very little of the WCF bits still involved, in fact when you use ASP.NET as a host none at all. As a result it takes on quite a few characteristics of ASP.NET … Continue reading Getting started with the ASP.NET Web API

Controlling when the value is updated with Knockout.js

In the previous blog post about Knockout.js I showed why and how to get started with Knockout.js. And I explained that the reason I really like Knockout.js is that it is a very familiar way of working with its MVVM style. I created a small demo where we could update the first and last name of a person and the ViewModel would combine the two and display the concatenated parts as the complete name. This worked just fine as soon as I started using observables except for one thing. Whenever I start typing the full name isn’t updated until the … Continue reading Controlling when the value is updated with Knockout.js

Deploying SqlServerCe with an ASP.NET MVC application

Using Entity Framework Code First together with SqlServerCe is a great way to work with small databases in ASP.NET MVC applications. I have several web applications running on shared hosting sites where SqlServerCe is the database engine under the hood. Deploying is also quite easy. I typically use the build in Publish Web option which works great over FTP.   When using SqlServerCe you have to make sure you add the deployable dependencies. Forgetting those results in pretty clear error messages.   However once that is done I always run into another issue. When a page actually tries to use … Continue reading Deploying SqlServerCe with an ASP.NET MVC application

HTML5, Google Chrome Frame and older browsers

Consider the following problem: You might be tempted to start working with HTML5 features in your web applications but you have to support older bowsers.   So for many HTML5 features there are polyfills available that will let you make older browsers like Internet Explorer 7 or 8 work with the newer API. See a possible list of HTML5 polyfills here. However a number of these is JavaScript based and while that works in older browsers their JavaScript engine is often quite slow as well making it hard to work with.   But how about just upgrading the complete browser? … Continue reading HTML5, Google Chrome Frame and older browsers

HTML5 and Cross-Origin Resource Sharing call

Services are becoming more important with richer HTML5 style applications. But by default the browser will let you call into a service on the originating domain but not another one. And that means you have to include all your services one the same domain, not very practical. And worse if you want to use a 3rd part service you can’t call this directly from the your JavaScript code. A technique that has been used for quite some time to solve this problem is JSONP. Basically when you are doing a JSONP style call the request is done by adding a … Continue reading HTML5 and Cross-Origin Resource Sharing call