传统 ASP .NET Web 窗体与 MVC [英] Traditional ASP .NET Web Forms vs MVC

查看:15
本文介绍了传统 ASP .NET Web 窗体与 MVC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

作为具有一些 winform 和客户端应用程序经验的人 - 是否值得回去学习传统 ASP .NET 页面的工作方式,还是直接进入 ASP .NET MVC 可以?

As someone with some winforms and client applications experience - is it worth going back and learning the way traditional ASP .NET pages work, or is it okay with moving straight into ASP .NET MVC?

我正在寻找一般 C# 知识中的陷阱或陷阱,而我不会从截屏视频系列和 ASP .NET 站点上的内容中了解到这些.

I'm kind of looking for pitfalls or traps in my knowledge of general C#, that I won't know from the screencast series and things on the ASP .NET site.

推荐答案

这里是 MVC 的伟大之处.它比普通的 ASP.NET Web 窗体更接近于框架的基础.因此,通过使用 MVC 并理解它,您将对 WebForms 的工作方式有更好的了解.WebForms 的问题是有很多魔力,并且花了大约 6 年的时间尝试使 Web 像 Windows 窗体一样工作,因此您拥有控件树层次结构,并且所有内容都已转换到 Web.借助 MVC,您可以在不受 WinForm 影响的情况下获得核心.

Here is the great thing about MVC. It works closer to the base of the framework than normal ASP.NET Web Forms. So by using MVC and understanding it, you will have a better understanding of how WebForms work. The problem with WebForms is there is a lot of magic and about 6 years of trying to make the Web work like Windows Forms, so you have the control tree hierarchy and everything translated to the Web. With MVC you get the core with out the WinForm influence.

所以从 MVC 开始,如果需要,您将能够轻松地迁移到 WebForms.

So start with MVC, and you will easily be able to move in to WebForms if needed.

这篇关于传统 ASP .NET Web 窗体与 MVC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