学习Asp.Net WebForms或Asp.Net MVC

时间:2023-01-16 16:06:07

It might be a dupe but I cannot find a straight answer. If a person is about to start learning web development over .Net framework, which technology should he go for ?

这可能是一个骗局,但我找不到直接的答案。如果一个人即将开始通过.Net框架学习Web开发,他应该选择哪种技术?

  • Asp.Net WebForms
  • Asp.Net WebForms
  • Asp.Net MVC
  • Asp.Net MVC

keeping in view these three aspects

牢记这三个方面

  • future scope
  • 未来的范围
  • complexity
  • 复杂
  • features
  • 特征

Note: has done some WinForms programming using C#

注意:使用C#做了一些WinForms编程

Thanks

谢谢

4 个解决方案

#1


5  

As most people will say I am sure, it very much depends what you want to learn and the style of development you wish to take on. If you want a lot of control of your page markup and intend to use a lot of AJAX and CSS, then MVC is a better approach, the biggest trade off is you lose the Microsoft controls such as the Gridview and other drag and drop components. MVC is very powerful and extensible framework and learning it will also allow you learn the MVC pattern (which is useful if you ever diversify your skills later on to other development platforms).

正如大多数人会说我确信,这很大程度上取决于你想要学习什么以及你想要的发展方式。如果你想要对页面标记进行大量控制并打算使用大量的AJAX和CSS,那么MVC是一种更好的方法,最大的折衷就是你失去了微软控件,如Gridview和其他拖放组件。 MVC是一个非常强大且可扩展的框架,并且学习它还可以让您学习MVC模式(如果您以后将技能多样化到其他开发平台,这将非常有用)。

However if you are creating lots internal web applications that need to be delivered quickly, then Webforms is certainly a better way to go, it's well documented and mature and the controls allow you build powerful functionality for free. Although you will get basic templates to manipulate data in MVC, it isn't anywhere near as fast a building applications in Webforms.

但是,如果您正在创建需要快速交付的大量内部Web应用程序,那么Webforms肯定是一种更好的方法,它具有良好的文档和成熟性,并且控件允许您免费构建强大的功能。虽然您将获得在MVC中操作数据的基本模板,但它并不像Webforms中的构建应用程序那么快。

My personal recommendation is to learn MVC (and it's pattern) as it does not have a big reliance proprietary Microsoft components and makes you think about your application on the front and it's interaction with the back end.

我个人的建议是学习MVC(以及它的模式),因为它没有很大的依赖专有的微软组件,让你在前面思考你的应用程序,并与后端进行交互。

If you want a good example of a big MVC site... you're on it.. * run on ASP.NET MVC.

如果你想要一个大型MVC站点的好例子......你就可以了..在ASP.NET MVC上运行*。

Hope this helps, it is a very general opinion and there is a lot more to both arguments. However from personal experience I think MVC will teach you a lot more reusable standard web technologies in the long run.

希望这会有所帮助,这是一个非常普遍的观点,两个论点都有很多。但是从个人经验来看,我认为从长远来看,MVC将教你更多可重复使用的标准网络技术。

Ciao

再见

Jon

乔恩

#2


5  

This can be fairly controversial :)

这可能是相当有争议的:)

My personal opinion is; stop investing in webforms (it is a broken model for the web) and learn Asp.Net MVC so not only you can produce well design web applications but you can use your knowledge elsewhere on the web. MVC makes you aware of HTTP, HTML and other underlying 'web infrastructure' giving you a better chance for successful results.

我的个人意见是;停止投资webforms(这是一个破碎的网络模型)并学习Asp.Net MVC,这样您不仅可以生成设计良好的Web应用程序,还可以在Web上的其他地方使用您的知识。 MVC让您了解HTTP,HTML和其他底层“Web基础架构”,为您提供更好的成功结果。

So unless you want to make money (again totally personal opinion, take it with a pinch of salt) supporting old installations of webforms (a bit like COBOL - hold you horses webforms fans :) ) I would definitely, strongly suggest Asp.Net MVC ;). Granted I don't know the recent developments on webforms (especially 4.0 ones), so you might want to wait for those as well..

因此,除非你想赚钱(再次完全个人意见,用一点点盐)支持旧版的webforms(有点像COBOL - 抱你马网球迷:))我肯定会强烈建议Asp.Net MVC )。当然,我不知道webforms(特别是4.0)的最新发展,所以你可能也想等待那些......

Edit: If you think past winforms experience is going to be an advantage or an argument for using webforms (which is the main selling point for Microsoft developers, I think), you'd be right for about a week and wrong for the rest of the time. In both webforms and winforms you have controls. Similarity ends there. Event model is totally different, threading is completely different, you cant even start comparing rendering and so on. This is actually the main issue with webforms; trying to look like winforms on a totally different architecture.

