转到ASP.NET - VB或C#?

时间:2022-01-10 01:40:54

We have a large ASP classic code base but I'm looking to do future development in ASP.NET (and potentially in the future port across what we have). The natural choice of language seems to be VB (existing code is VBScript) but am I being too hasty? Does the choice of language, in the long run, even make a difference?

我们有一个很大的ASP经典代码库,但我希望在ASP.NET中进行未来的开发(并且可能在我们拥有的未来端口中)。语言的自然选择似乎是VB(现有代码是VBScript),但我是否太仓促?从长远来看,语言的选择是否会产生影响?

15 个解决方案

#1


16  

It's learning .Net (framework) that takes the time.

它正在学习.Net(框架),花费时间。

The specific language doesn't matter and is more a matter of taste. I'd normally recommend trying a few play projects in both languages (and any others that may take your fancy), and then decide which one you're more comfortable with (or have more success with!)

具体的语言并不重要,更多的是品味。我通常建议尝试两种语言的游戏项目(以及任何其他可能会让你感兴趣的项目),然后决定哪一种你更熟悉(或者更成功!)

#2


12  

First of all, don't port something for the sake of it. If it's working fine and there's little to be gained from porting it, leave it alone, and continue doing bugfixes and small enhancements in VBScript. If there's sufficient reason to move things across, then do it at that point, but you're much better off becoming familiar with the .Net version of web applications first rather than try and learn that on the fly if you do the port upfront. It's much easier to learn the new concepts like PostBack and ViewState in a 'clean' environment.

首先,不要为了它而移动东西。如果它工作正常并且移植它没有什么好处,请不要管它,并继续在VBScript中进行错误修正和小改进。如果有足够的理由将事情移动,那么就这样做吧,但是你最好先熟悉.Net版本的Web应用程序,而不是在事先做端口的情况下尝试即时学习。在“干净”的环境中学习PostBack和ViewState等新概念要容易得多。

There's also less scope to break out of your old way of thinking as you port stuff (just making it work any old how rather than redesigning where needed).

当你移植东西时,也没有什么可以突破旧的思维方式(只是让它工作在任何旧的方式而不是在需要的地方重新设计)。

Ultimately there's not a great deal of difference in the long run, it's mostly perceptual and a matter of personal taste but I'd propose learning C# first because it's lack of familiarity will emphasise the fact that you're learning something new. Hopefully thi will help you learn to do things the natural .Net way rather than the largely procedural VB(script) way. You're trying to unlearn as well as learn. Familiarity of some keywords will work against you.

从长远来看,最终并没有很大的不同,它主要是感性的,也是个人品味的问题,但我建议首先学习C#,因为它缺乏熟悉会强调你正在学习新东西的事实。希望这将帮助您学习以自然的.Net方式而不是基于程序的VB(脚本)方式。你想要忘却和学习。熟悉某些关键字会对您不利。

Echoing other benefits throughout some of the posts, and adding a few of my own:

在一些帖子中回应其他好处,并添加一些我自己的:

  • Future potential earnings : C# developers generally are worth more than VB.Net developers because of the perceptual difference.
  • 未来的潜在收益:由于感知差异,C#开发人员通常比VB.Net开发人员更有价值。

  • Most of the open source .Net code out there is C#, and the quality of it generally (though not always) tends to be higher.
  • 大多数开源.Net代码都是C#,它的质量一般(尽管不总是)往往更高。

  • There are more Q&A and examples and out there on the internet in C# than VB.Net. At the time I post this there's 1572 posts tagged with C#, only 185 with VB.Net right here on Stack OverFlow.
  • 在C#上有比CSS.Net更多的问答和例子。当我发帖时,有1572个帖子用C#标记,只有185个用VB.Net就在Stack OverFlow上。

  • C# OO keywords are reasonably standard, it makes it easier to read other OO language code. VB.Net goes off and renames things for no good reason e.g. abstract (C#, C++, Java and more...) vs MustInherit (VB.Net only).
  • C#OO关键字是相当标准的,它使得更容易阅读其他OO语言代码。 VB.Net关闭并重新命名,没有充分理由,例如抽象(C#,C ++,Java等等)与MustInherit(仅限VB.Net)。

  • It's generally accepted that once your familiar in both languages it's a lot easier to visually parse C# code than VB.Net code
  • 人们普遍认为,一旦熟悉两种语言,可视化解析C#代码比VB.Net代码容易得多

  • You won't get 'looked down' on by C#'ers and can help poke fun at the VB.Net people (if you so desire - the culture exists...)
  • 你不会被C#'看到'俯视',并且可以帮助嘲笑VB.Net的人(如果你愿意的话 - 文化存在......)

