如何决定的WebForms VS ASP.NET MVC 3新项目吗? [英] How to decide on WebForms vs ASP.NET MVC 3 for new project?

查看:140
本文介绍了如何决定的WebForms VS ASP.NET MVC 3新项目吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  

可能重复:结果
   MVC与WebForms的结果
   ASP.NET MVC效果


我将开始在未来几周内一个新的Web项目。这是一个面向公众的网站,一个小有名气的人。我有2个选择:用好老ASP.NET 4或新的ASP.NET MVC 3剃须刀。

我的不可以计划做任何类型的单元测试。这是相当简单的网站主要由JavaScript的,HTML和CSS。

我需要建立一个管理面板创建/删除/编辑页面;添加/删除图片组合的画廊。而这可能是所有我从管理面板需要。没有什么复杂的。

免责声明我没有与任何Web表单或MVC太多的经验,比我从Pluralsight培训和ASP.NET官方教程学等。我有CSS和HTML的中级知识;与JavaScript没有经验。但考虑到JavaScript的怎么这么类似于其他OOP语言,我不是太担心,如果我要得到我的手脏与JS。


  • 在发展速度方面,这将是更快?的WebForms MVC

  • 如何在两者之间出的现成的表现?

  • 在长期这将是更容易维护?

如果您建议不要从头开始一个web项目,也许你可以推荐一个光ASP.NET CMS呢?


解决方案

  

在发展速度方面,这将是更快?web表单或MVC


这取决于许多因素,但假设您同时使用与WebForms和MVC eqal技术那么MVC应该会更快。 Web表单有因为和在写入code(你在编程时,如如果应用程序是有状态)

假定什么之间的事情到底是如何工作的不匹配(例如HTTP是无状态的)的一些开销

  

在长期这将是更容易维护?


IMO MVC更容易维护,因为它更容易改变的裸HTML / JS code,模型(MVC)被很好地定义,使它成为一个新的人痛苦少去弄清楚如何一切正常。


  

我需要建立一个管理面板创建/删除/编辑页面;添加/删除图片组合的画廊。


这是什么样的东西,MVC是很好用 - 定义了实体和快速创建列表/详细信息/创建/修改/删除操作和视图

PS>我不是说普通的旧ASP.NET Web表单是坏,它只是有时会变得过于复杂,你需要付出的代价。我认为开源的电子商务解决方案 - NopCommerce就是一个很好的例子。它的精心设计,精心编写的,但它的,因为这需要对网络形式的开销很慢。

Possible Duplicate:
MVC versus WebForms
ASP.NET MVC Performance

I'll be starting a new web project in the coming weeks. It's a public facing web site for a somewhat famous person. I have 2 choices: use good-old ASP.NET 4 or new ASP.NET MVC 3 with Razor.

I do not plan to do any kind of unit testing. It's rather simple website mainly consisting of javascript, html and css.

I'll need to build an admin panel to create/delete/edit pages; add/remove pictures to portfolio gallery. And that's probably all I need from an admin panel. Nothing complicated.

Disclaimer: I do not have much experience with either Webforms or MVC, other than what I have learned from Pluralsight Training and ASP.NET Official Tutorials. I do have intermediate knowledge of css and html; no experience with javascript. But given how javascript is so similar to other OOP languages I am not too worried if I have to get my hands dirty with JS.

  • In terms of development speed, which would be faster: WebForms or MVC?
  • How about out-of-box performance between the two?
  • In a long term which would be easier to maintain?

If you advise against starting a web project from scratch, perhaps you could recommend a light ASP.NET CMS instead?

解决方案

In terms of development speed, which would be faster: webforms or mvc?

This depends on many factors, but suppose that you use eqal technologies both with webforms and mvc then mvc should be faster. Webforms has some overhead because of the mismatch between how things really work (eg. that http is stateless) and what is assumed while writing the code (you're programming as if the application was stateful)

In a long term which would be easier to maintain?

IMO MVC is easier to maintain, because it's easier to change bare html/js code, the model(MVC) is well defined which makes it less painful for a new person to get to figure out how everything works.

I'll need to build an admin panel to create/delete/edit pages; add/remove pictures to portfolio gallery.

This is the kind of thing that MVC is good with - define entities and quickly create List/Details/Create/Edit/Delete actions and views.

PS> I'm not saying that plain old ASP.NET Webforms is bad, it's just that it sometimes becomes too complicated and you need to pay the price for it. I think that open source e-commerce solution - NopCommerce is a good example. It's well designed, well written, but it's really slow because of the overhead that is needed for web forms.

这篇关于如何决定的WebForms VS ASP.NET MVC 3新项目吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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