简体   繁体   English

Silverlight 是否适合这些要求?

[英]Is Silverlight a good fit for these requirements?

I'm looking for a suitable client side architecture that will meet some or all of the following requirements.我正在寻找能够满足以下部分或全部要求的合适的客户端架构。

I'm thinking primarily about Silverlight (but I would also consider MVC or WPF depending on your suggestions - I can possibly trade some of these requirements off, or find work arounds).我主要考虑 Silverlight (但我也会考虑 MVC 或 WPF,具体取决于您的建议 - 我可能会放弃其中一些要求,或找到解决方法)。

I'm looking for an assessment of Silverlight being able to fully, partially or not able to support, each of the following, with detail around each if possible:我正在寻找对 Silverlight 是否能够完全、部分或无法支持以下各项的评估,并尽可能详细说明:

  • Must be able to reliably upload large (~100MB) binary files via WCF and MTOM必须能够通过 WCF 和 MTOM 可靠地上传大型 (~100MB) 二进制文件
  • Must be able to support file downloads, preferably in the background (ie through 'synching'), though this could simply be supported through a manual URL if necessary必须能够支持文件下载,最好是在后台(即通过“同步”),但如果需要,这可以通过手动 URL 简单地支持
  • Should have access to some form of local storage - this could be binary or XML for config purposes, but ideally some kind of database (not fussed which, as long as it is part of the install/app)应该可以访问某种形式的本地存储 - 这可以是二进制或 XML 用于配置目的,但理想情况下是某种数据库(只要它是安装/应用程序的一部分,就不要大惊小怪)
  • Should be able to dynamically configure itself depending on user profile.应该能够根据用户配置文件动态配置自身。 In other words, where a user logs in, the UI and services available are dynamically determined.换句话说,在用户登录的地方,可用的 UI 和服务是动态确定的。
  • Should support some form of client notification (sound and or tray bubble).应该支持某种形式的客户端通知(声音和/或托盘气泡)。 Ideally this would be supported via WCF duplex, but could be accomplished through polling.理想情况下,这将通过 WCF 双工来支持,但可以通过轮询来完成。
  • Ideally, should run on multiple platforms (Win / OSX)理想情况下,应该在多个平台上运行(Win / OSX)
  • Should be easily deployable - if I need to run Silverlight in full-trust mode / OOB - how do users get new versions?应该易于部署 - 如果我需要在完全信任模式/OOB 下运行 Silverlight - 用户如何获得新版本?
  • Should be minimisable to the system tray应该最小化到系统托盘

Any detail or thoughts you can give me on the above would be much appreciated.您可以就上述内容给我的任何细节或想法将不胜感激。

Edit - additional questions编辑 - 附加问题

  • Are there any limitations on local storage/access in Silverlight 5 OOB? Silverlight 5 OOB 中的本地存储/访问是否有任何限制? Or does it behave like a standard WinForms app?还是它的行为类似于标准的 WinForms 应用程序?
  • Is it possible to bundle SQL express with a Silverlight OOB.msi?是否可以将 SQL express 与 Silverlight OOB.msi 捆绑在一起?
  • What is the best option for dynamically configuring a Silverlight app?动态配置 Silverlight 应用程序的最佳选择是什么? I've seen MEF mentioned - is this the preferred approach or are there others?我见过提到 MEF - 这是首选方法还是有其他方法?

Must be able to reliably upload large (~100MB) binary files via WCF and MTOM必须能够通过 WCF 和 MTOM 可靠地上传大型 (~100MB) 二进制文件

Should work.应该管用。

Must be able to support file downloads, preferably in the background (ie through 'synching'), though this could simply be supported through a manual URL if necessary必须能够支持文件下载,最好是在后台(即通过“同步”),但如果需要,这可以通过手动 URL 简单地支持

Unless you are running OOB with elevated trust (or SL5 in browser elevated) and thus have limited access to the local file system, you would need to ensure sufficient space in Isolated Storage for the downloads.除非您在提升信任的情况下运行 OOB(或提升浏览器中的 SL5)并因此对本地文件系统的访问权限有限,否则您需要确保独立存储中有足够的空间用于下载。

Should have access to some form of local storage - this could be binary or XML for config purposes, but ideally some kind of database (not fussed which, as long as it is part of the install/app)应该可以访问某种形式的本地存储 - 这可以是二进制或 XML 用于配置目的,但理想情况下是某种数据库(只要它是安装/应用程序的一部分,就不要大惊小怪)

See above.看上面。 Regarding local database support there is an SQLite port for Windows Phone 7 which also works in Silverlight (I've recently tested it).关于本地数据库支持,Windows Phone 7 有一个 SQLite 端口,它也适用于 Silverlight(我最近测试过)。

Should support some form of client notification (sound and or tray bubble).应该支持某种形式的客户端通知(声音和/或托盘气泡)。 Ideally this would be supported via WCF duplex, but could be accomplished through polling.理想情况下,这将通过 WCF 双工来支持,但可以通过轮询来完成。

The notification can be done through Silverlight's Notification Window (supported from SL4 and up).可以通过 Silverlight 的 Notification Window(从 SL4 及更高版本支持)来完成通知。 The actual server side notification could be done through duplex channels or Kaazing WebSockets Gateway etc.实际的服务器端通知可以通过双工通道或 Kaazing WebSockets Gateway 等来完成。

Should be easily deployable - if I need to run Silverlight in full-trust mode / OOB - how do users get new versions?应该易于部署 - 如果我需要在完全信任模式/OOB 下运行 Silverlight - 用户如何获得新版本?

You can install an OOB Client along with the runtime with an MSI installer and still have the Silverlight standard update mechanism work for you (required Authenticode signed XAP).您可以使用 MSI 安装程序安装 OOB 客户端以及运行时,并且仍然可以使用 Silverlight 标准更新机制(需要 Authenticode 签名的 XAP)。 I've done just that a couple weeks ago.几周前我就这样做了。

Should be minimisable to the system tray应该最小化到系统托盘

AFAIK not possible in SL4. AFAIK 在 SL4 中是不可能的。 Not sure about SL5.不确定SL5。

All the points I have not quoted should work.我没有引用的所有观点都应该有效。

Having done some Silverlight development I often feel a bit restricted by the possibilities it offers.完成了一些 Silverlight 开发后,我经常感到受到它提供的可能性的限制。 In my opinion it is meant to be run within a browser, with a web-like interface.在我看来,它应该在浏览器中运行,具有类似网络的界面。 From what you describes it is more of a full app you want so I would recommend WPF and click-once deploy that handles updates automatically.根据您的描述,它更像是您想要的完整应用程序,因此我建议 WPF 并单击一次部署以自动处理更新。

From your requirements I would suggest WPF, full application support, but when it comes to OS X support, then you have a problem, WPF won't work on OS X, only Silverlight will, so I am afraid you have a few requirements that have conflicts with one another.根据您的要求,我建议 WPF,完整的应用程序支持,但是当涉及到 OS X 支持时,您就有问题了,WPF 在 OS X 上不起作用,只有 Silverlight彼此有冲突。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM