对于 ASP.NET MVC 中的高流量、复杂表单有哪些技巧?

发布于 2024-09-26 00:55:26 字数 402 浏览 0 评论 0原文

我们目前有一个 WinForms 应用程序,我们希望慢慢地将其迁移到 Web 应用程序。

一个屏幕是一个使用 DataWindow 的考勤表输入系统,速度非常慢且容易出错。 无论如何,考勤表屏幕有五个实时保存的部分。完成的时间表需要其中 2-5 个部分。

目前,系统运行缓慢。我们的一些远程办公室几乎没有 frac-T1。

因此,我想使用 ASP.NET MVC2 重新设计该屏幕,甚至提供一些增强功能,例如自动完成(目前缺少)等。

任何关于我知道的表单最佳实践的建议都会很高-容量并在可能较慢的网络上运行?

目前,存在大量往返流量,因为时间表的每个部分在跳出字段时都会保存。我想避免这种情况,但我承认部分保存很酷。

如有任何建议或提示,我们将不胜感激。

谢谢

We currently have a WinForms application that we want to slowly migrate to a web application.

One screen is a time sheet entry system that uses DataWindow and is very slow and buggy.
Anyway, the time sheet screen has five sections that are saved in real time. A finished time sheet needs 2-5 of these sections.

Currently, the system runs SLOW. Some of our remote offices barely have a frac-T1.

So I want to redesign that screen using ASP.NET MVC2 and even provide some enhancements like autocomplete (which it currently lacks), etc.

Any suggestions on best practices for a form that I KNOW will be high-volume AND run on possible slow networks?

Currently, there is a lot of round-trip traffic because each section of the time sheet saves when they tab out of a field. I would like to avoid this but I do admit the partial saves are cool.

Any suggestions or tips are appreciated.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

往昔成烟 2024-10-03 00:55:26

这是一个很难给出明确答案的问题——无论你采取哪种选择,都将面临权衡和妥协。

我个人建议 OOB Silverlight 4 + WCF。

您一次性下载了 Silverlight 应用程序1,但一旦他们安装了该应用程序,您应该拥有的唯一流量就是发送到网络服务或从网络服务发送的数据和消息。将流量减少为纯数据+消息并消除 HTML 将大大减少拥塞。

您可以使用 ASP.Net 或 ASP.NET MVC 中的 AJAX,但每次用户想要填写时间表时,您仍然需要下载页面。 AJAX 也可能有点麻烦,尤其是在提供自动完成等功能时。使用 ASP.NET/MVC 时,获得一个好用的 UI 也可能相当困难,使用 SL,您会发现模拟当前 Winforms 应用程序的 UI 功能更容易。根据我的经验,在 Silverlight 中开发丰富的 Web 应用程序比 ASP.NET 快得多。

无论如何,最好使用这两种技术编写一些演示,并运行它们以准确了解它们在最差的办公室中的表现,这将是确定哪种技术最好的唯一方法。

1 使用 SL4 可以减少下载 Silverlight 应用程序的流量,使应用程序成为浏览器外应用程序,将 XAP 文件发送给用户并使用 sllauncher。 exe 来安装它(这对系统管理员来说是面包和黄油的东西)。这确实使更新 SL 应用程序变得更加困难,但您可以在网络流量特别差的办公室中这样做。

This is a tough one to give a definitive answer for - whichever option you take there will be trade-offs and compromises.

Personally I would suggest OOB Silverlight 4 + WCF.

You get the one-off hit of downloading the Silverlight app1, but once they have that installed the only traffic you should have is the data and messages sent to/from the web services. Cutting traffic down to just pure data+messages and eliminating the HTML will reduce congestion a lot.

You could use AJAX from ASP.Net or ASP.NET MVC, but you still have the hit of downloading the page each time the user wants to fill out a time sheet. AJAX can also be a little chatty, especially when it comes to providing functionality like autocomplete. It can also be considerably more difficult to get a nice to use UI when using ASP.NET/MVC, with SL you will find it easier to emulate the UI functionality of the current Winforms app. And in my experience development of rich web apps is considerably faster in Silverlight than ASP.NET.

In any case, it may be best if you code up some demos using both technologies, and run them to see exactly how they perform in the worst offices, that will be the only way to know for sure which is best.

1 The traffic hit of downloading the Silverlight app can be reduced by using SL4, make the app an Out of Browser one, shipping out the XAP file to the users and using sllauncher.exe to install it (this is bread and butter stuff for sysadmins). This does make it harder to update the SL app, but you could just do it this way in the offices where network traffic is particularly bad.

阳光下慵懒的猫 2024-10-03 00:55:26

php/lamp 与 asp.net mvc: 涉及的唯一因素不是许可成本。团队扮演着重要的因素,当然这取决于你已有的技能,但追逐你不太习惯的平台会带来更高的开发+基础设施的开销。

因此,该项目可能不会给出预期的结果,这将是一个比节省一小部分更大的问题。先发制人:您不需要将 ms sql 与 asp.net MVC 一起使用,因此“数据库许可证不会使其成为一个小%”不是一个有效的论点。

至于提示,请检查我对此问题发布的答案:使用 ASP.NET 或 Google AppEngine 的可扩展应用程序。另外:

  • 您不需要一次加载所有这些选项卡。您可以在用户选择选项卡时检索它们。这将使初始加载时间更快(代价是第一次打开其他选项卡时可能会出现小延迟)。如果适合该场景,您可以在客户端保留已打开的选项卡,因此仅在第一次打开额外选项卡时才会发生额外的点击/延迟。

目前,往返流量很大,因为时间表的每个部分在跳出字段时都会保存。我想避免这种情况,但我承认部分保存很酷。

您可能已经这样做了,但是您可以使用更改检测来确保仅在用户实际进行更改时发布。此外,您不需要发送整个选项卡,您可以仅发送要进行的更改。

php/lamp vs. asp.net mvc: the only factor involved isn't licensing cost. The team plays an important factor, of course this depends on your pre-existing skills, but there will be a higher overhead of development + infrastructure by chasing the platform you are less used to.

The project might not give the expected results because of that, and that'd be a bigger problem than saving a small %. Pre-emptive strike: you don't need to use ms sql with asp.net MVC, so "the database license doesn't make it a small %" isn't a valid argument.

As for hints check the answer I posted to this question: Scalable application with ASP.NET or Google AppEngine. Additionally:

  • you don't need to load all those tabs at once. You can retrieve the tabs as the user selects them. This will make the initial load time faster (at the cost of a hopefully v. small delay when opening other tab for the first time). If appropriate for the scenario, you can hold the already opened tabs at the client, so the extra hit/delay only occurs the first time the extra tab was opened.

Currently, there is a lot of round-trip traffic because each section of the time sheet saves when they tab out of a field. I would like to avoid this but I do admit the partial saves are cool.

You might already be doing so, but you can use change detection to make sure its only posted when the user actually made a change. Additionally you don't need to send the whole tab, you could send just the changes to be made.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文