在 Hangman 中定义的 GameController 使用到一些属性 word,可以使用$this->word 的格式来读写这个属性,但实际上在 GameController 对应到这个属性的方法为 /** * @return string the word to be guessed. This value is persistent * during the whole game session. */ public function getWord() { return $this->
正如上篇文章所讲解的,OWIN 在 Web Server 与 Web Application 之间定义了一套规范(Specs),意在解耦 Web Server 与 Web Application,从而推进跨平台的实现。若要真正使用 OWIN 规范,那么必须要对他们进行实现。目前有两个产品实现了 OWIN 规范——一是由微软主导的 Katana,二是第三方的 Nowin。本文主要关注的还是 Katana,由微软团队主导,开源到 CodePlex 上。
什么是 OWINOWIN 是 Open Web Server Interface for .NET 的首字母缩写,他的定义如下:OWIN 在.NET Web Servers 与 Web Application 之间定义了一套标准接口,OWIN 的目标是用于解耦 Web Server 和 Web Application。基于此标准,鼓励开发者开发简单、灵活的模块,从而推进.NET Web Development 开源生态系统的发展。