Ok, so this post sprung out of an idea that I have had in my head for a while. I know it will probably be solved better in ASP.NET v.Next, and can probably be solved in a bunch of other ways using only Web API or only MVC, but I wanted to see if I could use both to do it…
So what is IT? Well… In Web API, we have the ability to use content negotiation out of the box. Unfortunately, that content negotiation is, at least by default, based around serializing to XML or JSON. It doesn’t include all the view goodness that MVC has. There is no simple way to ask Web API to return a Razor view… So if I want to have content negotiation to handle both serialized data and views, we need to do some work…
On top of that, my solution would work nicely together with an existing MVC application, making it “easy” to add API features and content negotiation to the existing MVC URLs.
More...
In my last couple of posts, I have talked about OWIN. What it is, how it works, why it is interesting and so on. I have talked mostly about the hosting side of it, and a bit about how we can plug into the OWIN pipeline using what is called middleware… However, so far, the middleware has been ridiculously simple, and done very little, which isn’t really helpful I guess. And besides not doing very much interesting work, they have also not interacted very much with the request pipeline. Most of them, or maybe even all of them, have just terminated the pipeline and returned a simple response…
In this post, I want to take a look at how OWIN abstracts the server, and the request and response, and also how we can use this abstraction to extend the functionality of our pipeline.
More...
My last post about OWIN covered a little bit about the different hosting options, and then quite a bit about OWIN middleware. However, I found the hosting coverage to be a little weak, so I thought I would do one more, much shorter post, on just the different hosts available.
As mentioned before, there are 4 different OWIN hosts available from Microsoft. 3 from project Katana and one from project Helios.
Actually, there are 5. There is also a test host that can be used to test OWIN middleware in Unit tests etc in-memory, instead of having to open a port and listen for incoming requests…
The first, and simplest to get started with is the Katana self-host. But since we saw that being used in the last post, I will skip that one…
More...
Ok, so straying a bit away from the AngularJS posts I have been doing lately, I want to talk a bit about OWIN. Why? Well, I recently took a look at it, after putting it off WAY too long, and found it to be awesome! And the goal with this post is to explain what it is, why it is cool, and why Microsoft is putting it into ASP.NET MVC projects by default…
But let’s start with “what is OWIN”… Well, OWIN stands for “Open Web Interface for .NET” and you can find more about OWIN as such at http://owin.org/. And now that you are back from that site, you are probably not a whole lot more in tune with what OWIN is, and the reason for that is probably that the site contains very little information. And it contains that little information because OWIN _is_ really that small. It is just a definition of an interface used to decouple the web applications we build, from the servers that are hosting it…
More...