我应该迁移到ASP.NET MVC? [英] Should I migrate to ASP.NET MVC?

查看:111
本文介绍了我应该迁移到ASP.NET MVC?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚听了计算器球队的第17播客,和他们聊 ASP.NET MVC的如此高度的,我决定检查出来。

I just listened to the StackOverflow team's 17th podcast, and they talked so highly of ASP.NET MVC that I decided to check it out.

但首先,我想肯定是值得的。我已经创建了基本的web应用程序(其他开发人员的基础上),该公司开始在几天之内的项目,并想知道,根据您的经验,如果我应该好好学习MVC和基础知识的时候重新创建基本的web应用这种模式。

But first, I want to be sure it's worth it. I already created a base web application (for other developers to build on) for a project that's starting in a few days and wanted to know, based on your experience, if I should take the time to learn the basics of MVC and re-create the base web application with this model.

真的有很大的优点是会做值不值?

Are there really big pros that'd make it worthwhile?

编辑:这不是一个现有的项目,这是一个即将启动的项目,所以如果我要做到这一点现在应该...

It's not an existing project, it's a project about to start, so if I'm going to do it it should be now...

我刚刚发现了这个

这不,但是,使用交互现有的背后的模型回服务器。相反,你会路由所有最终用户交互到一个控制器类代替 - 这有助于确保关切和可测试性(这也意味着没有视图状态或页面生命周期与基于MVC的意见)完全分离

It does not, however, use the existing post-back model for interactions back to the server. Instead, you'll route all end-user interactions to a Controller class instead - which helps ensure clean separation of concerns and testability (it also means no viewstate or page lifecycle with MVC based views).

如何将这项工作?没有视图状态?没有事件?

How would that work? No viewstate? No events?

推荐答案

如果你是今天的WebForms很高兴,那么也许ASP.NET MVC是不适合你。

If you are quite happy with WebForms today, then maybe ASP.NET MVC isn't for you.

我已经感到灰心的WebForms了很长一段时间。我绝对不是一个人在这里。智能客户端,通过网络状态的抽象复杂的情况,严重打破了。我碰巧喜欢HTML,JavaScript和CSS。的WebForms试图隐藏从我这里。它也有是真的没有那么复杂的问题,一些非常复杂的解决方案。 Web表单也是本来就很难考,而你可以用MVP,它不是一个网络环境的理想解决方案......(相对于MVC)。

I have been frustrated with WebForms for a really long time. I'm definitely not alone here. The smart-client, stateful abstraction over the web breaks down severely in complex scenarios. I happen to love HTML, Javascript, and CSS. WebForms tries to hide that from me. It also has some really complex solutions to problems that are really not that complex. Webforms is also inherently difficult to test, and while you can use MVP, it's not a great solution for a web environment...(compared to MVC).

如果MVC会吸引你?
- 你想在你的HTML更多的控制权
- 想要一个无缝的Ajax体验像其他平台有
- 要通过可测性和通
- 要有意义的URL
- HATE处理回发&安培; ViewState的问题

MVC will appeal to you if... - you want more control over your HTML - want a seamless ajax experience like every other platform has - want testability through-and-through - want meaningful URLs - HATE dealing with postback & viewstate issues

和作为框架内preVIEW 5,它是相当稳定的,其设计主要是在那里,升级并不困难。我在preVIEW 1日开始的应用程序,并在几个小时的最新preVIEW的是可用的。

And as for the framework being Preview 5, it is quite stable, the design is mostly there, and upgrading is not difficult. I started an app on Preview 1 and have upgraded within a few hours of the newest preview being available.

这篇关于我应该迁移到ASP.NET MVC?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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