4

When ASP.NET MVC came, Microsoft announced many times in many places that it wasn't supposed to replace ASP.NET Web Forms. In other words, it's just another technology that you might find useful, or you might use Web Forms in other scenarios.

However, as companies enter into the market, they can't have a jungle of technologies, because that's too expensive. They usually select a mature technology, stick to it, build on it and extend it and reuse elements in it to reduce costs.

Now we're trying to decide to move to Owin/Katana from Web API. We just wonder if it's OK that we move 100% to Owin?

The reason I'm asking this question is because we've created a very rich codebase for Web API, including streaming, compression, authentication, normalization of UGC, support of I18N & L10N, and more.

If we want to move to Owin, we need to re-create these facilities/utilities again for Owin, because its architecture is different from Web API.

We want to move to Owin, because it's faster, lighter, self-hosted server, and seems to be the future of service technologies from Microsoft.

Is it safe for us to move to Owin completely and imagine a future in which all of our services are delivered through Owin, and we discontinue using Web API?

Reza NA
  • 75
  • 8

1 Answers1

5

OWIN is just a specification, nothing more. It describes a common interface that servers and applications can both use, so that applications don't need to be tightly coupled to servers.

Katana was the first step towards decoupling ASP.NET from IIS. Work on Katana has stopped now, according to the official roadmap. The ideas and technologies developed for Katana have made their way into the next version of ASP.NET (ASP.NET Core).

It rarely makes sense to build applications on top of OWIN itself, because you're operating at the lowest level of abstraction above HTTP (literally dealing with raw requests and responses). That's usually only necessary if you are building middleware components that need low-level access.

In other words: you shouldn't rebuild your application on OWIN, because you'd be spending a lot of time reinventing all of the stuff already in ASP.NET.

ASP.NET Core is the next evolution of ASP.NET and Web API. It has all the things you mentioned: it's fast, lightweight, and can self-host. If you need to rebuild your architecture, do it on ASP.NET Core.

Nate Barbettini
  • 51,256
  • 26
  • 134
  • 147
  • More details about ASP.NET Core and OWIN in my answer here: [Does ASP.NET Core still use OWIN?](http://stackoverflow.com/questions/38713134/does-asp-net-core-still-use-owin). – Nate Barbettini Aug 06 '16 at 04:57
  • 1
    Can you refer us to a valid link that says *Katana is deprectated*? – Saeed Neamati Aug 06 '16 at 05:00
  • 1
    @SaeedNeamati Sure, edited my answer with more info about Katana. See the official roadmap here (work stopped after v3): https://katanaproject.codeplex.com/wikipage?title=roadmap&referringTitle=Home – Nate Barbettini Aug 06 '16 at 05:05
  • Truly thank you for the link. As much as I understood, it's not deprecated, it's just moved to become a part of a bigger project. Am I right? – Saeed Neamati Aug 06 '16 at 05:14
  • @SaeedNeamati That's fair. No one is working on it anymore, and it won't have any new versions. (Because everyone moved over to working on ASP.NET Core) – Nate Barbettini Aug 06 '16 at 05:26
  • 1
    I believe this answer missed a simple piece of fact, https://blogs.msdn.microsoft.com/webdev/2014/11/14/katana-asp-net-5-and-bridging-the-gap/, that explains the gaps. ASP.NET Core's pipeline/middleware design is similar to OWIN, but not exactly the same. My personal opinion is that ASP.NET team started from OWIN but OWIN could not meet all the requirements. That should explain why Katana and Helios (another side project) were dropped at last in favor of the final design. – Lex Li Aug 06 '16 at 09:10
  • 1
    @LexLi What's the answer missing? I wasn't claiming that ASP.NET Core and OWIN are the same (I agree that they're not). I think it makes more sense to build a new application on ASP.NET Core, not on OWIN, although you *could* do either. – Nate Barbettini Aug 06 '16 at 14:55