Once you've initially learned it in C#, it should be much easier to roll across to VB.Net than it would be the other way around. Invest in your own future.

一旦你最初在C#中学习它,它应该比转向VB.Net要容易得多。投资你自己的未来。

#3


6  

When I moved from ASP3 to ASP.NET I finally choosed to use C# instead of VB.NET.

当我从ASP3迁移到ASP.NET时,我终于选择使用C#而不是VB.NET。

I wrote Basics for years (MS-BAsic, GW-Basic, Quick-Basic, Visual Basic, VBScript) and it was very difficult to use VB.NET because I always try to write things as I used to do with VB6 or VBScript.

我写了Basics多年(MS-BAsic,GW-Basic,Quick-Basic,Visual Basic,VBScript)并且使用VB.NET非常困难,因为我总是尝试像以前一样编写VB6或VBScript。

So C# was a better choice for me : I have not been slowed by the weight of my habits.

所以C#对我来说是一个更好的选择:我没有因为习惯的重量而减速。

Also, C# was a new language (at this time) while new VB.NET keywords gave him a Cobol smell :)

此外,C#是一种新语言(此时),而新的VB.NET关键字给了他一个Cobol气味:)

#4


3  

Also, don't forget that you can mix and match within a project!

另外,不要忘记您可以在项目中混合搭配!

#5


2  

I would choose the language with the syntax you are most comfortable with as there is very little difference in functionality, although some say there is something of a culture difference between VB and c# developers. Another option is to learn both, the biggest obstacle moving to .net in my opinion is learning the huge .net framework, the actual language syntax you should be able to pick up fairly quickly.

我会选择具有您最熟悉的语法的语言,因为功能上几乎没有什么区别,尽管有人说VB和c#开发人员之间存在文化差异。另一种选择是学习两者,在我看来,移动到.net的最大障碍是学习巨大的.net框架,你应该能够快速掌握的实际语言语法。

#6


2  

The important thing is to learn .NET. not a particular language because C# or VB changes just syntax. The logic behind them in .NET environment is same.

重要的是学习.NET。不是特定的语言,因为C#或VB仅改变语法。它们在.NET环境中的逻辑是一样的。

#7


1  

You can do the same things in both C# or VB.NET. In the end it'd be a choice of which is easier to port to.

您可以在C#或VB.NET中执行相同的操作。最后,它是一个更容易移植的选择。

Keeping in mind that you shouldn't (IMHO) port directly ASP to ASP.NET, since you'd loose much of the features in .NET, this would include a fair amount of rewrite anyway. So I'd go with C# since I think it's less verbose and easier to write and read.

请记住,你不应该(恕我直言)直接将ASP移植到ASP.NET,因为你已经失去了.NET中的许多功能,这包括相当多的重写。所以我会选择C#,因为我觉得它更简洁,更容易编写和阅读。

#8


1  

.NET is really about the framework and the base class library. VB or C# - as Chris mentioned there is really just syntactical difference.

.NET实际上是关于框架和基类库。 VB或C# - 正如克里斯提到的那样,实际上只有语法差异。

Since you've done VBScript migration to VB.NET is more natural - you can learn the new syntax, then move onto the Framework and BCL, when you are familiar with those you can learn the C# syntax as weel - being bi-lingual is always good.

