Pro C# 220
FrazzledDad writes "Andrew Troelsen's Pro C# 2005 and the .NET 2.0 Platform, 3rd Ed. gives a great breadth and depth of coverage to C# and the features of Microsoft's .NET 2.0 Framework. He does a fine job covering fundamentals of C# and .NET in general and then dives into terrific detail on a number of important topics." Read the rest of Jim's review.
Pro C# 2005 and the .NET 2.0 Platform, Third Edition | |
author | Andrew Troelsen |
pages | 1032 |
publisher | Apress |
rating | 8/10 |
reviewer | Jim Holmes |
ISBN | 1590594193 |
summary | Great coverage and detail on many C# topics, but long |
Troelsen claims that the book is targeted at "experienced software professionals and/or graduate students of computer sciences," and that he won't spend "three chapters on iteration or decision constructs," but he spends enough time covering basics that the book will be beneficial to developers of any skill level.
First off, the book is longer than it needs to be. Part of this is the amount of text Troelsen spends covering fundamentals, despite his claims of the book's targeted audience. Experienced developers will skip right over the sections on object-oriented programming basics and C# language fundamentals. Still, this extra material didn't particularly bother me and it's very useful to newer developers, or those needing a refresher on basics.
Troelsen's example code also has more cruft than necessary, which tends to drag out examples a bit too much. The auto-based example he carries through the book is a nice practical example, but do I really care about methods turning the radio on and off while not lending any weight to the concept?
I was also surprised to find missing any discussion of COM interoperability. While COM Interop isn't a sexy, futuristic topic, I'd think there would be great value in covering it - helping some developers understand how to better deal with migrating or wrapping up legacy applications.
Lastly, despite the book's title emphasizing C#, there are 130 or so pages on ASP.NET and XML web services. Sure, these are part of the .NET Framework, but it seems a diversion from focusing on C#.
Frankly, the bad items I list above are all nits to me in what I consider a very worthwhile book. The book's loaded with plenty of good material, starting out with a solid overview on developing .NET applications outside Microsoft's Visual Studio.
Troelsen nicely covers using the freely available .NET Framework SDK to build applications. He also mentions Textpad and has a handful of pages dedicated to SharpDevelop, the open source C# development environment. He also gives a short nod to the freely (for now!) downloadable Visual C# 2005 Express before moving into an overview of the upscale versions of Visual Studio.
Troelsen nicely lays out critical concepts in his book. His work is the first place I've found clear explanations of why one should occasionally drill into .NET's Common Intermediate Language (CIL, sometimes referred to as "IL"). Other articles and books I've read haven't really gone past the level of "gee, it's neat!", but Troelsen lays out good examples of when it can be useful - such as inspecting IL and finding out how to directly call operator overloads ("+=", for example) in languages which might not support this feature.
I also found Troelsen's discussion of remoting and serialization very clear and useful. Furthermore, he does a great job with delegates and events, starting out with manually working with event handlers. This helps the reader understand the fundamental workings of handler assignments and multicasting rather than just directly jumping to event handling assignment via the += operator.
Even better than Troelsen's conceptual coverage is the level of detail he brings to all the topics he writes on. I already mentioned his coverage of event/delegate multicasting as one example. Other examples would be his extensive coverage of reflection, late binding and threading, among other topics.
He dedicates one chapter to the guts of .NET assemblies, running the gamut from why assemblies exist, through the format of assembly headers, to how shared assemblies work. There's good discussion in this chapter on the what/why/how of the Global Assembly Cache and how to deal with publishing assemblies with policy interraction.
There's plenty of other goodness in this book. Generics get great coverage, as does ADO.NET and multi-threading. There's also a chapter dedicated to GDI+ programming for you graphics geeks.
It's nice that Troelsen carries one example through much of the book, building concepts on the same framework of his automobile classes. Source for his examples is available from Apress's website, and Apress also has a searchable e-book available. The e-book's available for free for short time if you purchase the hardcopy.
Troelsen's writing style is also easy to deal with. He's got a good writing voice which makes potentially dry stuff interesting.
It may be overly long for some folks, but this book is a worthwhile investment for those looking for clear, detailed explanations of C#. The length really doesn't detract from the book's overall value, and I'm happy to have it on my bookshelf. (I even pull it off and use it.)"
You can purchase Pro C# 2005 and the .NET 2.0 Platform, Third Edition from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
Do the editors make.... (Score:2, Interesting)
First off, the book is longer than it needs to be. Part of this is the amount of text Troelsen spends covering fundamentals, despite his claims of the book's targeted audience
It was Meyers, I think, who said at the beginning of one of his C++ books that it wasn't a tutorial and you need to know C++ before reading. And as a result, his books are concise and a great value.
Re:Do the editors make.... (Score:2)
In my experience, the answer is often "yes." Skipping the introductory material means, in the minds of some editors, shutting out some of the potential audience, so they'll very often make a case for including this material.
Sometimes it's not the editors, though, but the reviewers. Reviewers won't always "get it" if they're not actually part of the book's target audience. Again, though, this may be the editor's fault for choosing inappropriate reviewers.
Re:Marketing (Score:2)
Kill Two Birds With One Stone (Score:4, Informative)
With this book. [amazon.com]
Seriously though, unless you're a newbie programmer, I just suggest reading the C# language specifications [microsoft.com], and browsing the web for tutorials onIt's funny that you should say that. (Score:5, Interesting)
I used to spend hundreds of $$$, if not thousands, every year on programming books. For the exception of some really intense CS type of things, I usually ended up Googling for examples and looking at online stuff anyway. Now that I'm smarter, I just look for stuff on the web. These days with so much competition between platforms and languages, there's always some free material on the web and it's better written half the time by people who actually use it.
I could tell you horror stories about programming authors who never programmed the language before and wrote a book on it! *coughSAMScough* They would rely on the technical editor, or in some cases, the readers to find the errors. Then it's off to the 2nd edition for another round of proof reading by the consumer.
Re:It's funny that you should say that. (Score:2, Insightful)
On the other hand, a book devoted to examples, like say a C# almanac where source code listings and examples are listed for separate APIs, I may consider.
Re:It's funny that you should say that. (Score:1)
Re:It's funny that you should say that. (Score:2)
Re:It's funny that you should say that. (Score:1)
Funny... It kind of sounds like some of the applications that people write. I know quite a few developers and product guys that believe in TIPs (Test In Production)
potentially dry stuff that is interesting (Score:2)
So is it a concise tutorial or a bit excessive?
Focus (Score:1, Insightful)
I'm not sure how you can fault me for including coverage of ASP.NET and other
In case you are a Programming Languages Guy (Score:4, Informative)
http://www.ti.ethz.ch/rs/ [ti.ethz.ch]
For those who don't see the point in having a computer language if you can't say, precisely what statements in the language mean.
Anyone else...? (Score:1, Interesting)
I've been getting job inquiries for C# programmers from all over the country and have been looking for a refresher book; and one to expand into the more advanced topics.
It's nice to see book reviews, but I have a problem with believing just 1 review. Books which I tend to enjoy or derive a lot of useful information out of, may not work well for others, so I like to see a large number of people who recommend a book.
Slightly off-topic, but any other recommendations
C# (Score:5, Insightful)
Most people experienced with the languages believe the opposite - it has all the benefits of Java with none of the problems (lack multiple inheritance, effective marshalling, etc).
Re:C# (Score:2)
All the benefits? Like high-performance implementations from multiple vendors? Like quality cross-platform support?
Re:C# (Score:2)
I realise this is not specific to the C# language, but if C# is to be truly competitive with Java it has to have a full set of libraries cross-platform. Mono is not a complete implementation of the
Re:C# (Score:2, Informative)
If you require that that the mono library and the .NET library are exactly one-to-one equivilent, then you're right: that will never happen. Of course, that isn't even the case for different C and C++ STL libraries, so I don't think that's a reasonable requirement.
The mono library implements the vast majority of .NET library APIs. In addition, in contains many useful GTK, LDAP, DB, and other bindings of its own that are missing from the .NET library. It is, on its own, an extensive and fully functional pr
Re:C# (Score:2)
I think it is. If you develop with Java, you are guaranteed that a J2SE 1.4 implementation will provide exactly one-to-one equivalent libraries on all platforms. That is one of the reasons for Java's success.
Re:C# (Score:2)
That is one of the reasons for Java's success.
That's probably true. On the other hand, that's mostly a marketing feature rather than a true technical feature. I mean, one could certainly draw a circle arround the APIs that are shared between the .NET library and the mono library and say "this is the standard multi-platform library". It's just not particularly in Microsoft's interest to highlight those APIs.
Re:C# (Score:2)
Not really - it is something you can definitely rely on. If something is labelled 'J2SE 1.5' or 'J2EE 1.4' you know exactly what you are going to get. The importance of this can't be overstated.
I mean, one could certainly draw a circle arround the APIs that are shared between the
Re:C# (Score:2)
I don't know. It is the most popular language for developers on sourceforge, the most in-demand language for IT jobs, the de-facto standard language for mobile devices, the de-facto standard language for commercial server-side development. The most rapidly growing language for embedded and real-time development.
I guess it is.
Re:C# (Score:2)
therefore java is very common in situations where the user has no choice
Re:C# (Score:2)
You are wrong. Java is used because it allows developers to get the job
Re:C# (Score:2)
javas attitude of almost everything is an object and the rest can be made into one with an immutable wrapper makes javas type object close enough to vbs type variant. Having said that though in general the java language is much cleaner than vb because its a new language with
Re:C# (Score:2)
Sorry, but they have. The garbage collection does not impact performance in recent versions and the bounds checking is mostly optimised out at run time, and involves no extra memory.
1: i don't wan't warmup i wan'
Re:C# (Score:2)
starting even the smallest java gui app from cold (no jvm already in cache etc) takes noticable time. starting a similar app written in a traditional language is instant.
Not true. You can run simple non-GUI apps in just a few megabytes - try it! Most of that is the interpreter/VM.
iirc java now works by allocating up to a limit set at vm start time and doesn't start collecting garbage until that limit it reached. so unless you
Re:C# (Score:2)
No. I have just tried it. A simple non-GUI java app can start up in a few hundred milliseconds.
As for 'traditional language is instant' - how long does it take Emacs to start?
iirc java now works by allocating up to a limit set at vm start time and doesn't start collecting garbage until that limit it reached. so unless you use special sett
Re:C# (Score:2)
ok so a third then which is still a significant chunk.
i just tried jedit from cold (no jvm run since last reboot) and it took 20 seconds which to me is a noticable delay i'd have to reboot to do another fair test (otherwise cache would effect the results). this machine is a laptop running windows xp with an athlon xp 1800+ cpu so not the fastest t
Re:C# (Score:2)
JEdit is not a small app. I have just opened up Kate (an equivalent programmer's editor for KDE). It took 10 seconds (first time of opening), and then 3 seconds after that - equivalent to JEdit. I am working with a KDE desktop, so Kate should have far less to do that JEdit.
It seems to me that people are having different sets of standards for Java applications. Because it is 'Java' then delays
Re:C# (Score:2)
when i put a metafile on the clipboard and call Toolkit.getDefaultToolkit().getSystemClipboard().
Re:C# (Score:2)
This is an interesting problem! I will see if I can post a solution soon.
Re:C# (Score:2)
You are right, obviously! If I find a way to get around this I will post here.
Re:C# (Score:3, Funny)
Well, y'know, I have to get my kicks somehow...
Re:C# (Score:2)
Re:C# (Score:2)
Yes, but we're not talking about Ada or COBOL.
Re:C# (Score:2)
Pro? (Score:2, Insightful)
Just wondering...
Re:Pro? (Score:2)
Re:Pro? (Score:3, Interesting)
Re:Pro? (Score:2)
Microsoft's System.Windows.Forms implementation currently sits on top of Win32. SWF is a small, small part of the
Mono is in the process of implementing their own System.Windows.Forms, which sits on top of whatever it is it sits on top of (Gtk? MacMono sits on top of Cocoa as I recall).
Re:Pro? (Score:2)
Thanks for the re-clueing.
Re:Pro? (Score:2)
At the moment, the only advantage to Java is Swing's cross-platform compatibility, but that is, as has already been mentioned, easily overcome with Mono and cross-platform GUI libraries.
Re:Pro? (Score:2)
The "core" .NET framework is cross-platform. WinForms is the largest part of code in the framework which is not easily portable, but that's to be expected.
Re:Pro? (Score:3, Interesting)
Re:Pro? (Score:2)
Re:Pro? (Score:2)
Grab some benchmark sources from here in http://shootout.alioth.debian.org/ [debian.org]. Run the C#/Mono code under the
Show your boss the tests and he may change his mind, our PHB did.
Enjoy.
Re:Pro? (Score:2)
Re:Pro? (Score:2, Insightful)
Re:Pro? (Score:3, Funny)
Re:Pro? (Score:2)
Ideally, this would be true. But this isn't just a language. It is a language (and a framework) developed by MS with the intent on killing the competition.
Killing them any way possible.
S
A proper review (Score:3, Insightful)
The author clearly listed what is, and is not, contained in the book, and also provided his opinion on how useful these various chapters were to him.
Hopefully future book-related-articles will try to provide atleast this level of information, as opposed to common "The book had alot of good stuff, but then some stuff was missing.".
More on-topic, I would say that in my experience I've never found these sorts of books particularly helpful, as anyone with software experience should have no trouble finding the information they need in the MSDN library, or on various other websites. Also, I imagine it would be difficult to find a developer who does not already have experience with a syntactically similar language.
I can imagine though, that this sort of reading might bring up questions (and answers) to questions that many developers had not yet thought to ask (primarily regarding CIL, GAC, etc), which could of course be helpful.
Why books still matter (Score:2)
While it's certainly true that you can find most or all of the material in books like this on-line, I think there's still a solid place for books in the programmer's world. Most of the on-line information is poorly organised, poorly written, poorly edited and often of dubious accuracy, and that's assuming that you can rely on it to stay in the same place and not to change anyway.
MSDN is a prime example: it used to be a great resource, but these days it's got so much bad content and so little organisation
Oracle (Score:2)
C# is almost good (Score:2)
After using C# for a while, I've come to the conclusion that, while still not a favorite language of mine, it has a fair bit of potential. My biggest problem was, as I recally, the aggrevating inconsistancy of the
LOL (Score:2)
Can you give an example of where you found a problem with say orthoganality or symmetry?
Re:Slashvertisements continue. (Score:2, Troll)
Re:Slashvertisements continue. (Score:1)
Watch this post get modded troll too.
Re:Slashvertisements continue. (Score:2)
And don't guys who have a double digit id automatically post at +5?
Re:Slashvertisements continue. (Score:2)
I hope your joking. Most people who would be interested in the book probably don't read and/or comment on Slashdot articles. This is a heavily anti-Microsoft, pro-Linux tech news site afterall. If you're a .NET developer, this is probably not the highest site on your priority list.
Re:Slashvertisements continue. (Score:5, Interesting)
I don't want to be stuck with one.. (Score:1)
Re:I don't want to be stuck with one.. (Score:1, Informative)
Re:I don't want to be stuck with one.. (Score:1, Interesting)
1) People still working at software houses that haven't migrated to Linux yet
2) The 'Microsoft is always the winner' crowd
My company has completely migrated to Eclipse, Java, Ruby, mostly on Linux with a few people still working on Microsoft OSes. To even suggest using a technology that locks us into a single proprietary platform would not be just a good way to get laughed at, it would most likely put your job in jeopardy here...
Re:I don't want to be stuck with one.. (Score:2)
Re:I don't want to be stuck with one.. (Score:2)
Back in 95 when I was at Amazon, I couldn't find ANY schools that taught just a basic PERL class so I grabbed a book and started learning it myself.
I
Re:I don't want to be stuck with one.. (Score:2)
The Mono project [mono-project.com] is actually gaining some momentum and it's been progressing [tirania.org] quite nicely [mono-project.com].
Novell would hardly have supported it this much if there was no interest in cross-platform
Re:I don't want to be stuck with one.. (Score:3, Informative)
C# runs on the
And last but not least, all of the patents that Microsoft has covering the
With open-source leaders
Re:I don't want to be stuck with one.. (Score:2)
Sounds like they are working REAL hard to work with the community.
You sir are completely ignorant for ignoring the fact that the MONO project openly admits that code built for LINUX will more than likely will not run on Windows. You also forget that MONO
Re:I don't want to be stuck with one.. (Score:2)
If they alter anything in the standardised bits of
You are correct that ECMA is a bit pants, but you didn't have anything to say againt the ISO standardisation process that was mentioned (although I was not aware that Microsoft were attempting to get
Re:I don't want to be stuck with one.. (Score:2)
They can easily change THEIR codebase, not make the new version a standard (hence deviating from the standard as they often do) and then build a converter so that it will convert
Re:I don't want to be stuck with one.. (Score:2, Interesting)
seriously people, try it before you knock it. for 99% of apps out there reduced development time
Re:I don't want to be stuck with one.. (Score:2)
LOL ok what community college art program pumped you out? For engineers, portability is always an issue just as scalability is as well. If the platform you are on won't scale anymore or y
Re:I don't want to be stuck with one.. (Score:2)
So your code runs on approximately 50-80% of all peoples computers (considering that Firefox now accounts for anywhere from 20-50 percent market share) as only IE supports VB script and activeX controls. Thats a winning combo for the company you are working for. I know I'd love to have that number of potential customers not be able to see my site.
And no, I would not put W
Re:I don't want to be stuck with one.. (Score:2)
Re:I don't want to be stuck with one.. (Score:2)
Than what competitors besides Java? C? C++? I don't buy that. Python? Perl? They're not meant for the same sort of thing. Besides, the LOC count is inflated by the language's brace conventions (new lines everywhere). I started a C# project last fall, and I have to say I'm pretty impressed with the language. It's like a neater Java.
Re:I don't want to be stuck with one.. (Score:2)
There is no VBScript in ASP.NET, at all. VBScript was the most used language for classic ASP, but C# and VB.NET (which is very different from VBScript) are the primary ASP.NET languages. There is VB.NET, but that's server side only...
Re:I don't want to be stuck with one.. (Score:2)
And do you know why all
Thus you are going to have 5 job openings in comparison to every 1 good open source job.
I built a LAMP architecture for a Microsoft vendor and when they got pressured to convert by MS, I told them it would take 2-3 developer to do what I did, that they would have to start paying through the nose for all the additional a
Re:I don't want to be stuck with one.. (Score:2)
Re:What's The Point? (Score:4, Interesting)
What makes it a worthless language is that it has all the bad parts of C++ and Java without any of the benefits.
Would you care to enlighten the rest of us which bad parts and benefits of C++ and Java you had in mind?
Re:What's The Point? (Score:3, Interesting)
really? Prove it.
Anecdotal evidence shows that MS shops exist and are hiring fiercely. I put a c# resume up a couple weeks ago and the phone rang in an hour and hasn't stopped ringing.
Outside of mom's basement, people use these technologies, despite what the slashbots would like to think. And from spending 48 hous with asp.net 2.0, despite some frustrations, I can tell you that this is a *very* powerful platform. The user management stuff is amazing. It
Re:What's The Point? (Score:2)
Re:What's The Point? (Score:2)
Re:.NET performance (Score:3, Interesting)
I have seen similar results with a 3D Perlin noise generator -- I was comparing Intel vs MS, vs hand coded SSE assembler. For pure entertainment I tried a -clr build and it was quite alot slower. Another interesting point was that the newer compilers (both Intel and MS) generated code that was close to or better than the SSE assembler implementation.
(For those wondering what Perlin noise is and what it's good for, check out http://freespace.virgin.net/hugo.elias/models/m_pe rlin.htm [virgin.net] )
Re:yawn (Score:3, Informative)
When
Re:yawn (Score:2)
Re:yawn (Score:2)
- indexers. If you have a hashtable, looking up a key in it is like this:
myHash["key"] = "value";
and you can overload these puppies so you can add crazy indexers into your structures like for example:
bu
Re:yawn (Score:2)
When Microsoft stole Anders from Borland, Delphi pretty much just because a
Re:yawn (Score:2)
To me, this seems like a craftsman saying "real men don't use safety devices".
Re:C# is pro like VB is pro (Score:5, Insightful)
But now there's all this hype about Ruby and Python, which are orders of magnitude slower than
It seems as though we must trade development ease for execution speed. This seems to be a good trade for the majority of applications: salaries are the #1 cost for most companies. Hardware is cheap. A two-server, 8-core Opteron cluster costs less than an experienced programmer makes in a month.
So if you're writing an trade-settlement server for the financial markets, where milliseconds mean millions, by all means get close to the hardware and use C and hand-tuned assembly. But otherwise, pick something further up the stack and spend a little more money on hardware.
Re:C# is pro like VB is pro (Score:2)
Actually, that's dumb.
Re:C# is pro like VB is pro (Score:2)
Re:C# is pro like VB is pro (Score:2)
Re:Got it - thanks (Score:2)
I leave figuring out just where the tipping points are as an exercise for the reader.
Re:Got it - thanks (Score:2)
And as Java becomes not only the most popular development language for general purpose work, but also on Sourceforge, it is quite amusing to see yet another 'everyone is wrong but me' post. Because obviously almost all of the IT industry has got it wrong, and consist
Re:Got it - thanks (Score:2)
The flaw in your thinking is that you assume that everyone except a few wise C++ supporters are unable to resist marketing, and can't make judgements for themselves based on years of experience of comparing C++, Java and C#.
Re:Got it - thanks (Score:2)
No - we both agree that you assume it, not that it is true
IT is mostly run by PHB's, who are largely unable to resist marketing, and definitely cannot make judgments for themselves based on years of experience with computer languages (because they have none).
I disagree. There is a phenomenal amount of IT that is based around small consultants and small developer groups. These are the people who are willing to try new technologies,
Re:Got it - thanks (Score:2)
Well, I am not shipping source code...
But I do thank you for calling Java a "platform", which it is (i.e. it is not "cross-platform", it is "cross-OS^H^Hseveral-OSes").
You are just playing with words here. If you are being that strict then C binaries are not cross-platform as you need libraries or Kernel services on the OS you are deploying on.
As for 'several OSes' - this is nonsense. You would find it hard to name a
this joke fell flat.... (Score:3, Funny)
Re:I don't get it... (Score:2)
Because sometimes the installation fails and you have to piss around trying to make it work.
Here's one possible problem [microsoft.com]. Sometimes you get something more like this [microsoft.com]. Note that he didn't get any useful information at all in the error message, but had to go digging through an obscure (and undocumented) log file in a hidden directory to find a description in o
Re:I don't get it... (Score:2)
Here's the one I encountered: I installed
This resulted in several sy