views:

260

answers:

7

I am not new to programming, but most of my experience has been in Java for the last few years. I was introduced to programming in VB 6, and then moved to Java when I started university, and have been using that almost exclusively since. I've taken courses that used other languages (C, Lisp and Prolog, Eiffel) and have worked with SQL and databases.

I'm looking to expand my programming horizons by learning another language, preferably one which I have no experience with and will open up the most doors. Now, as the question implies, I think that I may want to start with learning (parts of) the .NET set of languages. My questions are:

  1. Where do I start from?
  2. Which of the various languages associated with .NET (VB.NET, ASP.NET, etc) would be the best place to start if I'm not looking to develop a particular type of application, but to learn how the language and platform works.
  3. Considering that my background is primarily Java, what are some resources that would help me learn this language as quickly as possible. Obviously, I won't become an "expert" quickly, but at least to learn the basics: syntax, program structure, accessing libraries, file access, GUI, DB access, etc.

If you could please post some links to articles, books, and other resources along with an explanation of why you would recommend a particular approach, it would be appreciated. Also, if you think my approach itself is flawed, please explain and make suggestions.

A: 

I would look up on some videos on LearnVisualStudio.net and have this as a reference: http://www.25hoursaday.com/CsharpVsJava.html

Filip Ekberg
+7  A: 

If your background is Java, I'd start with C#. (ASP.NET isn't a language btw - it's a web framework.)

C# 3.0 in a Nutshell and Accelerated C# 2008 are both good books; if you're confident in Java then that should help a lot. (Many of the concepts are the same.) Both of them cover the core framework as well as the C# language. For more a more detailed look at the CLR (the equivalent of the JVM) there's the excellent CLR via C#.

Once you're happy with the stuff from C# 1.0, I'd obviously recommend my own C# in Depth - but it's not really suitable if you don't know any C# yet.

If you want to read details of the books linked above, as well as a couple I wouldn't recommend, you might find my blog book reviews useful. (No, I haven't reviewed my own book - but the author of C# 3.0 in a Nutshell was kind enough to review it for me.)

Jon Skeet
Thanks, I'm going to head over to a bookstore to thumb through those, and see which one appeals to me more. Or perhaps both, although you CAN have too many introductory books.
Elie
None of those are particularly introductory - they're all ones you'll want to refer back to later on too.
Jon Skeet
It looks like I'll probably go with C# in a Nutshell, as my local bookstore actually has it in stock with no guarantees as to when they might have any of the others.
Elie
Just make sure you get the latest version (3.0).
Jon Skeet
Thanks, I got C# in a Nutshell (3.0) on Friday. It was sitting right next to your book at the shop, which I thumbed through and noted for a possible follow-up.P.s. I found rewriting a program from scratch in a new language is a fairly good way to quickly learn the language... which is what I did.
Elie
+2  A: 

Coming from Java, I'd say go with C#. The syntax will seem very familiar. My favorite C# have been from Apress and O'Reilly - the "Programming C#" and "C# in a Nutshell" books from O'Reilly are excellent, and you could probably get up to speed fairly quickly. You'll probably be able to pick up the C# language very quickly, its the framework that will take some time to get familiar with (there's plenty of experienced .Net programmers that only know certain sections).

Anthony
Any recommendations for learning the frameworks, once I've got the basics?
Elie
Anthony
+2  A: 

If you are after a broad coverage of app-types, the first thing to do is to snag a copy of Visual C# 2008 Express Edition. This is free, and will get you up to speed quickly. Or Web Developer Express Edition for ASP.NET.

Since you are coming from a java background, I recommend C# over VB massively.

Marc Gravell
Thanks, I've actually downloaded the Visual C# Express Edition already, just haven't installed it until I'm ready to start sometime early in the new year.
Elie
A: 

If you're not so concerned with being able to go out and get a job using your skill and want a language that is conceptually interesting and will help you grow as a developer I would recommend looking at F#. There aren't a tremendous amount of jobs out there for it yet, but its an up and coming language. At the best, you ride the new wave and are far more hire-able in a few years than most university graduates, at the very worst, you'll be well armed when sometime soon C# incorporates all of F#'s features.

George Mauer
+1  A: 

Since you are familiar with Java i recommend you glance through this link. You then might want to use any of the books you want to use suggested by other people here. Depends on the taste. At the same time do what Mr. Marc Gravell has recommened, get hold of your C# and ASP.net tools.

Perpetualcoder
+1  A: 

No particular recommendation, but my experience was somewhat parallel to yours, so it might be relevant.

I started in .NET with C#, having done some Java before that, on the grounds that, as others have pointed out, its syntax is very similar. You will already be very used to reading lots of nested '}' characters at the end of things.

Once I'd written in C# for a while, I thought I'd have a look at VB.NET, just for grins, despite the fact that I had a little VB6 in my background at the time, but had never liked it.

The thing that struck me about the VB IDE, as compared with the C# one, was that intellisense, auto-complete and the helpfulness of the pre-compile error messages was hugely better with VB than C#, and this has remained the case to this day, in Visual Studio 2008. For this reason alone, I am a lot more productive with VB.NET, and use it most of the time.

I virtually never have to compile to remove compilation errors, since they're almost all highlighted, and disappear when corrected.

I happen to like being able to distinguish End Sub from End If, from End While, from Next, without having to a) ensure that the nesting of all the '}'s is correct, and then scroll up to where the blocks start. So VB's increased verbosity makes the code more readable to me.

I know many people don't like the extra verbosity over C#'s syntax, and fair enough. However those people often also say they don't like the additional typing, and here I would take issue, since the VB auto-complete is so good that most of the time, you don't have to type anything at all to end blocks, since it's all done for you.

Since the actual language features are virtually identical, choosing C# over VB.NET is really just a style choice.

But if you're going to use VB, set Visual Studio to use Options Strict and Explicit by default.

ChrisA