既然你已经完成了对VB.NET的VBScript迁移更自然 - 你可以学习新的语法,然后转到Framework和BCL,当你熟悉那些你可以学习C#语法的时候 - 双语是总是好的。

2sontek: There are also features in VB that aren't supported in C# - let's not go there. 80% (or more) of developers use only 20% of the features and the differences are very minor - they certainly don't fit into the 20%

2sontek:VB中还有一些功能在C#中不受支持 - 让我们不去那里。 80%(或更多)开发人员仅使用20%的功能,差异非常小 - 他们当然不适合20%

#9


1  

I develop in both but C# would be my preferance.

我在两者中都有所发展,但C#将是我的优先考虑。

You can do the majority of things in both languages and I certianly wouldnt re write any vb projects in c#.

你可以使用两种语言完成大部分工作,而且我不会在c#中重写任何vb项目。

However with C#: New language features generally come to c# first of all e.g. lamda expressions in linq You can write code in c# C# will force you to be neater C# developers get paid on average more and most larger projects will only be c# C# has similar syntax and function names to javascript There is some snobbery in the .net community towards vb developers

但是对于C#:新的语言功能通常首先来到c#,例如linq中的lamda表达式你可以用c#编写代码C#会迫使你变得更整洁C#开发人员平均得到的报酬更多而大多数更大的项目只会是c#C#有类似的语法和函数名称到javascript .net社区中有一些势利对vb开发者

#10


0  

Not much of a difference, but there is some difference (mostly syntactical in nature). If your old site is VBScript, it's probably easier to go with VB.NET.

没有太大区别,但有一些差异(主要是语法上的)。如果您的旧站点是VBScript,那么使用VB.NET可能更容易。

#11


0  

There are a few features in C# 3.5 that aren't supported in Visual Basic but language choice is always preference from the team and what you guys feel most productive in.

C#3.5中有一些功能在Visual Basic中不受支持,但语言选择始终是团队的偏好以及您感觉最有效率的内容。

#12


0  

From experience it is easiest to go with where your skillset currently lies. If this is in vb6/vbscript etc I would first look towards vb.net. It also depends on any project timescales and delivery dates. You will be upto speed quicker in vb.net. If you have time on your hands I would seriously consider c#, if only to give you a stronger foothold in the development market when you come to look for pastures new.

根据经验,最简单的方法是使用您的技能组合。如果这是在vb6 / vbscript等我首先看看vb.net。它还取决于任何项目的时间表和交付日期。您将在vb.net中更快地加速。如果你有时间,我会认真考虑c#,如果只是为了让你在开发市场找到更强的立足点来寻找新的牧场。

#13


0  

You may also wan to look into C#.

你也可以去研究一下C#。

VB.Net and C# are both great for creating web applications, it really depends on the needs you will have.

VB.Net和C#都非常适合创建Web应用程序,它实际上取决于您的需求。

For example C# is great with events and VB.Net is great with XML.

例如,C#非常适合使用事件,VB.Net非常适合使用XML。

I'd say go with what ever your developers feel more comfortable.

我会说你的开发者感觉更舒服。

#14


0  

I was looking at a site recently that lists average UK wages based on technologies. Can't find the link now (typical!) but I remember that the average C# wage was around £5k higher than the average VB.NET wage.

我最近在看一个网站,列出了基于技术的英国平均工资。现在找不到链接(典型!)但是我记得C#的平均工资比VB.NET的平均工资高出约5万英镑。

If you're not going to learn both (and there's really no reason not to, as the only real difference between them is syntax) I'd go for C#.

如果你不打算同时学习(并且没有理由不这样做,因为它们之间唯一真正的区别就是语法)我会选择C#。

#15


0  

.net or c# it ups to you on how you will solve the problem and what make you more creative. But i think sooner the .net will be erased and c# will be the only language that can be used in asp. i start learning the .net concept then after i change my language to c# for asp.net mvc so i suggest you must go to c# because it will help you more in future.

