Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
Programming Books Media Book Reviews IT Technology

C# for Java Developers 382

joefrench writes: "It might seem strange to review a C# book on Slashdot, especially one published by Microsoft, but I felt that there must be a lot of readers like me -- programmers who know Java, but want/need to learn something about C# and .NET. C# for Java Developers aims to teach experienced Java programmers how to write in C#." Joe outlines what he considers the book's good points (many) and weak points (few) in the rest of his review, below.
C# for Java Developers
author Allen Jones, Adam Freeman
pages 548
publisher Microsoft Press
rating 9
reviewer Joe French
ISBN 0735617791
summary A comprehensive C# from Java tutorial

First things first

First of all, let's deal with the Microsoft issue. I was surprised to find that this book even existed given the problems MS has had in the courts recently. I was even more surprised to find that C# for Java Developers is very balanced and does not hype up C# at the expense of Java -- throughout the book there are places where the authors say that "Java is better at this" or "We have no idea what the C# designers were thinking." A refreshing attitude from a company that is not known to be an admirer of Java.

I was reluctant to pay for a Microsoft book, but I have to admit that I am impressed. This is the first MS book I have ever purchased, and it is clearly written, well thought-out and very, very comprehensive. One of the best features for me is that all of the instructions for compiling and managing code assume that you are using the command-line tools, rather than Visual Studio. For someone on a tight budget, this was a real bonus.

The Scoop

The first part of the book is an overview of .NET, and contains the boiler-plate description that you get from the .NET web site. Not that useful, but pretty short. There is a chapter that compares .NET to Java (J2SE and J2EE), but again, there is nothing new or important there.

The second part of the book covers the C# language, using Java as a starting point. The coverage seems comprehensive, and explains where the two languages are the same (quite often), where they are different (now and then) and when they appear to be the same, but you are likely to spend a couple of hours tracking down something weird (more often than I would like). I had started playing around with C# before buying this book, and all of the problems that I had in the early days were detailed here with clear explanations.

Part three delves into the .NET class library, covering basic topics such as collections, IO and handling XML. Once again, I was impressed with the depth of coverage and the way in which the authors use Java classes to explain the workings of .NET. It was while I was reading through this section that I realized just how different C#/.NET and Java can be.

The last part of the book covers "advanced" topics. There seems to be little reason for the division between basic and advanced topics, but chapters cover areas such as threading, security and networking. The one thing that is consistent in this part of the book is that there is less of a parallel between Java and C#. For example, "Windows Forms" is used to build client UI applications, but is very different toolkit from Swing/AWT.

The appendix list is a little dull, covering topics like GC and configuration files. There are some interesting snippets, but I got the impression that these were topics that the authors thought were important, but didn't know where else they should go. The exception is the "Java to .NET API Reference" which, for me at least, sets this book apart from the competition. Every class from the J2SE class library is mapped to an equivalent .NET class and a reference to where the topic is covered in the book -- having something like this has saved me hours of searching.

What's to Consider?

This book uses a lot of C# fragments to demonstrate how classes are used, but contains very few full "working" examples. I found this to be great once I knew the basics of C# (because I could focus on the topic), but difficult at first (because I could not play with complete code).

C# for Java Developers covers much more of the .NET Framework than the other books in my local bookstore, but because of this the text can be dense at times, as the authors try and pack in a bit too much detail.

I can't find major fault with this book, and a (small) part of me admires Microsoft for publishing such an unbiased book.

Summary

If you are a Java programmer who wants or needs to learn about C# and .NET, then this is a great book. Don't be put off by the Microsoft logo, and bear in mind that you don't need a copy of Visual Studio to follow the examples.

The book effectively uses Java as a tool to teach C# and explain the workings of .NET. If you are like me, then you will find this book invaluable and will likely keep it close at hand for quick reference.

