简体   繁体   English

是否可以使用Silverlight制作真正的跨平台应用程序?

[英]Is it possible to make real cross platform applications with Silverlight?

I really wanna do cross platform applications. 我真的想跨平台应用程序。 I have great experience in .NET, so the only option is Silverlight. 我在.NET方面有丰富的经验,所以唯一的选择是Silverlight。 But it's not as powerful as WPF (yet). 但这还不如WPF强大。

Is it possible to use WPF's controls like Menu & ToolBar? 是否可以使用WPF的菜单和工具栏控件?

Is it possible to make real installers for Silverlight apps? 是否可以为Silverlight应用制作真实的安装程序? (Not just out of browser install.) (不仅限于浏览器安装。)

Is it really worth it, or should I just use Qt? 真的值得吗,还是我应该只使用Qt?

Thank you 谢谢

If you want to do the whole write-once-deploy-everywhere deal, STOP . 如果您想在各处进行一次一次性写入部署,请停止 I can't think of a single application that looks natively-written that was done in any cross-platform environment (Java being the canonical example). 我想不出在任何跨平台环境(Java是规范示例)中完成的本机编写的单个应用程序。 There are enough differences in the idioms among Windows, OSX, and the myriad window managers for *nix that trying to write one application that can look acceptable on all of them is a fool's errand, IMO. Windows,OSX和* nix的无数窗口管理器之间的习惯用法之间存在足够的差异,试图编写一个在所有应用程序上都可以接受的应用程序是一个愚蠢的错误,即IMO。

Learn to use the tools for your platform; 学习使用适合您平台的工具; if you partition your application correctly, your business logic should be fairly portable. 如果您正确地划分了应用程序,则您的业务逻辑应该是可移植的。

At this point, a Silverlight application is as "cross-platform" as any other web based technology. 在这一点上,Silverlight应用程序与任何其他基于Web的技术一样具有“跨平台”的功能。 You can build an application in Silverlight that will work on different platforms ONLY if the Silverlight plug-In is implemented for the platform's slew of browsers. 您只能在Silverlight中构建一个应用程序,该应用程序仅在为平台的大量浏览器实现了Silverlight插件的情况下才能在不同平台上运行。 The cross-platform magic of Silverlight is just it being accessible on the web. Silverlight的跨平台魔术就是可以在Web上访问它。

Editorial: Remember that Silverlight is just a response from Microsoft to Flash. 社论:请记住,Silverlight只是Microsoft对Flash的回应。 They are trying to leverage the skills of existing .NET developers and give them the ability to deliver a much more rich user experience that was routinely delivered using Flash. 他们正在尝试利用现有.NET开发人员的技能,并使他们能够提供通常使用Flash提供的更加丰富的用户体验。 Silverlight is a subset of WPF which "makes it less powerful" but WPF is specifically a Windows technology anyway that is simply exposed in web apps through Silverlight's implementation. Silverlight是WPF的子集,它“使其功能不那么强大”,但是WPF特别是Windows技术,通过Silverlight的实现可以在Web应用程序中简单地公开。

Silverlight is a great option for a number of reasons: 出于多种原因,Silverlight是一个不错的选择:

  • Cross browser 跨浏览器
  • Cross platform 跨平台
  • Small plugin download required 需要下载小插件
  • More extensive toolkit than WPF + third party controls 比WPF +第三方控件更广泛的工具包
  • Lots of activity online (demos, tutorials, training) as well as a good selection of books available 在线上有很多活动(演示,教程,培训)以及大量书籍可供选择

Also, you can find a good reference example of creating an installer for Silverlight here: 另外,您可以在此处找到为Silverlight创建安装程序的良好参考示例:

http://amazedsaint.blogspot.com/2010/05/how-to-create-offline-installer-no.html http://amazedsaint.blogspot.com/2010/05/how-to-create-offline-installer-no.html

Just keep in mind some things will break cross-platform, like using com interop, but as long as you avoid those you should be able to accomplish what you're looking for with Silverlight. 请记住,有些事情会破坏跨平台,例如使用com interop,但是只要避免这些事情,您就应该能够使用Silverlight完成所需的工作。

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

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