.net或c#它会告诉你如何解决问题以及什么让你更有创意。但我认为.net将被删除,c#将是唯一可以在asp中使用的语言。我开始学习.net概念然后我将我的语言改为c#for asp.net mvc所以我建议你必须去c#因为它将来会对你有所帮助。

#1


16  

It's learning .Net (framework) that takes the time.

它正在学习.Net(框架),花费时间。

The specific language doesn't matter and is more a matter of taste. I'd normally recommend trying a few play projects in both languages (and any others that may take your fancy), and then decide which one you're more comfortable with (or have more success with!)

具体的语言并不重要,更多的是品味。我通常建议尝试两种语言的游戏项目(以及任何其他可能会让你感兴趣的项目),然后决定哪一种你更熟悉(或者更成功!)

#2


12  

First of all, don't port something for the sake of it. If it's working fine and there's little to be gained from porting it, leave it alone, and continue doing bugfixes and small enhancements in VBScript. If there's sufficient reason to move things across, then do it at that point, but you're much better off becoming familiar with the .Net version of web applications first rather than try and learn that on the fly if you do the port upfront. It's much easier to learn the new concepts like PostBack and ViewState in a 'clean' environment.

首先,不要为了它而移动东西。如果它工作正常并且移植它没有什么好处,请不要管它,并继续在VBScript中进行错误修正和小改进。如果有足够的理由将事情移动,那么就这样做吧,但是你最好先熟悉.Net版本的Web应用程序,而不是在事先做端口的情况下尝试即时学习。在“干净”的环境中学习PostBack和ViewState等新概念要容易得多。

There's also less scope to break out of your old way of thinking as you port stuff (just making it work any old how rather than redesigning where needed).

当你移植东西时,也没有什么可以突破旧的思维方式(只是让它工作在任何旧的方式而不是在需要的地方重新设计)。

Ultimately there's not a great deal of difference in the long run, it's mostly perceptual and a matter of personal taste but I'd propose learning C# first because it's lack of familiarity will emphasise the fact that you're learning something new. Hopefully thi will help you learn to do things the natural .Net way rather than the largely procedural VB(script) way. You're trying to unlearn as well as learn. Familiarity of some keywords will work against you.

从长远来看,最终并没有很大的不同,它主要是感性的,也是个人品味的问题,但我建议首先学习C#,因为它缺乏熟悉会强调你正在学习新东西的事实。希望这将帮助您学习以自然的.Net方式而不是基于程序的VB(脚本)方式。你想要忘却和学习。熟悉某些关键字会对您不利。

Echoing other benefits throughout some of the posts, and adding a few of my own:

在一些帖子中回应其他好处,并添加一些我自己的:

  • Future potential earnings : C# developers generally are worth more than VB.Net developers because of the perceptual difference.
  • 未来的潜在收益:由于感知差异,C#开发人员通常比VB.Net开发人员更有价值。

  • Most of the open source .Net code out there is C#, and the quality of it generally (though not always) tends to be higher.
  • 大多数开源.Net代码都是C#,它的质量一般(尽管不总是)往往更高。

  • There are more Q&A and examples and out there on the internet in C# than VB.Net. At the time I post this there's 1572 posts tagged with C#, only 185 with VB.Net right here on Stack OverFlow.
  • 在C#上有比CSS.Net更多的问答和例子。当我发帖时,有1572个帖子用C#标记,只有185个用VB.Net就在Stack OverFlow上。

  • C# OO keywords are reasonably standard, it makes it easier to read other OO language code. VB.Net goes off and renames things for no good reason e.g. abstract (C#, C++, Java and more...) vs MustInherit (VB.Net only).
  • C#OO关键字是相当标准的,它使得更容易阅读其他OO语言代码。 VB.Net关闭并重新命名,没有充分理由,例如抽象(C#,C ++,Java等等)与MustInherit(仅限VB.Net)。

  • It's generally accepted that once your familiar in both languages it's a lot easier to visually parse C# code than VB.Net code
  • 人们普遍认为,一旦熟悉两种语言,可视化解析C#代码比VB.Net代码容易得多

  • You won't get 'looked down' on by C#'ers and can help poke fun at the VB.Net people (if you so desire - the culture exists...)
  • 你不会被C#'看到'俯视',并且可以帮助嘲笑VB.Net的人(如果你愿意的话 - 文化存在......)

