对于动态创建的表单,ASP.NET MVC 2 值得学习吗?

发布于 2024-10-20 23:18:46 字数 454 浏览 1 评论 0原文

我必须创建一个 Web 应用程序,允许您创建特定的 XML 文档。要生成文档,用户必须能够...

  • 使用下拉列表、文本输入字段、日历控件填写将成为 XML 内容的字段...某些字段将被验证。
  • 使用一些默认值(文本、新 GUID、当前日期...)
  • 添加或删除子节点。将验证最小和最大节点数。

所有字段、关系和验证都应该可以使用配置文件进行配置。

我知道如何以自制 MVP 或 MVVM 模式方式实现这一点。现在我想知道 MVC 2 是否可以帮助我证明学习曲线的合理性。 (MVC 3 不是一个选项,因为我的客户仍然使用 VS2008。)两周后我应该就有一个可以工作的应用程序。它是供内部“高级用户”使用的,因此不必看起来太花哨,但主要概念和功能应该是防水的。

我的背景:我有多年的 Win Forms 开发经验和 ASP.NET 的基础知识(用它做过一些较小的应用程序)。

I have to create a web application that allows you to create specific XML documents. To generate a document, the user must be able to ...

  • fill out fields that will be the XML content, using dropdown lists, text input fields, calendar controls ... Some fields will be validated.
  • use some default values (text, new GUID, current date ...)
  • add or remove sub nodes. The minimum an maximum number of nodes will be validated.

All fields, relations and validations should be configurable by using config files.

I have an idea of how to implement this in a homebrew MVP or MVVM pattern way. Now I wonder if MVC 2 can help me enough to justify the learning curve. (MVC 3 is not an option, as my client still uses VS2008.) In two weeks I should have a working application. It is for internal "power user" use, so it doesn't have to look too fancy, but the main concept and functionality should be waterproof.

My background: I have many years of experience with Win Forms developement and basic knowledge of ASP.NET (did some smaller apps with it).

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

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

发布评论

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

评论(2

娇俏 2024-10-27 23:18:46

ASP.NET MVCASP.NET WebForms 有很大不同。

ASP.NET WebForms 旨在实现快速的“拖放”开发。在某种程度上,它尝试重新创建开发Windows 窗体应用程序的方式。这可能很酷,但有时初学者会被这种相似性所困,忘记他们正在开发一个 Web 服务器应用程序,试图以一种不适合该环境的方式制作东西,最终意识到他们必须学习很多知识并学习更多知识。处理WebForms特定的内在函数,例如页面生命周期、PostBacksViewStates等(让那些没有遇到其中之一的人投第一个反对票)。

另一方面,ASP.NET MVC 是一个更加灵活的框架,因此需要您更多的纪律才能正确使用。它还要求您充分理解 REST 和模型-视图-控制器等工程原理。好处是(几乎)不会出现意外,因为(几乎)一切都在你的掌控之中。

就我个人而言,我开发WebForms应用程序已经有好几年了,并且花了一些时间来掌握它。至于ASP.NET MVC,我花了大约2天时间了解核心概念,观看精彩的NerdDinner 教程,测试并使用代码,直到我对该技术感到完全满意。

ASP.NET MVC is very different from ASP.NET WebForms.

ASP.NET WebForms is aimed for rapid, "drag-and-drop" development. In some way, it tries to recreate the way you develop Windows Forms applications. This can be cool, but sometimes beginners get trapped by that similarity and forget that they are developing a web server application, trying to make things in a way which is improper in that context, finally realising that they have to learn a lot about and to deal with WebForms-specific intrinsics like page life cycles, PostBacks, ViewStates, etc. (let those who didn't struggle with one of those cast the first downvote).

On the other hand, ASP.NET MVC is a much more flexible framework, and as such requires from you more discipline to get it right. it also requires from you to have a good understanding of engineering principles like REST and Model-View-Controller. The good thing is that there are (almost) no surprises because you are in control of (almost) everything.

Personally speaking, I developed WebForms applications for several years, and it took some time to master it. As for ASP.NET MVC, it took me about 2 days to learn about the core concepts, watch the great NerdDinner tutorial, test and play with code, until I felt completely comfortable with that technology.

纵山崖 2024-10-27 23:18:46

老实说,如果您只有 ASP.NET 的基本知识,那么在两周内学习 ASP.NET MVC 并根据这些要求开发应用程序可能是一项具有挑战性的任务。当然这只是我个人的观点,很主观。

Honestly if you have only a basic knowledge of ASP.NET, learning ASP.NET MVC in two weeks and developing an application according to those requirements could be a challenging task. Of course that's only my personal point of view and it is subjective.

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