|
|
|
| Home | Schedule | About Us | Links | Reviews | Extras | Jobs |
| Programming Visual Basic.NET |
|
A Review of Jesse Liberty’s VB.NET book Programming
Visual Basic.NET published by
O’Reilly 2003, by Someone called me the other
day knowing I have a bit of a computer book fetish and asked, almost in
desperation, “Hey, can you recommend a good VB.net book?” I might not qualify as a wizard when it comes
to code, but I definitely qualify as a code book junkie. As a teacher in another field once told me,
“It’s not important that you know everything.
It is important that you know where to find almost everything.” Some
good reference books are indispensable.
Over the few years that I’ve been involved in writing code, I have read
several books to add some power to data applications. OK, a bunch of books – some
better than others. One of my pet peeves is
trying to use a piece of code from a book and having it break, not because the
code was necessarily bad (although, sometimes it is), but because there was
some embedded reference to an external variable, module or library which caused
the snippet to be as unusable for the reader as a Particle Accelerator. I realize there is some difficulty proofing books
containing code because syntax is not easily checked. But, if the purpose of the book is to provide
a learning tool and not just make a buck, then communication and usability (for
people less knowledgeable than the writing Master) is important. With that preface: what book
did I recommend to someone needing a solid jump start into the world of VB.NET? I recommended Jesse Liberty’s book, Programming Visual Basic.NET. I’ve actually read two of Jesse’s books
(though the first may be an older version) and I have found them both to be
excellent. This book is divided into
three main sections: the basics of .NET
and the .NET framework; programming
examples; and .NET and the Common Language Runtime. I especially like the way he
explains things; he uses some great analogies.
In the section about marshalling, he is explaining the concepts of proxy,
sinks and channel; he uses the metaphor of Star Trek. “In Star Trek, Kirk was actually sent to
the planet, but in the .NET edition it is all an illusion. If you are standing on the surface of the
planet, you might think you are seeing and talking with the real Kirk, but you
are not talking to Kirk at all; you are talking to a proxy, or a simulation
whose job is to take your message and beam it up to the Enterprise where it is
relayed to the real Kirk. Between you
and Kirk there are also a number of ‘sinks.’ “A sink is an object whose job it
is to enforce policy. For example, if
Kirk tries to tell you something that might influence the development of your
civilization, the prime-directive sink might disallow the transmission. “When the real Kirk responds, he passes
his response through various sinks…and the proxy tells you. It seems to you as though Kirk is really
there, but he’s actually sitting on the bridge, yelling at Scotty that he needs
more power. “The actual transmission of your message
is done by a channel. The channel
works with a formatter, which makes sure the message is in the right
format. Perhaps you speak only Vulcan,
and the poor Captain does not. The
formatter can translate your message into Federation Standard, and translate
Kirk’s response from Federation Standard back to Vulcan….” (pg. 484) As you’ve noticed, he uses
some catchy humor that gives you a pleasant way to grasp the ideas and also
provides a better hook to remember the basics of the concept. All of that is nice. He’s not the first one to use either of the
communications tools mentioned above.
What really makes his books a cut above is the way he presents and
explains the code examples. His approach
is three pronged. First, he gives you an
overview of a new .NET concept, presents a section of code and the resulting
output. Then he will either modify the
module, or expand the scope and show you the result of this new set of
code. Next, he will go back and break it
down, explaining several lines at a time so you can follow along and understand
exactly what’s happening and why. Finally,
he prints the entire code block, so you can see it all without having to read
back over the last 10 pages trying to piece together various code fragments. Others have formatted their
writings similarly, but I have not found anyone who does it better. I also like the way he ends every block of
code: after the “End Sub, Function,
NameSpace, Class,” etc., he notes the name of the block like “‘GetSubDirectoryNode”. This helps to make his code more readable and
self-documenting as it may extend between pages and your code more functional as
it flows from screen to screen. Did I find any code
presentation errors? Yes, two that I
recall. However, because he presents
each line of code about 3 times, it is easy to discover where the oversight
occurred and adjust your copy accordingly.
I found no errors in the final code blocks. Again, the concern about
providing a professional learning tool is a cut above. In the preface he writes, “We have tested and
verified the information in this book to the best of our ability, but you may
find that features have changed (or even that we have made mistakes!) Please let us know about any errors you
find…” He then gives three different
ways to communicate your findings. This
indicates that he is aware that every good book, like every good program, has a
few bugs hiding in it that ultimately only time and use will cause to rise to
the surface where they can be corrected.
His interest in continuing enhancement speaks about someone who is in
this for the long haul and not just trying to scratch off some so-so code to
sell a book and make a few bucks. All in all, I think this is an
outstanding book for those who are interested in learning about the
methodology, structure and syntax of programming in VB.NET. With the arrival of .NET, Microsoft has
modified some of the rules. VB.NET can
now be considered a full-fledged development language and not just a convenient
RAD language. Mr. Liberty does a good
job of either getting one started on this new adventure, or expanding a
pre-existing knowledge base. As a confirmed code book
junkie, I would recommend this book to anyone interested in learning more about
the .NET framework. In fact, I already
have…several times…and I look forward to reading – and possibly reviewing – his
other books, which expand on the concepts of programming windows and web
applications in .NET |