JavaScript or C#
I'm new to development and want to learn JavaScript and C#, which one do you think would be best to start with. I want to mainly build web apps.
They're not mutually exclusive.
JavaScript is client-side programming (DOM manipulation, effects, AJAX).
C# is server-side programming (database communication, OO, external services, etc).
You should learn both. (and ASP.NET MVC while your at it).
That's a tough question as they are for different purposes. Do you know basic HTML and CSS already? If so, you may want to get comfortable with javascript and working with the DOM and take a look at Javascript libraries like JQuery or Prototype.
For Web development you are going to be working with either ASP.NET or ASP.NET MVC in C# and this will serve as the "behind the scenes" layer. You may want to spend some time and learn the C# language first before moving into the C# Web frameworks. Once you do that, you can work on integrating your Javascript skills.
If you have basic HTML/CSS knowledge already, than I would probably start with getting comfortable with C# and than move onto ASP(.NET or MVC). There are plenty of tutorials at asp.net. With C# and ASP there are a lot of components built in that can make building fancy ajaxy web pages easier than coding them with just javascript and html.
I would say if you want to build dynamic web applications, its more important to learn the server side first. One can do a lot of things without client side scripting, although it is important for certain types of UI.
I expect that C# will be easier, if your goal is to learn a language well, as javascript is easy to modify but to do it well requires a great deal more effort.
You can pick up on the basics of object-oriented programming easily, whereas there is a great deal of flexibility in javascript that allows you to do a great deal with little code, but with a steeper learning curve.
What is your goal? Do you want to focus on writing some innovative webpages, where you are using HTML5 features? Then javascript would be the best option, as ASP.NET MVC is not going to push the boundaries of writing games in WebGL, or using the other new features available in HTML5.
But, if you want something that will allow you more options, then C# can be used to help support web applications, as well as write desktop applications and enterprise apps, leveraging the power of .NET4.0.
But, to really use .NET4 you will either need to use mono or use some version of Visual Studio, and if you use the express version then you will have some limitations.
So, it may come down to cost, desires and goals, as to which one is better to start with, as they are very different.
精彩评论