This project has moved and is read-only. For the latest updates, please go here.

Katana and WebApi - where they stand in the relation to each other?

Jun 4, 2013 at 1:23 AM
Edited Jun 4, 2013 at 1:24 AM
I see there is some overlap - WebApi can be hosted in Katana host, but it has a self host, while Katana has a series of hosts on its own. Is there any benefit to host WebApi in Katana project? Or, if I don't need pages but need WebApi only, does it make sense to use Katana?
Jun 4, 2013 at 4:20 AM
There are lots of ways to use OWIN/Katana with frameworks like WebAPI, each with their own advantages.

Side-by-Side on IIS: Use MapOwinRoute to register an OWIN route side by side with other routes in IIS. Works well adding new OWIN components to existing apps.

Integrated Pipeline on IIS: OWIN middleware can be registered to run during integrated pipeline stages so that requests can pass through them and still be routed to non-OWIN compatible frameworks (MVC).

Self-host: Most frameworks like WebAPI have their own self-host, but these don't play well together. Using OWIN you can build a self-host app using multiple frameworks. You can also insert custom middleware between the server and the framework. Self-host also has much lower memory usage and higher throughput if these things are critical to you.