如何将ASP.NET网站改为ASP MVC5? [英] How do I revamp an ASP.NET website to ASP MVC5?

查看:78
本文介绍了如何将ASP.NET网站改为ASP MVC5?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在asp.net中有一个Web应用程序项目。我需要将项目转换(修改)为MVC(MVC5)。



1.启动一个新的MVC项目并重新创建新项目中的所有功能 - 这是这样做的正确方法是什么?



2.我可能面临的挑战是什么?



3.我希望网站在大多数浏览器和早期版本(如IE8和IE7)中提供支持。这有什么问题吗?



4.生产服务器是否需要更改?



5.是否可以将现有项目部分转换为MVC并查看?



我之前没有任何MVC经验。有关这方面的任何有用信息都将非常值得一提。在此先感谢!

解决方案

您要问的是,真正的目标是使用MVC来使用MVC。是的,它可以提高项目的可维护性和其他品质,但整个方法都是错误的:你需要来自项目本身的目标。



情况如果您尝试创建一些MVC替代品,一些新架构或新框架,那将会非常不同。但您只想使用之前已经为您创建的MVC。所以,也许你应该记住它是真的为你的项目创建的(在许多其他项目中),而不是你的项目是为MVC创建的。



所以,你的问题在某种程度上,以颠倒的方式显示您的一些痕迹。让我们看看:1)它可能是合理的,但它实际上取决于您的项目目标和要求。 2)我不会害怕挑战;当你面对它们时,它会帮助你处理它们;这个问题很奇怪,因为你应该明白我们对你的技能和资源知之甚少。



现在...... 3)浏览器兼容性问题?哦,是的,问题,问题和更多的问题。我会说,它们与MVC本身并没有多大关系,它们更多地是关于CSS和布局,还涉及避免所有非标准或纯粹支持的JavaScript和DOM功能。我的主要想法是:不要试图达到相同的外观;这几乎是不可能的。相反,开发UI设计可以保持您独特的外观和感觉,但对浏览器布局引擎的不同渲染细节不太敏感。请查看我过去的答案:

在不同浏览器中运行时,网页布局会发生变化。 [ ^ ],

如何将桌面版网站转换为移动版网站 [ ^ ]。



... 4)不清楚你的意思;下载MVC框架并阅读要求; 5)是的,但是,这又取决于你的项目(想象如果你的身边只有一页会发生什么:-))。



- SA

I have a web application project in asp.net. I need to convert(revamp) the project to MVC(MVC5).

1. Starting a new MVC project and recreating all the functionalities in the new project - Is this the right approach to do that?

2. What all are the challenges I may have to face?

3. I want the website to give support in most of all browsers and in earlier versions(like IE8 and IE7). Is there any issues for this?

4. Is there any changes required at the production server?

5. Is it possible to partially convert the existing project to MVC and see?

I don't have any prior experience in MVC. Any helpful information regarding this will be highly appreciable. Thanks in Advance!

解决方案

You are asking as the real goal was to use MVC for the sake of using MVC. Yes, it can improve maintainability of your project and other qualities, but the whole approach is wrong: you need to come from the goals of your project itself.

The situation would be very different if you tried to create some alternative to MVC, some new architecture or a new framework. But you merely want to use MVC which was already created for you before. So, perhaps you should remember that it was really created for your project (among many other ones), not that your project was created for MVC.

So, your questions display some trace of your, in a way, upside-down view. Let's see: 1) It's likely to be reasonable, but it really depends on your project goals and requirements. 2) I would not be afraid of challenges; it would help you to deal them as you face them; this question is weird because you should understand that we know very little about your skills and resources.

Now… 3) issues with browser compatibility? oh yes, issues, issues and more issues. I would say, they are not much related to MVC itself, they are more about CSS and layouts, and also about avoiding all non-standard or purely supported JavaScript and DOM features. My key idea here is: don't try to achieve identical look; this is nearly impossible. Instead, develop UI design which keeps your unique look and feel and yet is not too sensitive to different rendering detail of browsers' layout engines. Please see my past answers:
webpages layout change when running in different browsers.[^],
How Do I Convert Desktop Site Into Mobile Site[^].

… 4) not clear what you mean by that; download the MVC framework and read the requirements; 5) yes, but, again, it depends on your project (imagine what could happen if your side is just one page :-)).

—SA


这篇关于如何将ASP.NET网站改为ASP MVC5?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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