Essential .NET, Volume I 286
Essential .NET, Volume One | |
author | Don Box with Chris Sells |
pages | 400 |
publisher | Addison Wesley |
rating | 8/10 |
reviewer | Dan Maharry |
ISBN | 0201734117 |
summary | Great in-depth look at the CLR, but not for developers aiming to better their skills. |
After chapter one's history of the evolution from COM to the CLR, the book takes a bottom-up approach to the CLR, starting with a deep and detailed six chapter look into the core elements of the platform. Chapter two begins with assemblies, the programmatic units in the CLR, and the implications of their construction. We learn how they are versioned, loaded and built, and why therefore they may be written in as many .NET languages as required. There's real depth to the material here -- you really do touch the bottom of the abyss, so to speak -- but it's countered with occasional levity that keeps this a readable book instead of a dense reference manual. The same is true of all the text. To wit, there's even some irony; "To allow old dogs to avoid learning new tricks, there is finalization," he declares in the next section on the Common Type System.
It's here that we discover how different types and interfaces are distinguished from themselves and from one another, and how their variations and relationships are kept separate by the CLR. It's refreshing to note that the proverbial big picture is never very far away from the commentary. After taking time to explore the avenues for types and interfaces, Box notes that types themselves aren't very interesting until you start working with instances of those types, and we're off again working through another thirty pages on how object instances preserve a sense of identity, how they are cast into other types and how they incorporate themselves into the concepts of reflection and metadata. Only then do we look at the actual lifecycle of an object, its creation, modification and disposal. The attention to detail is great, and there's little ambiguity in the text, but with that comes a slowness to this section that may leave readers frustrated.
One recurring theme of the book is the idea that while there is a very proper way and set of rules for doing things, there will always be circumstances in application development which call for exceptions to be made to those rules and made possible by .NET. This is true at a small scale and, as chapters six and seven prove, at a large one too, covering as they do how the CLR calls and runs methods first on a single machine and then over a wire. How does the runtime treat methods called explicitly, implicitly through a delegate, asynchronously, or as a combination of the three? How do remote calls and types bridge whatever gaps they must cross and activate the remote objects and methods they're targeting? The answers are here.
Essential .NET reflects Box's pride in .NET and also his slight dissatisfaction with it. You can sense that while he knows .NET version 1 is an improvement over COM, it's not as good as it could be and things are still be done in v2 and beyond. Chapter eight's look at AppDomains and in particular its discourse on threading within and through AppDomains is a good example of this. Meanwhile, we finally come full circle in our investigation of the CLR, seeing how the assemblies we built in Chapter 2 are resolved and executed within AppDomains. Exceptions to rules being included, we also see how objects references are marshaled across AppDomains for inter-application communication if this is required.
The last two chapters look at wider topics around the CLR in as much detail as they can for topics which have entire books dedicated to just them. Chapter nine covers code-access security and chapter ten topics which are not of the CLR but which be can be addressed from within a .NET application: explicit memory management, using p/invoke to import COM methods from DLLs and so on. Both are concisely written and to the point, but unsurprisingly leave you feeling like there's more to these topics than is covered here. Chapter nine is a great and clear introduction to code-level security, for example, but you'll get a lot more out of Michael Howard's book, Writing Secure Code if you want to know more.
Essential .NET isn't an easy read but everyone should try to read it at least once. Focusing on the CLR itself and how it deals with the components of an application means that it truly is aimed at the community of .NET developers as a whole (including those building and using alternate implementations of the CLR). The provided code examples are expressed in C#, but this is incidental, really, and won't stop VB.NET, J# or any other developers getting a great deal out of this book.
This is a dense, complex volume that requires a fair amount of effort to understand and use, and to some extent this may put people off. On the other hand, it is so packed with great nuggets of information that they may be inspired to keep reading. Of course, there is the question of whether this book will actually improve your .NET development skills, but in riposte, you can honestly say that no volume details the CLR and its potential so well, and that this alone is worth the book's cover price.
You can purchase Essential .NET, Volume One from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
Essential .NET? (Score:2, Funny)
(Thank God I got that joke out of the way.)
Re:Essential .NET? (Score:2)
Re:Essential .NET? (Score:5, Insightful)
Re:Essential .NET? (Score:2)
note: the above is not to be taken seriously
Re:Essential .NET? (Score:2)
It's like saying "Tell you what, you convince McDonalds to give their secret burger recipe to Burger King, and I just might start eating there." Umm, no, you won't,
Re:Essential .NET? (Score:2, Insightful)
In January of 2003, SQL Slammer took out over 30,000 machines running SQL (alot of them unknowingly thanks to Microsoft). Even Mi
Re:Typical Slashdot moderation (Score:2)
Re:Umm, no. (Score:2)
This is just a resounding voice saying 'no thanks'
It *is* cross platform! (Score:2, Funny)
Re:It *is* cross platform! (Score:2)
That's hardly Microsoft
Re:It *is* cross platform! (Score:5, Informative)
On top of that Mono implements plenty of class libraries: both the non-standarized class libraries from Microsoft, as well as our own universe of class libraries that take advantage of Unix-specific features.
Here is a link: Mono Map [ximian.com] (abridged).
Miguel.
Re:It *is* cross platform! (Score:2)
They do not.
I (and probably my boss, clients etc.) do not care what non-standard parts of Dotnet have been cloned. As the parent says, these are not covered by standards and are potentially at risk from patent claims.
Unfortunately, your web site [go-mono.org] is still misleading people into thinking that Mono is (now) an implementation of the Dotnet APIs. It is this kind of deceptive statement that is annoying people.
Re:It *is* cross platform! (Score:2)
Re:It *is* cross platform! (Score:2)
So the ECMA patent-free parts (Microsoft's true intentions not withstanding) are Cyan. What are the Red and Green parts?
Re:It *is* cross platform! (Score:4, Interesting)
The green parts are components that we have developed outside of the Microsoft world (they do not have a Microsoft equivalent). Whether there are patents or not is uncertain as they are also wrappers for existing technologies (Gtk, Mozilla, etc). Microsoft would certainly not have a Mozilla# patent
Miguel.
Slashbot book review. (Score:3, Informative)
Everyone? (Score:4, Funny)
Get it? C-sharp? Because he uses knives...and they have to be sharp?
The important thing is that I am happy with me.
Very Punny! (Score:2)
Yeah, I think that one kinda fell flat.
Sharp. . . flat. . . get it. . ?
Oh, nevermind, I'm going home.
Nice review (Score:2, Informative)
The first couple of chapters do rehash the metadata structure (that is, assemblies, modules and members), which an
Re:Nice review (Score:2, Interesting)
Re:Nice review (Score:2, Funny)
CLS? That's easy.
Skip this book (Score:3, Funny)
Re:Skip this book (Score:3, Funny)
uhh (Score:4, Funny)
Well let's not get delusions of grandeur here...
Re:No kidding (Score:5, Funny)
That would be competence [reference.com].
No more spoilers in the reviews! (Score:5, Funny)
Don't Flame So Fast (Score:5, Insightful)
I'm with the rest of
When you write a
Go ahead and flame me now.
Re:Don't Flame So Fast (Score:5, Informative)
I also like
but your statement is not quite correct, unless I am not fully informed which is definately a possibility.... I have been finding more and more differences between programming for
Event Based Page Model (Score:5, Informative)
Each ASP.NET page is an instance of the "Page" class, or one of its sub-classes. The "Page Lifecycle" defines the various phases that apply each time a page is accessed. The "Page" is simply the top-level node in the "control tree", and each control in the tree does the following for all its children (recursively):
1. initialization
2. handle postback data
3. state management
4. handle events
5. pre-render stuff
6. render to HTML (or whatever)
7. clean up
Most of your code will pertain to numbers 4 and 5 above, if done correctly.
It's not immediately intuitive, coming from a Web App developer's perspective, but does provide a good general structure and mechanism.
In addition, each Page is split into its actual class (the so-called "code-behind page"), and its representation as markup (the
ASP.NET provides a robust programming model for web applications, but it also provides a lot of built-in mechanisms for doing common stuff. Authentication, Authorization, Caching, DataBinding, XML, conditional rendering, templating, data access through ADO.NET, internationalization, Debugging and Tracing utilities, and more.
That said, I find the event-based programming model quite difficult to master. If used improperly, you can end up running the same code many times; for instance of you populate a given control (say a dropdown) from a database, and do so in response to many different events. Better to flag things and then fetch just once from the DB prior to rendering.
Thoughts?
PS: At the moment, you can't mix multiple languages (C#, VB.NET) within a single Web App.
Re:Event Based Page Model (Score:4, Informative)
This is not a new invention of .NET, as these concepts go at least as far back as Java Server Pages. Every JSP page implements JspPage (or HttpJspPage), and follows roughly the same lifecycle. The container typically provides that JspPage class, though a developer can roll his/her own, as well. (Before people jump all over me, yes, in the Java world, people rarely put the page as the top controlling object, preferring to use a Servlet as the controller and the JSPs only to render the final view.)
This is not to take anything away from .aspx -- some of it is quite nifty -- but the basic concept of a "Page" object and "Page Lifecycle" is not new to .NET; Java has had it for a while, and I am sure some geek out there will point out even older examples.
Re:Event Based Page Model (Score:3, Interesting)
Anyone in the J2EE community looking for similar event-based behavior should be keeping an eye on JavaServer Faces [sun.com]. One big problem is getting it to work on the existing JSP architecture, though, as JSP still has no server-side component model.
Re:Event Based Page Model (Score:2)
No, and I'm not sure why you'd want to exactly, as it would be better perhaps just to pick one language and stick with it. However, if you had a need to use both, you could encapsulate say C# code behind a web service (simple to do in
Let us flame it slowly then... (Score:4, Insightful)
That said, ASP and VB.NET are not the answer. Using non-portable languages to write web apps is a very bad idea.
It would take me months to write a C/C++ cgi app
Where are you from, 1994? If you really need unmantainable spagetthi like ASP, you can use PHP (portable across all known platforms), but you have Java (Tomcat) and Python (Zope) that allow you to use very high-level structures with a higher productivity (in my experience) than any Windows-only solution. No one writes C cgis anymore...
Re:Let us flame it slowly then... (Score:2, Interesting)
Statement by assertion with no supporting evidence.
C# is a ratified standard.
The other languages you suggested are not.
Maybe you should rewrite your statement "Using languages that I don't like because of religious bias is a very bad idea." It would be more honest.
Re:Let us flame it slowly then... (Score:2)
I couldn't care less for a Windows-only ratified standard. It is not religious if my com
Clarifying... (Score:2)
I find Java in the server specially productive, since I can use the whole library with very little concern for the web-specific code in the front (ie, I can easily isolate the view from the model and the controller). The same goes for Zope (with a little more work). But I agree that Perl and CPAN may also be good.
Re:Let us flame it slowly then... (Score:2)
Re:Don't Flame So Fast (Score:2, Insightful)
believe me, if you've used both, you'll catch the striking similarities.
Re:Don't Flame So Fast (Score:2)
And what can you do with this that you can't do with JBuilder or WebLogic Workshop? You do realize that these tools can create portals, workflow and web service systems using drag-and-drop? I'd be interested to see if all this was really in VS.NET.
Re:Don't Flame So Fast (Score:2)
Re:Don't Flame So Fast (Score:2)
That is, if you stick to coding only calls that have been documented. :-)
(The other complaint for me is the relative sizes of developer communities; out here, while there's always someone around offering help in Java, you have to persistently google to solve your .Net queries)
Re:Don't Flame So Fast (Score:3, Informative)
Apart from MSDN, I often find answers to my questions at gotdotnet.com, codeproject.com, www.dotnet247.com and the microsoft newsgroups. Brad Adams' and Chris Brumme's are very helpful for the low-level aspects of the
MS hijacks the name of a top-level domain... (Score:2, Informative)
I never did find out what "Microsoft BackOffice" and digital_nervous_system were supposed to mean. My guess is that I won't need to find out what
Actua
Box on .NET (Score:4, Informative)
You can sense that while he [Don Box] knows .NET version 1 is an improvement over COM, it's not as good as it could be and things are still be done in v2 and beyond
This could be an interesting read. The reviewer's comment on Box's impression of .NET confirms the wisdom of my decision not to be an early adopter of .NET, if I take it up at all. Although Box is a MS-centric developer, he discusses the issues involved in app development with candor as well as detail.
Re:Box on .NET (Score:2)
Structure overload (Score:3, Insightful)
A proprietary structure just ends up reinventing a lot of database wheels like concurrency, backups, change logging, etc., and has unfamiliar access protocols, often mirroring the "navigational databases" of the 1960's.
I know, some of you say that I have an "if all you have is a hammer, then everything is a nail" view about RDBMS (relational databases), but when structures become non-trivial, then nothing beats a RDBMS in most cases. If it walks like a database and quacks like a database, then perhaps it is time to use a database.
i agree with you (Score:2)
Bloated registries with old, invalid data are one of the main places to cause windows problems. I find left over keys after doing the manufacturer uninstall all the time. Tying the registry record to the core application record in the new filesystem seems like a simple way to enforce referential integrity here at the one place where the lack of it causes so many headache
Monster Tech-en developer demand tag team match (Score:3, Interesting)
Java Vs C#
Java and C# = 239 [monster.com], C# = 736 [monster.com] OR 497 for C# alone, Java = 4596 [monster.com] OR 4357 for Java alone, Java Wins outright 4357 to 497.
In fact Java is more in demand than C++ (3081) [monster.com] or Visual Basic ( 2252 ) [monster.com]
J2EE Vs .NET .NET = 23 [monster.com], .NET = 1392 [monster.com] or 1369 for .NET alone,
J2EE = 2120 [monster.com] or 2097 for J2EE alone,
J2EE wins by points 2097 to 1369.
J2EE AND
According to theory, .NET should be picking up the bulk of Visual Basic Developers...
.NET WITH Visual Basic,
Visual Basic AND J2EE AND .NET = 5 [monster.com],
Visual Basic AND .NET = 58 [monster.com] or 53 alone,
Visual Basic AND J2EE = 168 [monster.com] or 163 for J2EE alone,
J2EE wins by points 163 to 53.
J2EE With Visual Basic Vs
In comparison to the number of Visual Basic based jobs, there is very little demand for the shift towards the backward incompatable Visual Basic.NET [monster.com].
According to theory, C# should be picking up the bulk of Visual Basic Developers...
Java With Visual Basic Vs C# WITH Visual Basic
Visual Basic AND Java AND C# = 65 [monster.com], Visual Basic AND C# = 250 [monster.com] or 185 alone, Visual Basic AND Java = 696 [monster.com] or 534 alone, Java wins by points 534 to 185.
According to theory, C# should be picking up the bulk of the C++ developers...
Java With C++ Vs C# WITH C++
C++ AND Java AND C# = 149 [monster.com], C++ AND C# = 311 [monster.com] or 162 alone, C++ AND Java = 1242 [monster.com] or 1093 alone, Java wins outright 1093 to 162.
Results not suprising. Java is the incumbant. (Score:2, Informative)
Lets revisit these results in two years.
Considering M$'s deep pockets and commitment to
How is this flamebait? (Score:2)
I sincerely hope I get a chance to meta-mod these...
I really do
Java is also in trouble (Score:5, Interesting)
Both Java and
The solution? Don't use either. Mono may be a way out because, in addition to a
But if you want to avoid the issue altogether, just don't use either Java or C#--there are plenty of good alternatives around. In fact, most software these days should probably be written in languages like Python, with a few core C/C++ libraries for numerical and other high-performance subroutines.
Re:Java is also in trouble (Score:3, Informative)
Perhaps more relevant to the Linux users here is the huge growth in Java on Linux due to the commercial (but generally free) JVM implementations from BEA, IBM and Sun. This is what places Java-on-Linux head and shoulders above Mono.
I agree, however, that there are valid alternatives to both, and people with a desire to do something creative rather than
Re:Monster Tech-en developer demand tag team match (Score:4, Interesting)
I'd expected a search for COBOL to turn up a lot of hits, perhaps even more then Java. :) I was pleasantly surprised to find that COBOL only scored about 620 total hits. I don't know what perspective that adds, but it actually outweighs the C# positions.
Considering... (Score:4, Insightful)
Right now 'Java' is the en vogue thing to ask for on a resume. C# hasn't reached that level yet. It's still a buzzword to the HR types.
Re:Monster Tech-en developer demand tag team match (Score:2, Funny)
Just kidding...
Also available on safari (Score:2, Informative)
Ah yes, time for the bi-daily B&N advertisemen (Score:2, Funny)
Essential Mono (Score:3, Interesting)
What I would like to see is a book on Mono, the core ECMA C# APIs, and the Mono-specific APIs like Gtk#. Is anybody working on that?
Re:Essential Mono (Score:5, Informative)
But everything you learn in Don's Essential
Miguel.
Re:Essential Mono (Score:2)
(Assuming of course that they've overcome the shock of discovering that the bulk of Dotnet isn't published, specified or standardized at all, despite all that hype about ECMA).
Contrast this with Java, where we get a proper set of specifications and test suites, or with Perl/Parrot, where we get to write our own!
Isn't imitation the sincerest form of flattery? (Score:5, Insightful)
Re:Isn't imitation the sincerest form of flattery? (Score:2)
It's good that C# is competition, in some domains, for Java, and seems to have pushed Java's evolution forwards (new features for Java 1.5 are similar to things in C#).
In th
Re:Isn't imitation the sincerest form of flattery? (Score:2)
I take umbrage with people making claims about "standardization" which turn out to be false, so tempting me to invest in a platform that will lead me into either
a) a half-baked solution than doesn't give me true portability (and it only takes one missing API to cost me bigtime)
or
b) causing me to infringe patents owned by Microsoft, which were expressly designed to prevent cloning and are likely to be enforced.
We already have two excellent open-source VM projects (Perl and Kaffe), and a wealth of
When is MS coming out with the .ORG framework? (Score:2, Insightful)
Ummmmm (Score:2)
(Score: -5, Please pass the doobie over here )
Good book. (Score:5, Informative)
This book covers the technicalities in the
Compiler writers, framework developers and those who need to get the most out of the framework will be interested in this title.
I can not recommend this book enough. Don has done a fantastic job. It helped the Mono developers understand the low-level technical features of the framework.
Miguel.
Visual Studio Song (Score:2)
Mouse one down and push it around 98 little buttons to push
(repeat 98 times)
There are no more little buttons to mouse on my screen no more buttons to mouse. My mouse it is hung and just for some fun I'll cfdisk the whole fucking thing!
Response to blind criticisms of .NET (Score:4, Interesting)
The downside is that while
Personally, even though I think Microsoft is correcting a lot of past mistakes with
Essential .NET? (Score:2, Funny)
Hmmm, Essential
What's next? (Score:2)
Essential
So what's next, Essential
Re:No interest (Score:5, Insightful)
I don't like many aspects of the Microsoft Way either, but MS projects pay the bills better than OSS projects for some reason for me. If I was well-to-do, I might subsidize my slide over to OSS. But the tech economy is a wreck right now and I take what I can get. The demand for
Re:No interest (Score:2)
I don't like many aspects of the Microsoft Way either, but MS projects pay the bills better than OSS projects for some reason for me. If I was well-to-do, I might subsidize my slide over to OSS. But the tech economy is a wreck right now and I take what I can get.
Almost every job posting I see out there for Java has some kind of OSS technology attached - be it Linux, Apache, Tomcat, even JBoss. Things like Struts are also gaining leverage out there.
If you know Java/J2EE and hav
Re:No interest (Score:2)
it takes too much damned code to do the simplest things, but that is another story.
That's a side effect of OO, but if you're proficient with Java I don't think it's as much of an issue. However, well written OO is great in a medium-sized and larger apps.
I don't know much about PHP, although as much as I feel that .NET i
Re:If it's the essentials... (Score:2, Informative)
Re:If it's the essentials... (Score:2)
Re:If it's the essentials... (Score:4, Funny)
"Essential
Re:.Net is Java! (Score:2)
Re:.Net is Java! (Score:5, Insightful)
Re:.Net is Java! (Score:4, Interesting)
Re:.Net is Java! (Score:2)
Re:.Net is Java! (Score:2)
Re:*they dont* have any (Score:2)
Talk about pathetic misinformation, the referenced URI does NOT show that there are no patents on C#. I have seen patents that apply to XML APIs they have written, specifically designed to prevent interoperability for basic things like DOM-like functionality.
The only thing that the referred-to FAQ points to is that they have stated that some parts of .NET will be available on a royalty-free basis. This is a far cry from being not patented, as it still typically prevents GPLed implementation, may prevent
Re:.Net is Java! (Score:3, Insightful)
The ironic thing is that *today* the fastest fully open source Java VM that can run Eclipse is Mono plus IKVM.NET (the open source Java VM that generates CIL code on the flight
Miguel.
Re:.Net is Java! (Score:2)
My guess is that the reason that Kaffe is not particularly fast is that there are already three very high quality JVMs freely available for Linux.
In fact, I know that it is the existence of these VMs that are enabling a large number of major companies to move to Linux.
It would be interesting to compare the collective investment in Java-on-Linux to that of Mono-on-Linux. My guess would be about 6 orders of magnitude in favor of Java, but of course this might be slightly
Java is a standard (Score:5, Informative)
Have a look at www.jcp.org if you want to see a more developer accessible standards process.
Re:.Net is Java! (Score:2)
C# is not an alias for Java(tm), it's an embraced extension of several proprietary languages that was then ratified as a standard.
The CLR is not a JVM. Maybe you might liken an AppDomain to a single JVM.
Web Services are merely classes invoking one another utilizing a STANDARD based upon XML. And if you don't see/need the utility derrived therin,
Re:.Net is Java! (Score:2)
My experience is largely in
There is a difference (Score:3, Insightful)
Web services don't have to be anything other than classes interacting through XML - isn't that enough? That's a significant advance in code re-use that I see, much more important than obj
"Innovative"-right... languages for the java vm: (Score:2, Informative)
Sorry to bring you the news, but you really should get out more
http://grunge.cs.tu-berlin.de/~tolk/vmlanguages.ht ml [tu-berlin.de]
Among the most interesting of those you find
Parent is also Clueless! (Score:3, Interesting)
If you "don't program in Java or C#", refrain from talking from the top of your head about something you can't know.
And "all this platform compatibility is a moot point" only in your dreams. Java is far from perfect but its cross-platform enough to make it a far superior platform for web and network development in general. Only the very young and inexperient amateurs mock the importance of being able to choose any system running
Really? (Score:2)
Did you grossly miscalculate the processing needs in the requirements phase? What's the deal?
How often you do not? (Score:2)
Re:Parent is also Clueless! (Score:2)
So you think it's less naive to believe that you can "choose any system running on any hardware for you applications" then to question whether this is in fact possible? You must have a different definition of "naive" then I do.
Today, I'm also Clueless! (Score:2)
Nevertheless (Score:2)
Re:While this review is not without merit (Score:2, Funny)
Re:Thank God for .DOT.NET (Score:3, Funny)
Does he have to sign an SCO-like Non-Disclosure Agreement to do it?
Parent Post is no troll! (Score:3, Interesting)
Re:Fritz chips for your info how it works (Score:2)
The bad parts of the net can and are being stopped by other means. By keeping info open the bad guys will have no where to hide!
Impliment this system and y
Re:Essential .NET (Score:2)
"Essential
Moderators say:
40% Offtopic
40% Funny
20% Overrated
60% Fanboy