简体   繁体   English

Silverlight是否可以代替MVC项目中的复杂Web UI的Javascript?

[英]Silverlight as Javascript replacement for complex Web UI in MVC project?

How practical would it be to use Silverlight inside of an MVC view to achieve a GUI that's rather complex with Javascript (and crippling to non-usable without Javascript)? 在MVC视图中使用Silverlight来实现使用JavaScript相当复杂的GUI(并且如果没有 Javascript则无法使用)会变得多么实用?

I know nothing about Silverlight so if this seems like a good idea, how difficult would it be to do so, or vice-versa? 我对Silverlight一无所知,所以如果这看起来是个好主意,那么这样做会有多困难,反之亦然? Would asking users to install a plugin outweigh the differences in browser rendering of Javascript heavy UIs? 会要求用户安装插件超过在Javascript重的用户界面的浏览器渲染的区别是什么?

Tid bit more info: Although some would question the complexity of this View since it is virtually undo-able without Javascript, it's not that it's a complex page. 提示更多信息:尽管由于没有 Javascript几乎无法撤消该视图的复杂性,但有些人会对此表示怀疑,但这并不是说它是一个复杂的页面。 It's a GUI that requires large selection lists and dynamic adding/removing. 这是一个需要大量选择列表和动态添加/删除的GUI。 For example, the main list a user could choose from could easily grow to a size of 1000+ - something that is almost impossible to navigate without a search/easily navigable option. 例如,用户可以从中选择的主列表可以轻松地增长到1000+的大小-如果没有搜索/易于导航的选项,几乎是不可能导航的。 This is also something that needs to be a quick performable process by the user. 这也是用户需要快速执行的过程。 For example, they select a variable number of items from a main list and then add a dynamic number of subitems to those items. 例如,他们从主列表中选择可变数量的项目,然后向这些项目添加动态数量的子项目。 Thus, spreading this out over multiple pages (for non javascript enabled users) would be extremely detrimental. 因此,在多页(对于非启用JavaScript的用户)散布了这一点,将是极其有害的。

In my opinion there is not a clear answer to this question. 我认为这个问题尚无明确答案。 It depends on many factors. 这取决于许多因素。

  1. Who your user base is? 您的用户群是谁? Is it small, or large? 是小还是大? Do you target for a specialized audience, who won't care to install plugins to get your service? 您是否针对专业受众,他们不愿意安装插件来获得服务? In this case Silverlight may be better as it could allow a richer and smoother experience. 在这种情况下,Silverlight可能会更好,因为它可以带来更丰富,更流畅的体验。
  2. Or are you targeting a larger audience, who will use various technologies where the plugin may be unavailable or not so easy to obtain and install (linux, mobile...) ? 或者,您是针对更大的受众群体,他们将使用各种技术,这些技术可能无法使用或不太容易获得和安装(Linux,移动...)? In this case JS may be better. 在这种情况下,JS可能更好。
  3. What are the development times? 什么时候发展? In silverlight you may save development time (especially on testing, as the plugin is only one, comparing to several different browsers and their versions), but you may need to learn things, and unforseeable problems may arise. 在Silverlight中,您可以节省开发时间(尤其是在测试中,因为与几种不同的浏览器及其版本相比,该插件仅为一个),但是您可能需要学习一些知识,并且可能会出现不可预见的问题。
  4. Do you have the tools to build silverlight? 您是否拥有构建Silverlight的工具? You need Blend and VS2008 to use it effectively. 您需要Blend和VS2008才能有效使用它。

You may also consider the use of JS framework like YUI instead of creating the UI from scratch. 您也可以考虑使用像YUI这样的JS框架,而不是从头开始创建UI。 YUI is very powerful, but there are several other alternatives to it. YUI非常强大,但是还有其他几种选择。

Take a look at jqGrid , it sounds like it has the features that you need. 看一下jqGrid ,听起来它具有所需的功能。 Not that I'm sure, and maybe you know about it, but still. 不能肯定,也许您知道,但是仍然可以。

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

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