Table of Contents

  1. Introducing .NET
    1. Introduction to Microsoft .NET
    2. Comparing Java and .NET Technologies
  2. The C# Language
    1. Creating Assemblies
    2. Language and Syntax Features
    3. Data Types
    4. Advanced Language Features
  3. Programming .NET with C#
    1. Strings and Regular Expressions
    2. Numbers and Dates
    3. Collections
    4. Streams, Files, and I/O
    5. XML Processing
  4. Advanced Topics
    1. Reflection
    2. Threading and Synchronization
    3. Networking
    4. Remoting
    5. Database Connectivity
    6. Security and Cryptography
    7. Graphics and UI
    8. Introduction to XML Web Services
  5. Appendices
    1. Platform Integration
    2. Shared Assemblies
    3. Configuring Applications
    4. Garbage Collection
    5. Cross-Language Code Interoperability
    6. Java to .NET API Reference


You can purchase C# for Java Developers from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

This discussion has been archived. No new comments can be posted.

C# for Java Developers

Comments Filter:
  • by Anonymous Coward on Tuesday September 03, 2002 @11:36AM (#4189128)
    Gentlemen,

    Computing is a fast-paced field. What was cutting edge yesterday is as outdated as a pet rock today. Newer, more efficient technologies are always being developed. The 8" floppy gave way to the 3.5" floppy which was later replaced by the CD-R. The acoustic modem eventually yielded to the DSL/Cable modem. Unix was overtaken by Windows XP. And so on.

    The same technology also applies to programming languages. C yielded to C++ which gave way to C#. However, the time has come for a complete paradigm shift in programming. I propose a de facto migration towards a relatively new, but promising language known as assembly.

    Most of you are probably unfamiliar with this langauge. I know I was until I chanced upon it in my community college while completing my MCSE. So allow me to give you a little background on this language:

    C++ and Java do not allow the programmer to directly access the hardware. Instead they compile into a "bytecode" which is then interpretted by a virtual machine. While very portable, this limits the speed of Java and C++ programs.

    Assembly, however, was designed to allow the programmer *direct access* to the hardware! This makes for *much* faster programs.
    Furthermore, assembly is the same language "spoken" by computers.
    Because of this, you may sometimes see assembly referred to as "machine code".

    I fear that without the support of a large corporation (the way MS has pushed Java, or Sun supported C#) assembly will fall by the wayside like many other interesting languages (Python, I'm looking at you!) Thus I hope to start a "grass-roots" movement to support assembly. I would like to see the FSF release a GNU-based assembly compiler (although they can keep the bugs that have plagued the 3.0 release of gcc which caused people to switch to Visual Studio for their Linux programming.)

    I would love to expound on the superiority of assembly over C++/Java but I'm late for my "Intro to TCP/IP" class. Those of you familiar with assembly, please feel free to educate the many ignorant C/C++/Java users on the glory of this superior language.

    Thank you and God bless!
  • by Anonymous Coward on Tuesday September 03, 2002 @11:39AM (#4189148)
    The thing that makes C# so much better than Java is that there are so many free Java VMs and development tools. If you want a VM for Java, all you have to do is go out to blackdown.org and download one. Well, what does that say about the quality of the language? Back when I was a wee pup we had a phrase, "you get what you pay for." Well, at least C# development tools cost a fair amount, to me that suggests that it is a much better language. After all if Java was so good they wouldn't be giving it away for free.

    Also with the upcoming war on Iraq it's best if we're all patriotic and support our country's companies with our hard-earned dollars. Why, if you use Java, you might as well hang an Iraqi flag in your yard and wear a Republican Guard uniform to work every day. That's how important this is. Don't you Java developers feel ashamed of yourselves? I would.
  • Re:C# (Score:2, Funny)

    by cbowland ( 205263 ) on Tuesday September 03, 2002 @11:50AM (#4189251)
    As a java developer, I prefer to call it D flat.
  • Re: C# (Score:4, Funny)

    by Black Parrot ( 19622 ) on Tuesday September 03, 2002 @12:58PM (#4189724)


    > This is a maligned language.

    Is it byte maligned, or word maligned?

  • Re:C# (Score:2, Funny)

    by plugger ( 450839 ) on Tuesday September 03, 2002 @01:11PM (#4189826) Homepage
    Showing my age here, but I remember UK computer magazines printing BASIC listings, often with a footnote which said 'our daisywheel printer only prints £ signs, please substitute # for £ in the program'.
  • by Yankovic ( 97540 ) on Tuesday September 03, 2002 @03:54PM (#4190991)
    This coming from a guy with a Java contest sponsored by Sun as his sig...

The moon is made of green cheese. -- John Heywood

Working...