如何用简单的语言和用法解释 Katana 和 OWIN? [英] How to explain Katana and OWIN in simple words and uses?

查看:22
本文介绍了如何用简单的语言和用法解释 Katana 和 OWIN?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经阅读了很多关于 OWIN 和 Katana 项目的文章,但我无法了解它的全貌.

I have read many articles about the OWIN and Katana projects, but I could not get the whole picture of it.

对于使用 ASP.NET 的普通 Web 开发人员:

For a normal web developer who uses ASP.NET:

  1. OWIN 到底是什么以及它解决了什么问题(简单来说).它与 IIS 有什么关系?
  2. OWIN 会取代 IIS 吗?如果不是,OWIN 最适合什么情况?
  3. OWIN 如何帮助我完成日常工作项目?
  4. OWIN 如何帮助我进行自我提升项目?

推荐答案

关于上面的评论,OWIN 不是一个框架.OWIN 是关于应如何构建 Web 服务器和 Web 应用程序以将它们解耦并允许将 ASP.NET 应用程序移动到以前不支持的环境的规范.

Regarding the comment above, OWIN is not a framework. OWIN is a specification on how web servers and web applications should be built in order to decouple them and allow movement of ASP.NET applications to environments which were not supported before.

在 OWIN 之前,在构建 ASP.NET 应用程序时,由于对 System.Web 程序集的严重依赖,您天生就绑定到 IIS.

Prior to OWIN, when building ASP.NET application, you were inherently bound to IIS due to the heavy dependency on System.Web assembly.

System.Web 是自 ASP(非 .NET 版本)以来就存在的东西,并且内部包含许多您甚至可能不需要的东西(例如 Web 窗体或 URL 授权),它们通过default all 在每个请求上运行,从而消耗资源并使 ASP.NET 应用程序通常比 Node.js 等应用程序慢很多.

System.Web is something that has existed ever since ASP (non .NET version) and internally contains many things that you might not even need (such as Web Forms or URL Authorization), which by default all run on every request, thus consuming resources and making ASP.NET applications in general lot slower than its counterparts such as Node.js for example.

OWIN 本身没有任何工具、库或其他任何东西.这只是一个规范.

另一方面,Katana 是一个完全开发的框架,旨在在当前的 ASP.NET 框架和 OWIN 规范之间架起一座桥梁.目前,Katana 已成功将以下 ASP.NET 框架适配到 OWIN:

Katana on the other hand, is a fully developed framework made to make a bridge between current ASP.NET frameworks and OWIN specification. At the moment, Katana has successfully adapted the following ASP.NET frameworks to OWIN:

  • Web API
  • 信号 R

ASP.NET MVC 和 Web 窗体仍然只通过 System.Web 运行,从长远来看,也有计划将它们解耦.

ASP.NET MVC and Web Forms are still running exclusively via System.Web, and in the long run there is a plan to decouple those as well.

另一方面,IIS 是一个很好的、资源丰富的 Web 服务器主机.使用 IIS 的整个 ASP.NET 性能问题仅在 System.Web 中根深蒂固.直到最近,在决定如何托管 Web 服务器时,您有两个选择:

On the other hand, IIS is a good, resourceful host for web servers. Entire ASP.NET performance issues using IIS has deep roots in System.Web only. Up until the recent time, when deciding how will you host your web server, you had two options:

  • IIS
  • 自托管

因此,如果您想要表演,则可以选择自主持.如果您需要 IIS 提供的许多开箱即用的功能,您会选择 IIS,但会降低性能.

So if you wanted a performance, you'd go for a self-host option. If you wanted a lot of out-of-the-box features that IIS provides, you'd go for IIS but you'd lose on performance.

现在,有第三个选项,名为 Helios(当前代号),旨在移除 System.Web,并允许您以更更干净"的方式使用 IIS,无需任何不必要的库或模块.Helios 目前处于预发布版本,正在等待更多社区反馈以使其完全支持 Microsoft 产品.

Now, there is a 3rd option, a Microsoft library named Helios (current codename) which intends to remove System.Web out of the way, and allow you to use IIS on more "cleaner" way, without any unnecessary libraries or modules. Helios is now in pre-release version, and is waiting for more community feedback in order to make it fully supported Microsoft product.

希望这个解释能更好地为你澄清事情.

Hope this explanation clarifies things better for you.

编辑(2014 年 9 月):

随着 ASP.NET vNext 的开发,Katana 正在慢慢退役.3.0 版很可能是 Katana 作为独立框架的最后一个主要版本.

