Practical Standards for Microsoft Visual Basic .NET

Author: James Foxall, James D. Foxall
List Price: $49.99
Our Price: Click to see the latest and low price
ISBN: 0735613567
Publisher: Microsoft Press (31 July, 2002)
Edition: Hardcover
Sales Rank: 186,955
Average Customer Rating: 4.22 out of 5

Buy now directly from Amazon.com - Purchase this book, safely and securely from the largest book dealer on the Internet, Amazon.com

Customer Reviews

Rating: 3 out of 5
Somewhat rehashed VB standards book
After seeing the author jump in for a review, I decided I would add my two cents into this fray. While I do not agree with the 1 star "slam" that the author set out to counter, I think 3 stars may be pushing it, however.

There is a lot of practical advice in this book. While it should be obvious that a developer needs to set up templates without hard-coding and make all procedures perform very specific duties, we find that this is not the case in code. The book has quite a few good pieces of advice around the basic nature of programming. I will disagree with the author, however, on some points. For example, you should certainly minimize fan out (calling many procedures) for all but control functions, fan-in (multiple procedures using the same procedure) is a sign of very specialized functions, which he advised only two pages earlier.

This book has a whole chapter on naming conventions, using Hungarian. While this is not a cardinal sin, it should be noted that Microsoft has deprecated Hungarian in .NET. The inclusion in the book (chapter 4) suggests that the author has simply updated some of his material from his VB 6 book.

The suggestions for enumerators, commenting, looping and code flow are fairly decent and may help your coding efforts. Mr. Foxall falls a bit short on exception handling taking the tried and true route (see Richter's book for a better methodology). One item of contention is the idea that you handle unexpected as well as anticipated exceptions. In general, handle what you can and catch what you wish to log. Let the rest get handled on the UI to ensure the user does not get an ugly exception message. Most books on the market advocate catching everything, and then rethrowing the same error; what a waste of CPU cycles. In VB 6, you had to handle every exception, and pass it up the stack if you caught anything. In VB.NET, exception handling gives you the ability to catch those exceptions that you can handle or log for debugging a live application. Using finally, especially with objects with a dispose method, is a much better option.

I would agree with the 1 star reviewer on the coverage of modules before objects. Modules are a sloppy method of programming in Visual Basic .NET. They are placed in for VB 6 developers that miss their .bas files. On the other hand, this is not enough reason to kill the chapter, as some of the other advice in the chapter (2) is very useful.

A 2.5 rating would be a bit better as there is some bad advice in this book, but I have to choose between 2 and 3 and would rather give the author the benefit of the doubt. I hope Mr. Foxall has a chance to make a second version of the book that moves completely into the .NET paradigm, as it would be much more useful to developers.


Rating: 5 out of 5
Perfect for beginners and Managers alike
With a new way of coding VB comes new ways of making the environment more effecient for programmers.

This book is full of good advice about programming practices in the .NET world. The advice is sound and could be even used as an intro since the author goes through great pains to make everthing clear while concise.

Should you follow all the advice? Depends on you. I don't think you should follow anybody's suggestions without some critical thought but the suggestions here are definitely worth taking a look at and debating. VB.NET ain't VB6 and you should not code and organize your code the way you did in VB6. Foxall gives us some good, pratical advice on how to code. More importantly, he gives great advice on how to organize code (something programmers tend to be bad at doing).

The only surprise was the recommendation to use Hungarian notation. I find it amusing that people get so hung up on Hungarian notation (I happen to like it but would not miss it if I never used it again). It's just a way to try to making code more readable when using local variables. If you think it gets in the way, then you shouldn't use it. Other than that confusing suggestion (MS says don't use Hungarian but you ARE free to use or not to use whatever convention you like) the book is flawless.

This is a book that every team doing VB.NET development should discuss if not follow. Standards are important, most of the software building cycle is in testing, debugging and modifying existing code. His standards are something to draw on as we come up with the best practices for our particular solutions.


Rating: 5 out of 5
Coding excellence described again!
I have always been passionate about code conventions and standards. In my early VB days I was weaned on the likes of Stan Leszynski, Greg Reddick, and James Foxall. As I began to investigate moving from the VB6 world to the new .Net landscape, I was eager to find out what James Foxall would think. Especially since he had always been a strong advocate of Hungarian Naming conventions, and the new sounds out of Redmond were recommending against them.

James finds the perfect balance, maintaining the true spirit of the Design Guidelines for Class Library Developers found in the .Net Framework documents. The point of the non-Hungarian recommendation is "to encourage consistency and predictability in public APIs while enabling Web and cross-language integration." Of course conventions tied to a particular language's type terminology do not belong on the public interfaces of class libraries. Peter Vogel said as much in the VB6 days with his Object and Component title. (Looking forward to that VB.Net edition, Peter!) But for those who find HN a useful tool, they can still utilize it on the interior of their objects, and remain completely compliant with the .Net docs.

Outside this often "thorny" question, the rest of the book is as rock solid as ever, providing guidance and direction on everything from how best to design solutions, projects, and classes, to commenting code and laying out flow constructs. You may not agree with absolutely every recommendation, but you will be hard pressed to find anywhere a more complete standards guide for the .Net platform. Even if you choose not to utilize Hungarian Naming standards, you can benefit greatly from the other code suggestions James provides. It would be a pity to let that one aspect of code conventions prevent you from gleaning from the richness here.

Outside of all this, I have to say that James Foxall is one of the most personable developers I have had the pleasure to encounter. When I was seeking information on where to go with .Net, I contacted him directly because I couldn't wait for the book's release. He was most responsive to my questions, and helped me work through just what to think while moving to .Net. This one is on my desk to stay!

You will benefit greatly from giving it a read!

Kel

Similar Products

· Programming Microsoft Visual Basic .NET (Core Reference)
· 101 Microsoft Visual Basic .NET Applications
· Microsoft Visual Basic .NET Language Reference
· OOP with Microsoft Visual Basic .NET and Microsoft Visual C# .NET Step by Step
· OOP: Building Reusable Components with Microsoft Visual Basic .NET

Return To Main Computer Book IndexSearch Our Entire Computer Book Catalog