什么是你为你的下一个ASP.NET项目的选择:Web窗体或MVC? [英] What's your choice for your next ASP.NET project: Web Forms or MVC?

查看:65
本文介绍了什么是你为你的下一个ASP.NET项目的选择:Web窗体或MVC?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

让我们说,你将开始一个新的ASP.NET网站/应用的明天。你会选择Web窗体或MVC,为什么?

Let's say that you will start a new ASP.NET web site/application tomorrow. Would you chose Web Forms or MVC, and why?

推荐答案

MVC宝贝!和jQuery!

MVC baby! And JQuery!

编辑:好的,这是不够公平地说,我的反应值得多一点的信息。

OK, it's fair enough to say my response warrants a little more info.

我就选择了MVC,原因如下:

I'd choose MVC for the following reasons:


  1. 我在Rails中工作过,并发现它高产。 ASP MVC借用了Rails中这么多,感觉就像是在某些方面直接端口(这就是我心中的好东西)。

  2. AJAX是重要的,但我的的微软的阿特拉斯的方式进行AJAX(无论产品的名称是这些天)。如果你打算做AJAX,你需要了解HTML和JavaScript。隐藏,从你正在伤害你超过他们帮助你(IMO)的框架。

  3. JQuery的已经接管了它似乎JavaScript框架方面的世界。 ASPMVC很好整合它。我想了解它,所以这里有很大的调整。

  4. 全对照模型是一个整洁的想法,但它比它出现的表面上更复杂。例如,环顾四周SO上大约一个用户控件如何能找到它含有最高水平的控制等问题。控制层次的抽象有漏洞。网格是伟大的,如果他们做你想做的开箱什么,但它是非常非常难定义他们做一些他们没有做的事情。而市场上最好的网格控件(那些是高度可定制的)大,臃肿,过于复杂的野兽。也许这告诉我们,我们应该放弃回落到HTML和让我们的看法循环做那种事我们。

  5. 我相信我可以建立A​​SPMVC齐全,美观的应用程序比ASP.Net快很多(我已经在我的腰带了一些年ASP.Net的)。看看计算器...很快建立在ASPMVC与jQuery,它的快速,可扩展和喜悦IMO使用。

  6. 哦,它是完全开源的!它是确定读取源$ C ​​$ C,博客这件事,甚至修改,然后重新发布!

  1. I have worked in Rails and found it highly productive. ASP MVC has borrowed so much from Rails that it feels like a direct port in some ways (and that's a good thing in my mind).
  2. AJAX is important, but I hate the Microsoft "Atlas" approach to AJAX (whatever the product name is these days). If you're going to do AJAX, you need to understand the HTML and the JavaScript. Frameworks that hide that from you are hurting you more than they are helping you (IMO).
  3. JQuery has taken over the world it seems in terms of JavaScript frameworks. ASPMVC is well-integrated with it. I want to learn it, so there's great alignment here.
  4. The whole "control" model is a neat idea, but it is more complicated than it appears on the surface. For example, look around on SO for questions about how a UserControl can find its highest level containing control and so forth. The control hierarchy abstraction has leaks in it. Grids are great if they do what you want out of the box, but it's very very hard to customize them to do something they weren't made to do. And the best grid controls on the market (the ones that are highly customizable) are large, bloated, overly complicated beasts. Maybe that shows us that we should drop back down to HTML and let loops in our views do that kind of thing for us.
  5. I believe I can build complete, beautiful apps in ASPMVC much faster than in ASP.Net (and I've got some years of ASP.Net under my belt). Look at StackOverflow ... built quickly on ASPMVC with JQuery, and it's fast, scalable and a joy to use IMO.
  6. Oh, and it's completely open source! It is ok to read the source code, blog about it, and even modify then redistribute it!

这篇关于什么是你为你的下一个ASP.NET项目的选择:Web窗体或MVC?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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