简体   繁体   中英

ASP.NET: C# or JScript?

I love JavaScript. I started out coding in ActionScript and since the syntax is almost identical, I naturally understood JavaScript.

Recently, I have been learning how to use ASP.NET and MVC (which is not new to me since there are several MVC frameworks for Flash and Flex). And I'm trying to decide whether I want to learn C# or JScript... I say this ignorantly because I don't know how different JavaScript and JScript are... and C# is a completely different language all together.

  1. What advantages does C# have over JScript?
  2. and does it really even matter that I know and love JavaScript?

C#仅仅是因为您的就业能力将大大提高。

If you're using ASP.NET MVC you're going to want to learn both C# and Javascript. Microsoft is now bundling jQuery, a Javascript framework, with Visual Studio and it is a great fit with ASP.NET MVC. I'd recommend using C# for the controllers and model layers, regular HTML for the view templates and then jQuery for all the client-side DOM manipulation.

Edit: Just noticed you said you already know and love Javascript. I'd just like to point out that I had never used Javascript before learning ASP.NET MVC and I found it to be a lot more similar to C# than I was expecting. Of course C# is statically typed, however the syntax has quite a few similarities.

.NET in general and ASP.NET can be written in many languages, however only two are really popular and have big pool of support and tutorials: C# and VB.NET

This alone is reason enough to choose C# over JScript IMO, and C# share lots of its syntax with JScript - surely much more than VB.NET will ever share.

So like everyone already said, go with C# and you'll be swimming in familiar water with the bonus of many lifeguards available for you and ready to jump and save you when you drown. :)

  1. JScript is actually a script language used by Microsoft product. If you compare JScript over C#, it's somehow like you compare JavaScript with Java.

  2. ASP.Net require full managed programming language like VB.Net or C# (I noticed that the role of Java.net is fading out, is it?), I don't think JScript is supported in most cases.

One more PLUS on C#: Learning C# isn't that hard suppose you have enough experience in OOP ActionScript. They share quite a number of common syntax, and quite importantly, most tutorials and resources out there about .Net is written in C#.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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