WPF 浏览器应用程序可以用作 ASP.NET 的替代品吗?
我不明白 WPF 浏览器应用程序的用途。 它只是通过浏览器提供信息的另一种方式,还是不打算用于外部部署?
I don't understand the purpose of the WPF browser appliction. Is it simply another way of serving information through a browser, or is it not intended to be used for external deployment?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
WPF 浏览器应用程序允许您使用 Windows 开发人员工具集中可能已有的编码语言,创建非常丰富的、可通过 Web 部署的应用程序风格 UI。 缺点是用户必须安装 .net,并使用 IE 访问该应用程序,这大大限制了受众的规模和范围。 WPF 浏览器应用程序与 Java 应用程序非常相似,因为它们都在客户端的虚拟机中运行。 由于它运行在客户端,因此所有数据访问以及与服务器的通信都必须通过 WCF 或 Web 服务完成。
使用 ASP.NET,您可以获得更多的跨浏览器兼容性和支持,使您能够接触到更多的受众,但学习新库和 ASP.NET 编程模型可能会带来负面影响。 ASP.NET还提供了丰富的数据访问模型和数据控制支持。 Silverlight 是另一个基于 .NET 和 WPF 的有趣选项,因为它受到多种浏览器的支持,并提供类似的丰富的用户界面体验。 它也可以在浏览器之外运行,必要时可以断开连接。
** 根据评论请求更新 ***
脱离浏览器的 Silverlight 的一大优势是,您可以获得大部分丰富的 Windows 应用程序风格功能,以及可部署的 Web 模型和小型安装 (4-6MB)。 Silverlight 还支持自动更新功能,如果您拥有大量用户群,该功能非常好。
微软的官方描述(宣传:))这里
Silverlight Out Of Browser
使用户能够通过桌面和开始菜单上的链接将他们喜爱的 Silverlight 应用程序直接放置到他们的 PC 和 Mac 上,而无需下载额外的运行时或浏览器插件。 此外,新的体验使 Silverlight 应用程序能够在计算机是否连接到 Internet 的情况下运行,这是对传统 Web 体验的根本性改进。 特点包括:
安全可靠。 利用 .NET Framework 的安全功能,Silverlight 应用程序在具有持久隔离存储的安全沙箱内运行。 这些应用程序与传统 Web 应用程序具有大部分相同的安全限制,因此无需安全警告或提示即可信任,从而最大限度地减少用户中断。
安装顺利。 由于 Silverlight 应用程序存储在本地缓存中,并且不需要额外的权限即可运行,因此安装过程快速高效。
自动更新。 启动后,Silverlight 应用程序可以检查服务器上的新版本,如果找到则自动更新。
互联网连接检测。 Silverlight 应用程序现在可以检测它们是否具有 Internet 连接,并可以做出智能反应,包括缓存用户的数据,直到连接恢复为止。
WPF Browser applications allow you to create very rich, application style UI's deployable via the web, using coding languages windows developers already likely have in their toolset. The downsides are that the users must must have .net installed, and use IE to access the application, considerably limiting the size and scope of your audience. WPF browser applications are very similar to Java applications in that they run in a virtual machine on the client. As it runs on the client, all data access and communication with the server must be done through WCF or web services.
With ASP.NET you have considerably more cross browser compatibility and support, giving you access to a much larger audience, with the possible downside of learning new libraries and the ASP.NET programming model. ASP.NET also provides a rich data access model and data control support. Silverlight is another interesting option based on .NET and WPF, as it is supported by a wide variety of browsers and provides similar rich user interface experiences. It can als be run out of the browser, disconnected if neccesary.
** Update based on Comment Request ***
The big advantage to Silverlight out of browser, is that you get most of the Rich, windows application style functionality, with a web deployable model and tiny install (4-6MB). Silverlight also supports an auto update feature which is VERY nice if you have a large user base.
Microsoft's Official description (propaganda :) )here
Silverlight Out Of Browser
Enables users to place their favorite Silverlight applications directly onto their PC and Mac, with links on the desktop and start menu—all without the need to download an additional runtime or browser plug-in. Further, the new experience enables Silverlight applications to work whether the computer is connected to the Internet or not—a radical improvement to the traditional Web experience. Features include:
Safe and secure. Leveraging the security features of the .NET Framework, Silverlight applications run inside a secure sandbox with persistent isolated storage. These applications have most of the same security restrictions as traditional web apps and so can be trusted without security warnings or prompts, minimizing user interruptions.
Smooth installation. Because Silverlight applications are stored in a local cache and do not require extra privileges to run, the installation process is quick and efficient.
Auto-update. Upon launch, Silverlight applications can check for new versions on the server, and automatically update if one is found.
Internet connectivity detection. Silverlight applications can now detect whether they have Internet connectivity and can react intelligently including caching a users’ data until their connection is restored.
WPF 浏览器应用程序是一种客户端技术,而不是服务器端的 ASP(.NET)。 它绝对不是为了取代它。
使用 WPF 浏览器应用程序可以在浏览器内提供丰富的客户端。 但是,这仅在安装整个 .NET 框架时才有效。 另一种类似的技术是Silverlight,它使用非常小的(安装程序大约5-6 MiB)框架,并且可用于多个平台。 它包括 .NET 框架的一小部分。
考虑到上述需求,您可以在外部部署中使用它。
A WPF browser application is a client side technology, rather than ASP(.NET) which is server-side. It is definitely not meant to replace it.
Using a WPF browser application one can provide a rich client inside the browser. However, this will only work when the whole .NET framework is installed. Another similar technology is Silverlight, which uses a very small (the installer about 5-6 MiB) framework, and is available to multiple platforms. It includes a small subset of .NET framework.
You can use it in external deployment considering the above requirements.
上述所选评论的以下部分是错误的:
浏览器中的 WPF(又名 XBAP)仅适用于 FireFox (Mozilla) 和 Google Chrome。 大约两年前确实如此,但今天却不然。
The following portion of the above selected comment is wrong:
WPF in the browser (aka XBAP) is works just from FireFox (Mozilla) and Google Chrome. It was true about 2 years ago, but not today.
如果您正在寻找的话,您可以在 silverlight 中使用 XAML。
另外,RIA 应用程序模板使开发变得非常整洁。
You could use XAML in silverlight, if thats what you are looking for.
Plus the RIA Application templates makes development quite neat.