我应该从ASP.NET MVC 1还是MVC 2 Beta开始?

时间:2022-09-11 10:27:36

I'm just starting to get into ASP.NET MVC, and saw today that the Beta of version 2 has been released.

我刚开始进入ASP.NET MVC,今天看到版本2的Beta版已经发布。

Should I start on MVC 1 given that there are already a lot of great resources and tutorials? Or should I go straight to MVC 2 to take advantage of whatever improvements have been made?

我应该从MVC 1开始,因为已经有很多很棒的资源和教程吗?或者我应该直接使用MVC 2来利用所做的任何改进?

I'm thinking about breaking this into another question, but I guess the followup question is what are the major differences? Are the version 1 tutorials appropriate to get me into version 2?

我正在考虑将其分解为另一个问题,但我想后续问题是主要区别是什么?版本1教程是否适合我进入版本2?

Update:

更新:

I thought it was worth updating this question to mention that I started running through Scott Guthrie's great NerdDinner tutorial. I highly recommend it.

我认为值得更新这个问题值得一提,我开始介绍Scott Guthrie的NerdDinner教程。我强烈推荐它。

After running through that, I started using it in my own project and almost immediately hit a snag. I wanted to reuse partials across different areas of my site. If the partial belongs to a different controller, no can do. However, MVC 2 has Html.RenderAction which solves the problem for me.

经过这一切,我开始在我自己的项目中使用它,几乎立即遇到了障碍。我想在我的网站的不同区域重用部分内容。如果部分属于不同的控制器,则无法做到。但是,MVC 2有Html.RenderAction,它解决了我的问题。

4 个解决方案

#1


5  

Personally I would forget 1 and just jump in with 2. By the time you are finished with any project, 2 will probably be out of Beta. Most of the MVC1 tutorials will be generally applicable to 2. If something doesn't work just check if it's down to a difference between the versions. (In fact if you stick with 1 you are not guaranteed that all the tutorials will be 100% acurate anyway, as many tutorials relate to pre-release versions of 1). 2 adds some handy features like Areas, which you are likely to want to use.

就个人而言,我会忘记1并且只是跳入2.当你完成任何项目时,2可能会超出Beta。大多数MVC1教程一般适用于2.如果某些东西不起作用,只需检查它是否属于版本之间的差异。 (事实上​​,如果你坚持使用1,你不能保证所有的教程都是100%准确的,因为很多教程都与1的预发布版本有关)。 2添加了一些方便的功能,如您可能想要使用的区域。

#2


3  

Things seem to be improved in MVC 2 but a grounding in MVC 1 will not hurt at all; in fact it will probably be to your advantage. After you have used the MVC framework for a little while, you might find (like I did!) that you want to use it in your production work. I try to avoid beta in my production stuff so to this end, I would advise jumping on MVC 1; you can still check out the MVC 2 beta as they install side-by-side fine.

在MVC 2中似乎有所改进,但MVC 1的基础根本不会受到伤害;事实上,它可能对你有利。在使用MVC框架一段时间之后,您可能会发现(就像我做的那样!)您希望在生产工作中使用它。我试着在我的制作中避免测试版,所以为此,我建议跳上MVC 1;你仍然可以查看MVC 2测试版,因为它们可以并排安装。

Enjoy!

请享用!

Dan

#3


1  

I will probably go with MVC 1.0 first, before going to MVC 2.0. beta. For many reasons

在进入MVC 2.0之前,我可能会首先使用MVC 1.0。公测。出于很多原因

  • MVC 1.0 is stable and If I learn it, then its very easy for me to learn MVC 2.0 as its mostly will be some added features to MVC 1.0

    MVC 1.0是稳定的,如果我学习它,那么我很容易学习MVC 2.0,因为它主要是MVC 1.0的一些附加功能

  • Second reason being that, I can get a lot of reliable resources and quick help for MVC 1.0 than MVC 2.0 beta (on which everyone will be experimenting, and are not sure)

    第二个原因是,我可以获得大量可靠的资源和MVC 1.0的快速帮助,而不是MVC 2.0 beta(每个人都将进行实验,并且不确定)

So, I suggest going with MVC 1.0 as I am not expecting any ground breaking changes with MVC 2.0 beta (MVC 1.0 itself is sufficiently good), and I am expecting this beta to be some improvements that are based on community feedback.

因此,我建议使用MVC 1.0,因为我不期望MVC 2.0 beta会有任何突破性的变化(MVC 1.0本身就足够了),我期待这个测试版能够基于社区反馈进行一些改进。

So, For your last question, I do think that MVC 1.0 Tutorials will be inline with the coming versions of MVC.

所以,对于你的上一个问题,我认为MVC 1.0教程将与即将推出的MVC版本一致。

Edit:

编辑:

New features in MVC 2.0 Beta, link in response to your comment Damovisa .. :)

MVC 2.0 Beta中的新功能,链接以回应您的评论Damovisa .. :)

