简体   繁体   English

在网页(HTML)上具有与Windows窗体等效的丰富窗体控件的最佳机制

[英]Best mechanism to have rich form controls on web page (HTML) equivalent to windows forms

I am working towards porting a windows application to web. 我正在努力将Windows应用程序移植到Web。 The windows application is quite rich wrt the form controls, complex validations and user interactivity. Windows应用程序具有丰富的表单控件,复杂的验证和用户交互性。

Basic web forms are inadequate to meet these complexities. 基本的Web表单不足以满足这些复杂性。 So I would like to know the best way to still have the richness on the web pages. 因此,我想知道在网页上保持丰富性的最佳方法。 I have some ideas and would like comments. 我有一些想法,想发表评论。

  1. Use DHTML & Java Script to mimic complex controls. 使用DHTML和Java脚本模仿复杂的控件。 There are some macro controls available as part of jQueryUI that can be used and some other third party Java Script controls. 作为jQueryUI的一部分,可以使用一些宏控件,而其他一些第三方Java Script控件也可以使用。 I'd like suggestions if there is a recommended control library. 如果有推荐的控件库,我想提出建议。
  2. Use RIA (preferably Silverlight) wherever rich controls are needed. 在需要丰富控件的地方使用RIA(最好是Silverlight)。 I'd like to keep this as a last option because it mandates the Silverlight plug-in. 我想保留它作为最后的选择,因为它要求使用Silverlight插件。

What are other popular / preferred strategies? 还有哪些其他流行/首选策略?

I would suggest that you also check out the tools from DevExpress ( http://www.devexpress.com ). 我建议您也从DevExpress( http://www.devexpress.com )中检查工具。 I've used both Telerik and DevExpress and ended up going with just the DevExpress tools. 我同时使用了Telerik和DevExpress,最后只使用了DevExpress工具。 Both companies, however, are top-notch and both have tools that can really enhance your UI. 但是,两家公司都是一流的,并且都拥有可以真正增强UI的工具。

With that being said, I would strongly suggest that you avoid the temptation to just port your fat client UI to the Web. 话虽如此,我强烈建议您避免将胖客户端UI移植到Web的诱惑。 That is, if you are just looking for web controls to take the place of your current Windows controls but otherwise leave the UI intact, you are likely to be disappointed. 也就是说,如果您只是想使用Web控件来代替当前的Windows控件,但又不影响UI的话,您可能会感到失望。 The web is a different kind of animal and people expect to use it differently. 网络是另一种动物,人们期望使用不同的网络。 With Ajax, JQuery and the various specialty tools from a company like DevExpress or Telerik you can do amazing things on the web that are the equal of anything you may have done in your current fat client interface but they will be done differently. 借助Ajax,JQuery和DevExpress或Telerik等公司的各种专业工具,您可以在网络上完成惊人的工作,这些工作与您在当前胖客户端界面中可能执行的操作相同,但它们的执行方式将有所不同。

Reasons for this advice? 提出建议的原因? First, in my experience Windows UIs migrated to the web feel clumsy and inappropriate. 首先,以我的经验,迁移到Web的Windows UI显得笨拙且不合适。 The controls aren't the only thing that changes - the entire windowing and content flow models are different. 控件不是唯一更改的控件-整个窗口和内容流模型是不同的。

Second, if you are deploying to organizations outside of your own, you are likely to find that there is significant resistance to using any kind of plug-in - including Silverlight. 其次,如果您要部署到自己之外的组织中,则可能会发现使用任何类型的插件(包括Silverlight)存在很大的阻力。 We win business all the time because we've stayed pure web. 我们一直保持纯网络状态,因此始终赢得业务。

Third, to the extent that you try to build web apps while not really learning web development ethics and methods, you'll just slow down your eventual evolution to true web development experts. 第三,如果您在尝试构建Web应用程序时并未真正学习Web开发的道德和方法,那么您将最终发展为真正的Web开发专家的速度放慢了。

Anyway - that's my $0.02. 无论如何-那是我的$ 0.02。

If you don't mind a departure from .NET "controls", I'd try Ext JS . 如果您不介意偏离.NET“控件”,则可以尝试Ext JS It is dual licensed GPL/Commercial so you'll likely have to pay for it, but the components are more robust than Telerik or the other .NET versions. 它是GPL / Commercial双重许可的,因此您可能需要付费,但是这些组件比Telerik或其他.NET版本更强大。

We have had a lot of success with the Telerik controls for ASP.NET. 我们使用ASP.NET的Telerik控件取得了很多成功。

http://www.telerik.com/products/aspnet-ajax.aspx http://www.telerik.com/products/aspnet-ajax.aspx

They also have a suite of Silverlight controls. 他们也有一套Silverlight控件。

http://www.telerik.com/products/silverlight.aspx http://www.telerik.com/products/silverlight.aspx

And for ASP.NET MVC. 对于ASP.NET MVC。

http://www.telerik.com/products/aspnet-mvc.aspx http://www.telerik.com/products/aspnet-mvc.aspx

They are very easy to use and richly featured. 它们非常易于使用且功能丰富。 The demos on their site should give you a good feel for the capabilities. 他们网站上的演示应使您对这些功能有良好的感觉。

There was an article on Codeproject which covered converting Winforms to ASP.NET Codeproject上有一篇文章,内容涉及将Winforms转换为ASP.NET

Hope this helps. 希望这可以帮助。

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

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