With ASP.NET vNext being in development, Katana is slowly getting retired. Version 3.0 will most likely be last major release of Katana as a standalone framework.

然而,Katana 引入的所有概念都被集成到 ASP.NET vNext 中,这意味着编程模型将几乎相同.引用自 论坛帖子,由 David Fowler(ASP 架构师.NET vNext):

However, all the concepts introduced with Katana are being integrated into ASP.NET vNext, meaning that programming model will be pretty much the same. Quote from forum post made by David Fowler (Architect of ASP.NET vNext):

vNext 是 Katana 的继承者(这就是它们看起来如此相似的原因).Katana 是脱离 System.Web 的开始Web 堆栈的模块化组件.您可以将 vNext 视为继续这项工作,但要走得更远(新 CLR、新项目系统,新的 http 抽象).

vNext is the successor to Katana (which is why they look so similar). Katana was the beginning of the break away from System.Web and to more modular components for the web stack. You can see vNext as a continuation of that work but going much further (new CLR, new Project System, new http abstractions).

今天 Katana 中存在的一切都将进入 vNext.

Everything that exists today in Katana will make it's way into vNext.

编辑(2015 年 2 月):

ASP.NET vNext 现在称为 ASP.NET 5,将建立在 .NET Core 5 之上..NET Core 5 是 .NET Framework 的轻量级分解版本,旨在支持 ASP.NET 5 和.NET 本机.但是,ASP.NET 5 也将得到 .NET Framework 4.6 的支持,它应该与 .NET Core 5 一起提供.ASP.NET 5 和 .NET Core 5 都将获得 MIT 许可,并将接受社区贡献.

ASP.NET vNext is now known as ASP.NET 5 and will be built on top of .NET Core 5. .NET Core 5 is lightweight factored version of .NET Framework, designed to support goals of ASP.NET 5 and .NET Native. However, ASP.NET 5 will be supported by .NET Framework 4.6 as well, that should become available together with .NET Core 5. Both ASP.NET 5 and .NET Core 5 will be licensed under MIT and will accept community contributions.

编辑(2015 年 5 月):

此外,ASP.NET Web API 品牌将停产,但其技术将成为新 ASP.NET MVC 6 的基础.以前的 ASP.NET MVC 版本是通过实现 IHttpHandler 构建的,IHttpHandler 是在 System 中定义的接口.网页.ASP.NET MVC 6 消除了这种依赖性,使其可移植到各种平台和 Web 服务器.

Additionally, ASP.NET Web API brand will be discontinued, however it's technology will be base for new ASP.NET MVC 6. Previous ASP.NET MVC versions were built by implementing IHttpHandler, an interface defined in System.Web. ASP.NET MVC 6 removes that dependency, making it portable to various platforms and web servers.

编辑(2016 年 5 月):

从计划即将发布的候选版本 2 开始,ASP.NET 5 将正式更名为 ASP.NET Core.同样适用于 Entity Framework 7,它将重命名为 Entity Framework Core.有关官方公告及其背后原因的更多信息可以在 Scott Hanselman 的博客文章中找到:ASP.NET 5 已死 - ASP.NET Core 1.0 和 .NET Core 1.0 简介

ASP.NET 5 will officially be renamed to ASP.NET Core starting with Release Candidate 2 that is scheduled to be released soon. Same will apply for Entity Framework 7 which will be renamed to Entity Framework Core. More information about official announcement and reasons behind it can be found on Scott Hanselman's blog post: ASP.NET 5 is dead - Introducing ASP.NET Core 1.0 and .NET Core 1.0

编辑(2016 年 5 月):

随着 Release Candidate 2 的发布,ASP.NET Core 已被修改,以便未来的 Web 应用程序实际上只是 .NET Core 控制台应用程序设置来处理传入的 HTTP 请求.这一概念使 ASP.NET Core 更加符合 Microsoft 所采用的微服务架构支持及其通过 Azure Service Fabric 实现的方法.可以在官方博客文章中找到更多信息:宣布 ASP.NET Core RC2

With the release of Release Candidate 2, ASP.NET Core has been modified so that future web apps are actually just .NET Core console apps setup to process incoming HTTP requests. This concept makes ASP.NET Core even more aligned with approach Microsoft has taken with microservices architecture support and its implementation through Azure Service Fabric. More information on can be found on official blog post: Announcing ASP.NET Core RC2

这篇关于如何用简单的语言和用法解释 Katana 和 OWIN?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