http://haacked.com/archive/2009/11/17/asp.net-mvc-2-beta-released.aspx

http://haacked.com/archive/2009/11/17/asp.net-mvc-2-beta-released.aspx

Thanks

谢谢

#4


1  

In my opinion the best way is to learn from ground in MVC 1.0 and at the same time looking how to make some things easier with MVC 2.0. The reason is that you wil have no problems with workning in both version. For example in my company we have projects for asp .net mvc 1.0 and some earlny dev. projects written in mvc 2.0.

在我看来,最好的方法是从MVC 1.0中学习,同时了解如何使用MVC 2.0简化一些事情。原因是你在这两个版本中都没有问题。例如,在我的公司,我们有asp .net mvc 1.0和一些earlny dev的项目。用mvc 2.0编写的项目。

#1


5  

Personally I would forget 1 and just jump in with 2. By the time you are finished with any project, 2 will probably be out of Beta. Most of the MVC1 tutorials will be generally applicable to 2. If something doesn't work just check if it's down to a difference between the versions. (In fact if you stick with 1 you are not guaranteed that all the tutorials will be 100% acurate anyway, as many tutorials relate to pre-release versions of 1). 2 adds some handy features like Areas, which you are likely to want to use.

就个人而言,我会忘记1并且只是跳入2.当你完成任何项目时,2可能会超出Beta。大多数MVC1教程一般适用于2.如果某些东西不起作用,只需检查它是否属于版本之间的差异。 (事实上​​,如果你坚持使用1,你不能保证所有的教程都是100%准确的,因为很多教程都与1的预发布版本有关)。 2添加了一些方便的功能,如您可能想要使用的区域。

#2


3  

Things seem to be improved in MVC 2 but a grounding in MVC 1 will not hurt at all; in fact it will probably be to your advantage. After you have used the MVC framework for a little while, you might find (like I did!) that you want to use it in your production work. I try to avoid beta in my production stuff so to this end, I would advise jumping on MVC 1; you can still check out the MVC 2 beta as they install side-by-side fine.

在MVC 2中似乎有所改进,但MVC 1的基础根本不会受到伤害;事实上,它可能对你有利。在使用MVC框架一段时间之后,您可能会发现(就像我做的那样!)您希望在生产工作中使用它。我试着在我的制作中避免测试版,所以为此,我建议跳上MVC 1;你仍然可以查看MVC 2测试版,因为它们可以并排安装。

Enjoy!

请享用!

Dan

#3


1  

I will probably go with MVC 1.0 first, before going to MVC 2.0. beta. For many reasons

在进入MVC 2.0之前,我可能会首先使用MVC 1.0。公测。出于很多原因

  • MVC 1.0 is stable and If I learn it, then its very easy for me to learn MVC 2.0 as its mostly will be some added features to MVC 1.0

    MVC 1.0是稳定的,如果我学习它,那么我很容易学习MVC 2.0,因为它主要是MVC 1.0的一些附加功能

  • Second reason being that, I can get a lot of reliable resources and quick help for MVC 1.0 than MVC 2.0 beta (on which everyone will be experimenting, and are not sure)

    第二个原因是,我可以获得大量可靠的资源和MVC 1.0的快速帮助,而不是MVC 2.0 beta(每个人都将进行实验,并且不确定)

So, I suggest going with MVC 1.0 as I am not expecting any ground breaking changes with MVC 2.0 beta (MVC 1.0 itself is sufficiently good), and I am expecting this beta to be some improvements that are based on community feedback.

因此,我建议使用MVC 1.0,因为我不期望MVC 2.0 beta会有任何突破性的变化(MVC 1.0本身就足够了),我期待这个测试版能够基于社区反馈进行一些改进。

So, For your last question, I do think that MVC 1.0 Tutorials will be inline with the coming versions of MVC.

所以,对于你的上一个问题,我认为MVC 1.0教程将与即将推出的MVC版本一致。

Edit:

编辑:

New features in MVC 2.0 Beta, link in response to your comment Damovisa .. :)

MVC 2.0 Beta中的新功能,链接以回应您的评论Damovisa .. :)

http://haacked.com/archive/2009/11/17/asp.net-mvc-2-beta-released.aspx

http://haacked.com/archive/2009/11/17/asp.net-mvc-2-beta-released.aspx

Thanks

谢谢

#4


1  

In my opinion the best way is to learn from ground in MVC 1.0 and at the same time looking how to make some things easier with MVC 2.0. The reason is that you wil have no problems with workning in both version. For example in my company we have projects for asp .net mvc 1.0 and some earlny dev. projects written in mvc 2.0.

在我看来,最好的方法是从MVC 1.0中学习,同时了解如何使用MVC 2.0简化一些事情。原因是你在这两个版本中都没有问题。例如,在我的公司,我们有asp .net mvc 1.0和一些earlny dev的项目。用mvc 2.0编写的项目。