简体   繁体   English

哪个更好? asp.net 2.0 坚持使用 isapi 重写或升级到 3.5 并使用 mvc?

[英]which is better? asp.net 2.0 stick with isapi rewrite or upgrade to 3.5 and use mvc?

i have a asp.net 2.0 web app that runs with ajax 1.0 extensions and isapi rewrite.我有一个 asp.net 2.0 web 应用程序,它与 ajax 1.0 扩展和 isapi 重写一起运行。

I have some bugs and i am considering whether to upgrade to 3.5 and use asp.net mvc instead.我有一些错误,我正在考虑是否升级到 3.5 并改用 asp.net mvc。

Please advise.请指教。

Upgrade your framework version to .NET 3.5 SP1.将您的框架版本升级到 .NET 3.5 SP1。 Use the System.Web.Routing namespace and you'll get MVC's URL routing functionality.使用 System.Web.Routing 命名空间,您将获得 MVC 的 URL 路由功能。 You don't need to completely switch over to MVC from WebForms.您不需要从 WebForms 完全切换到 MVC。

I would upgrade to WebForms 3.5 (.NET 3.5 SP1).我会升级到 WebForms 3.5 (.NET 3.5 SP1)。 Routing was baked into .NET 3.5 SP1.路由被烘焙到 .NET 3.5 SP1 中。 After that if you find that you want to use some of the other features of MVC then you could upgrade then.之后,如果你发现你想使用 MVC 的其他一些特性,那么你可以升级。 Here's an MSDN magazine article that should get you started.这是一篇MSDN 杂志文章,可以帮助您入门。

If your of the elk that enjoys rewriting your entire project because some new geewiz technology comes out then go for it (I know I am).如果你喜欢重写你的整个项目,因为一些新的 geewiz 技术出现了,那么 go (我知道我是)。 If not, stick to what you have.如果没有,坚持你所拥有的。 MVC Framework is great but rewriting code will almost always cause you more problems then fixing the exsisting bug you have. MVC 框架很棒,但重写代码几乎总是会给你带来更多问题,然后修复你现有的错误。

100% Asp.Net MVC is better than WebForms and it does no matter 2.0 or 3.5. 100% Asp.Net MVC 比 WebForms 好,无论 2.0 还是 3.5。 Just try and you will understand my point:)试试看,你就会明白我的意思:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM