为什么选择 Asp.net MVC2?

发布于 2024-10-18 21:32:59 字数 678 浏览 1 评论 0原文

可能的重复:
WPF 应用与商业应用 Winform 相比有何优势?
使用 ASP.Net MVC 与 Web 表单相比的最大优势< /a>

我有一个愚蠢的问题。 Asp.net web 表单有工具箱,可以帮助您拖动工具,而不是为工具编写代码。但在 asp.net mvc2 中没有这样的选项。我们必须为工具编写代码。

我的问题是,为什么这种复杂、耗时的方法(为工具编写代码)会流行???而且这个网络表格现在已经过时了。 asp.net mv2 的优点是什么?我根本不明白。你能解释一下吗?

Possible Duplicates:
Advantage of WPF app vs Winform for business apps?
Biggest advantage to using ASP.Net MVC vs web forms

I have a silly question here. Asp.net web form has tool box which helps you to drag the tools rather than writing codes for tools. but there is no such options in asp.net mvc2. we have to write codes for tools.

My question here, why this complicated method ( writing codes for tools) which is time consuming become popular??? and this web forms are outdated now. what is the advantage of asp.net mv2. i simply don't understand. can u explain me.

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

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

发布评论

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

评论(2

最笨的告白 2024-10-25 21:32:59

Webforms 并不像您想象的那样“拖放”:您仍然必须在控件上设置属性,并且将它们全部连接在一起仍然涉及很多复杂性。当您开始构建自己的控件时尤其如此。如果您没有搞乱 Web 表单的标记,那么您可能还没有参与过任何真正复杂的项目。 MVC 具有 html 帮助程序,可以为您完成几乎同样多的工作,并且以更自然地匹配目标 html 的方式完成工作。

Web 表单中还存在一些 MVC 所不存在的大“陷阱”:ViewState、动态控件、一大表单限制、损坏的后退按钮……我可以继续说下去。

Webforms isn't as "drag and drop" as you make it out to be: you still have to set properties on the controls, and there's still a lot of complexity involved in hooking them all together. This is especially true as you start building your own controls. If you're not messing around in the markup for web forms, you probably haven't worked on a project of any real complexity. MVC has html helpers that do almost as much of the work for you, and do it in a way that more naturally matches the target html.

There are also some big "gotchas" in web forms that just don't exist for MVC: ViewState, dynamic controls, the one big form limitation, broken back buttons... I could go on and on.

等待我真够勒 2024-10-25 21:32:59

我认为这完全取决于个人喜好,我个人喜欢 MVC 框架,因为它是我最熟悉的。这是一篇博客文章,其中包含一些更深入的推理 此处

I think its all about personal preference I personally like the MVC framework because its what I'm most familiar with. Here is a blog post with some more in depth reasoning here.

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