Once you've initially learned it in C#, it should be much easier to roll across to VB.Net than it would be the other way around. Invest in your own future.

一旦你最初在C#中学习它,它应该比转向VB.Net要容易得多。投资你自己的未来。

#3


6  

When I moved from ASP3 to ASP.NET I finally choosed to use C# instead of VB.NET.

当我从ASP3迁移到ASP.NET时,我终于选择使用C#而不是VB.NET。

I wrote Basics for years (MS-BAsic, GW-Basic, Quick-Basic, Visual Basic, VBScript) and it was very difficult to use VB.NET because I always try to write things as I used to do with VB6 or VBScript.

我写了Basics多年(MS-BAsic,GW-Basic,Quick-Basic,Visual Basic,VBScript)并且使用VB.NET非常困难,因为我总是尝试像以前一样编写VB6或VBScript。

So C# was a better choice for me : I have not been slowed by the weight of my habits.

所以C#对我来说是一个更好的选择:我没有因为习惯的重量而减速。

Also, C# was a new language (at this time) while new VB.NET keywords gave him a Cobol smell :)

此外,C#是一种新语言(此时),而新的VB.NET关键字给了他一个Cobol气味:)

#4


3  

Also, don't forget that you can mix and match within a project!

另外,不要忘记您可以在项目中混合搭配!

#5


2  

I would choose the language with the syntax you are most comfortable with as there is very little difference in functionality, although some say there is something of a culture difference between VB and c# developers. Another option is to learn both, the biggest obstacle moving to .net in my opinion is learning the huge .net framework, the actual language syntax you should be able to pick up fairly quickly.

我会选择具有您最熟悉的语法的语言,因为功能上几乎没有什么区别,尽管有人说VB和c#开发人员之间存在文化差异。另一种选择是学习两者,在我看来,移动到.net的最大障碍是学习巨大的.net框架,你应该能够快速掌握的实际语言语法。

#6


2  

The important thing is to learn .NET. not a particular language because C# or VB changes just syntax. The logic behind them in .NET environment is same.

重要的是学习.NET。不是特定的语言,因为C#或VB仅改变语法。它们在.NET环境中的逻辑是一样的。

#7


1  

You can do the same things in both C# or VB.NET. In the end it'd be a choice of which is easier to port to.

您可以在C#或VB.NET中执行相同的操作。最后,它是一个更容易移植的选择。

Keeping in mind that you shouldn't (IMHO) port directly ASP to ASP.NET, since you'd loose much of the features in .NET, this would include a fair amount of rewrite anyway. So I'd go with C# since I think it's less verbose and easier to write and read.

请记住,你不应该(恕我直言)直接将ASP移植到ASP.NET,因为你已经失去了.NET中的许多功能,这包括相当多的重写。所以我会选择C#,因为我觉得它更简洁,更容易编写和阅读。

#8


1  

.NET is really about the framework and the base class library. VB or C# - as Chris mentioned there is really just syntactical difference.

.NET实际上是关于框架和基类库。 VB或C# - 正如克里斯提到的那样,实际上只有语法差异。

Since you've done VBScript migration to VB.NET is more natural - you can learn the new syntax, then move onto the Framework and BCL, when you are familiar with those you can learn the C# syntax as weel - being bi-lingual is always good.

既然你已经完成了对VB.NET的VBScript迁移更自然 - 你可以学习新的语法,然后转到Framework和BCL,当你熟悉那些你可以学习C#语法的时候 - 双语是总是好的。