编辑:如果您认为过去的winforms经验将成为使用webforms的优势或争论(我认为这是微软开发人员的主要卖点),那么大约一周你是正确的,其余的则是错误的时间。在webforms和winforms中你都有控件。相似性在那里结束。事件模型完全不同,线程完全不同,甚至无法开始比较渲染等。这实际上是webforms的主要问题;试图在完全不同的架构上看起来像winforms。

#3


3  

It's a lot easier to find a job doing WebForms, and MVC doesn't seem to be storming its way into production environments right now. More complex applications are bound to be using MVC today, smaller ones will most likely prefer WebForms, but remember that smaller applications represent the majority of the job market.

找到一个做WebForms的工作要容易得多,而且MVC现在似乎没有进入生产环境。更复杂的应用程序今天必然会使用MVC,较小的应用程序很可能更喜欢WebForms,但请记住,较小的应用程序代表了大多数就业市场。

Either way it won't hurt to learn both, or at least grasp the WebForms and invest more into MVC (as it will ultimately force you to learn other technologies usually associated with it: nHibernate/Entity, DDD, TDD and so on). Also, you can use a lot of controls in MVC, with little to no tweaking, although the mindset is very different.

无论哪种方式,学习这两者都不会有害,或者至少掌握WebForms并对MVC投入更多(因为它最终将迫使你学习通常与之相关的其他技术:nHibernate / Entity,DDD,TDD等)。此外,你可以在MVC中使用很多控件,几乎没有调整,尽管心态是非常不同的。

#4


1  

A Definite answer to this question is not possible but I can help you take a decision by highlighting you with some facts and key-points of both the technologies.

这个问题的确定答案是不可能的,但我可以帮助你做出决定,用两个技术的一些事实和要点强调你。

Web Forms have been there since long so they're much more mature and reliable compared to mvc when it comes to getting things done in time! Even the knowledge base on the web is much larger for web-forms as compared to mvc.

Web Forms早已存在,所以与mvc相比,它们在及时完成工作方面更加成熟和可靠!与mvc相比,即使是Web上的知识库也比Web表单大得多。

Web forms are much functionally rich and gives you more control on what you want to , how you want to do. Where as MVC has its own beauty of being light-weight application development platform.

Web表单功能丰富,可让您更好地控制自己的想法,想要做什么。 MVC在哪里有自己的轻量级应用程序开发平台之美。

If you're a newbie then I'd suggest you go for web-forms first and start looking at mvc in parallel.

如果你是新手,那么我建议你先去网页表格,然后开始同时看看mvc。

*.com has been built using asp.net mvc platform.

*.com已经使用asp.net mvc平台构建。

#1


5  

As most people will say I am sure, it very much depends what you want to learn and the style of development you wish to take on. If you want a lot of control of your page markup and intend to use a lot of AJAX and CSS, then MVC is a better approach, the biggest trade off is you lose the Microsoft controls such as the Gridview and other drag and drop components. MVC is very powerful and extensible framework and learning it will also allow you learn the MVC pattern (which is useful if you ever diversify your skills later on to other development platforms).

正如大多数人会说我确信,这很大程度上取决于你想要学习什么以及你想要的发展方式。如果你想要对页面标记进行大量控制并打算使用大量的AJAX和CSS,那么MVC是一种更好的方法,最大的折衷就是你失去了微软控件,如Gridview和其他拖放组件。 MVC是一个非常强大且可扩展的框架,并且学习它还可以让您学习MVC模式(如果您以后将技能多样化到其他开发平台,这将非常有用)。

However if you are creating lots internal web applications that need to be delivered quickly, then Webforms is certainly a better way to go, it's well documented and mature and the controls allow you build powerful functionality for free. Although you will get basic templates to manipulate data in MVC, it isn't anywhere near as fast a building applications in Webforms.

但是,如果您正在创建需要快速交付的大量内部Web应用程序,那么Webforms肯定是一种更好的方法,它具有良好的文档和成熟性,并且控件允许您免费构建强大的功能。虽然您将获得在MVC中操作数据的基本模板,但它并不像Webforms中的构建应用程序那么快。

My personal recommendation is to learn MVC (and it's pattern) as it does not have a big reliance proprietary Microsoft components and makes you think about your application on the front and it's interaction with the back end.

我个人的建议是学习MVC(以及它的模式),因为它没有很大的依赖专有的微软组件,让你在前面思考你的应用程序,并与后端进行交互。

If you want a good example of a big MVC site... you're on it.. * run on ASP.NET MVC.

如果你想要一个大型MVC站点的好例子......你就可以了..在ASP.NET MVC上运行*。

Hope this helps, it is a very general opinion and there is a lot more to both arguments. However from personal experience I think MVC will teach you a lot more reusable standard web technologies in the long run.

希望这会有所帮助,这是一个非常普遍的观点,两个论点都有很多。但是从个人经验来看,我认为从长远来看,MVC将教你更多可重复使用的标准网络技术。

Ciao

再见

Jon

乔恩

#2


5  

This can be fairly controversial :)

