The magazine of the Melbourne PC User Group

Scarcity of Visual Basic Internet programming books

Given the importance of the World Wide Web in both business and consumer computing, it's odd that relatively few books have been written that focus solely on the subject of Visual Basic and Internet programming.

Given the importance of the World Wide Web in both business and consumer computing, it's odd that relatively few books have been written that focus solely on the subject of Visual Basic and Internet programming.

And while it's true that a large percentage of Visual Basic programming books do include at least some material about developing VB applications for the Internet, it's usually only one or two chapters that frustratingly leaves you wanting more information.

However, one new book that offers a comprehensive coverage of this aspect of software development is Carl Franklin's Visual Basic 6.0 Internet Programming.

Understanding Winsock

As Franklin points out in the foreword to his book, Windows programmers use the Winsock library of functions and routines to process information from the Internet and Web.

However, there are a couple of different ways of using the unique features of the Winsock library.

The first approach is to call the Winsock API (Application Programming Interface) directly from within your Windows programs. The alternative is to take full advantage of the programming construct that has made Visual Basic one of the most popular development environments ever devised, that is, its use of controls.

Accordingly, Franklin's code uses a Winsock control for communications (see "Contents of the companion CD-ROM" below, for more information about this control). He believes the extra response time resulting from using such a control, as opposed to direct calls to the API, only amounts to possibly a few more nanoseconds, if that.

But the control's use is more than compensated by the convenience and ease of use it offers. He suggests that if time does become a major concern in your VB Internet applications, the best solution for performance is to find an Internet Service Provider that offers a faster connection.

Getting started with Internet programming

The opening chapter of Visual Basic 6.0 Internet Programming provides an explanation of protocol stacks and the OSI (Open Systems Interconnection) Reference Model. Other topics covered in this section of the book include the TCP/IP (Transmission Control Protocol/Internet Protocol) model, IP names and addresses, IP ports, name resolution, and sockets (in the simplest of terms, a socket contains an IP address and port).

And while it's true that you can skip over this part of the book if you're only interested in the practical aspects of Visual Basic Internet programming, Franklin does point out that "knowledge of these concepts can help you understand where your Visual Basic application fits in the big picture".

Other topics covered

In the remainder of the book, the sorts of topics covered include a comprehensive discussion of Winsock programming; simple protocols (NTP, WHOIS, FINGER); Usenet news; electronic mail; FTP (File Transfer Protocol); different techniques for accessing the World Wide Web; an introduction to Visual Basic objects; server-side programming; Microsoft Internet Information Server; and the creation of custom Winsock client/server applications.

Contents of the companion CD-ROM

The companion CD-ROM comes with an unregistered version of the Dolphin Systems' dsSocket ActiveX control that's used for Winsock programming. Using a control like this provides all the precision needed, but just as importantly, frees up developers from having to cope with learning how to program using the Winsock API.

Other contents on the CD-ROM include all the sample code used throughout the book, along with comprehensive Internet Protocol Documentation consisting of all the RFC (Request for Comments) documents up to the 24 January 1999.

Intended readership

So what type of reader is "Visual Basic 6.0 Internet Programming" aimed at?

I believe that if you're just starting out with VB, it would be a good idea to read some introductory texts before tackling Carl Franklin's book.

However, if you feel reasonably comfortable moving around within the Visual Basic development environment, or you've already written a number of programs, reading this book can help you to develop expertise in an entirely new area of VB programming. And that, of course, makes you a more marketable proposition if you're a professional programmer.

It also means that serious VB hobbyists who read it can extend their programming pastime to write applications that incorporate facilities such as email; Usenet news; File Transfer Protocol; and other aspects of World Wide Web access.

Related Web sites

As well as a companion CD-ROM for this book, there is also a companion Web site which contains a knowledge base. Franklin has established it as an effective way of dealing with any issues arising out of reading the book, as well as for providing answers to questions about the sample code used throughout the text. Point your browser at http://carl.franklins.net/vbip/

Another Web site definitely worth checking out is "Carl & Gary's Visual Basic Home Page" located at http://www. cgvb.com/ (not surprisingly, the Carl referred to is Carl Franklin). If you're serious about VB programming, you should have this site listed in the favourites or bookmarks section of your preferred browser. And make sure to drop in frequently to keep up with the latest developments with Visual Basic.

Conclusion

Visual Basic has changed forever the way both professional and hobbyist programmers write their Windows applications.

With the popularity of the Internet, and in particular, the World Wide Web, showing no signs of abating , it makes sense to extend your VB knowledge now to write VB Internet applications.

The guidance, tips, and real code examples provided make Carl Franklin's Visual Basic 6.0 Internet Programming an excellent place to start.

Carl Franklin
Visual Basic 6.0 Internet Programming
ISBN: 0 471 31498
430 pages plus companion CD-ROM and Web site
Published by John Wiley & Sons, Inc.
Distributed in Australia by Jacaranda Wiley Ltd
RRP: $85

Reprinted from the July 1999 issue of PC Update, the magazine of Melbourne PC User Group, Australia