2sontek: There are also features in VB that aren't supported in C# - let's not go there. 80% (or more) of developers use only 20% of the features and the differences are very minor - they certainly don't fit into the 20%

2sontek:VB中还有一些功能在C#中不受支持 - 让我们不去那里。 80%(或更多)开发人员仅使用20%的功能,差异非常小 - 他们当然不适合20%

#9


1  

I develop in both but C# would be my preferance.

我在两者中都有所发展,但C#将是我的优先考虑。

You can do the majority of things in both languages and I certianly wouldnt re write any vb projects in c#.

你可以使用两种语言完成大部分工作,而且我不会在c#中重写任何vb项目。

However with C#: New language features generally come to c# first of all e.g. lamda expressions in linq You can write code in c# C# will force you to be neater C# developers get paid on average more and most larger projects will only be c# C# has similar syntax and function names to javascript There is some snobbery in the .net community towards vb developers

但是对于C#:新的语言功能通常首先来到c#,例如linq中的lamda表达式你可以用c#编写代码C#会迫使你变得更整洁C#开发人员平均得到的报酬更多而大多数更大的项目只会是c#C#有类似的语法和函数名称到javascript .net社区中有一些势利对vb开发者

#10


0  

Not much of a difference, but there is some difference (mostly syntactical in nature). If your old site is VBScript, it's probably easier to go with VB.NET.

没有太大区别,但有一些差异(主要是语法上的)。如果您的旧站点是VBScript,那么使用VB.NET可能更容易。

#11


0  

There are a few features in C# 3.5 that aren't supported in Visual Basic but language choice is always preference from the team and what you guys feel most productive in.

C#3.5中有一些功能在Visual Basic中不受支持,但语言选择始终是团队的偏好以及您感觉最有效率的内容。

#12


0  

From experience it is easiest to go with where your skillset currently lies. If this is in vb6/vbscript etc I would first look towards vb.net. It also depends on any project timescales and delivery dates. You will be upto speed quicker in vb.net. If you have time on your hands I would seriously consider c#, if only to give you a stronger foothold in the development market when you come to look for pastures new.

根据经验,最简单的方法是使用您的技能组合。如果这是在vb6 / vbscript等我首先看看vb.net。它还取决于任何项目的时间表和交付日期。您将在vb.net中更快地加速。如果你有时间,我会认真考虑c#,如果只是为了让你在开发市场找到更强的立足点来寻找新的牧场。

#13


0  

You may also wan to look into C#.

你也可以去研究一下C#。

VB.Net and C# are both great for creating web applications, it really depends on the needs you will have.

VB.Net和C#都非常适合创建Web应用程序,它实际上取决于您的需求。

For example C# is great with events and VB.Net is great with XML.

例如,C#非常适合使用事件,VB.Net非常适合使用XML。

I'd say go with what ever your developers feel more comfortable.

我会说你的开发者感觉更舒服。

#14


0  

I was looking at a site recently that lists average UK wages based on technologies. Can't find the link now (typical!) but I remember that the average C# wage was around £5k higher than the average VB.NET wage.

我最近在看一个网站,列出了基于技术的英国平均工资。现在找不到链接(典型!)但是我记得C#的平均工资比VB.NET的平均工资高出约5万英镑。

If you're not going to learn both (and there's really no reason not to, as the only real difference between them is syntax) I'd go for C#.

如果你不打算同时学习(并且没有理由不这样做,因为它们之间唯一真正的区别就是语法)我会选择C#。

#15


0  

.net or c# it ups to you on how you will solve the problem and what make you more creative. But i think sooner the .net will be erased and c# will be the only language that can be used in asp. i start learning the .net concept then after i change my language to c# for asp.net mvc so i suggest you must go to c# because it will help you more in future.

.net或c#它会告诉你如何解决问题以及什么让你更有创意。但我认为.net将被删除,c#将是唯一可以在asp中使用的语言。我开始学习.net概念然后我将我的语言改为c#for asp.net mvc所以我建议你必须去c#因为它将来会对你有所帮助。