这可能是相当有争议的:)

My personal opinion is; stop investing in webforms (it is a broken model for the web) and learn Asp.Net MVC so not only you can produce well design web applications but you can use your knowledge elsewhere on the web. MVC makes you aware of HTTP, HTML and other underlying 'web infrastructure' giving you a better chance for successful results.

我的个人意见是;停止投资webforms(这是一个破碎的网络模型)并学习Asp.Net MVC,这样您不仅可以生成设计良好的Web应用程序,还可以在Web上的其他地方使用您的知识。 MVC让您了解HTTP,HTML和其他底层“Web基础架构”,为您提供更好的成功结果。

So unless you want to make money (again totally personal opinion, take it with a pinch of salt) supporting old installations of webforms (a bit like COBOL - hold you horses webforms fans :) ) I would definitely, strongly suggest Asp.Net MVC ;). Granted I don't know the recent developments on webforms (especially 4.0 ones), so you might want to wait for those as well..

因此,除非你想赚钱(再次完全个人意见,用一点点盐)支持旧版的webforms(有点像COBOL - 抱你马网球迷:))我肯定会强烈建议Asp.Net MVC )。当然,我不知道webforms(特别是4.0)的最新发展,所以你可能也想等待那些......

Edit: If you think past winforms experience is going to be an advantage or an argument for using webforms (which is the main selling point for Microsoft developers, I think), you'd be right for about a week and wrong for the rest of the time. In both webforms and winforms you have controls. Similarity ends there. Event model is totally different, threading is completely different, you cant even start comparing rendering and so on. This is actually the main issue with webforms; trying to look like winforms on a totally different architecture.

编辑:如果您认为过去的winforms经验将成为使用webforms的优势或争论(我认为这是微软开发人员的主要卖点),那么大约一周你是正确的,其余的则是错误的时间。在webforms和winforms中你都有控件。相似性在那里结束。事件模型完全不同,线程完全不同,甚至无法开始比较渲染等。这实际上是webforms的主要问题;试图在完全不同的架构上看起来像winforms。

#3


3  

It's a lot easier to find a job doing WebForms, and MVC doesn't seem to be storming its way into production environments right now. More complex applications are bound to be using MVC today, smaller ones will most likely prefer WebForms, but remember that smaller applications represent the majority of the job market.

找到一个做WebForms的工作要容易得多,而且MVC现在似乎没有进入生产环境。更复杂的应用程序今天必然会使用MVC,较小的应用程序很可能更喜欢WebForms,但请记住,较小的应用程序代表了大多数就业市场。

Either way it won't hurt to learn both, or at least grasp the WebForms and invest more into MVC (as it will ultimately force you to learn other technologies usually associated with it: nHibernate/Entity, DDD, TDD and so on). Also, you can use a lot of controls in MVC, with little to no tweaking, although the mindset is very different.

无论哪种方式,学习这两者都不会有害,或者至少掌握WebForms并对MVC投入更多(因为它最终将迫使你学习通常与之相关的其他技术:nHibernate / Entity,DDD,TDD等)。此外,你可以在MVC中使用很多控件,几乎没有调整,尽管心态是非常不同的。

#4


1  

A Definite answer to this question is not possible but I can help you take a decision by highlighting you with some facts and key-points of both the technologies.

这个问题的确定答案是不可能的,但我可以帮助你做出决定,用两个技术的一些事实和要点强调你。

Web Forms have been there since long so they're much more mature and reliable compared to mvc when it comes to getting things done in time! Even the knowledge base on the web is much larger for web-forms as compared to mvc.

Web Forms早已存在,所以与mvc相比,它们在及时完成工作方面更加成熟和可靠!与mvc相比,即使是Web上的知识库也比Web表单大得多。

Web forms are much functionally rich and gives you more control on what you want to , how you want to do. Where as MVC has its own beauty of being light-weight application development platform.

Web表单功能丰富,可让您更好地控制自己的想法,想要做什么。 MVC在哪里有自己的轻量级应用程序开发平台之美。

If you're a newbie then I'd suggest you go for web-forms first and start looking at mvc in parallel.

如果你是新手,那么我建议你先去网页表格,然后开始同时看看mvc。

*.com has been built using asp.net mvc platform.

*.com已经使用asp.net mvc平台构建。