×

Uh-oh, it looks like your Internet Explorer is out of date.

For a better shopping experience, please upgrade now.

Distributed COM Application Development Using Visual Basic 6.0
     

Distributed COM Application Development Using Visual Basic 6.0

5.0 1
by Jim Maloney, Jim Meloney
 

The serious guide to VB6 multi-tier and Web development

With Microsoft's Visual Basic¨ 6 release, VB has come of age as an enterprise component development platform. If you're an experienced VB programmer, this book is all you need to leverage VB's new capabilities in business-critical multi-tier and Web application development.

Other books cover aspects

Overview

The serious guide to VB6 multi-tier and Web development

With Microsoft's Visual Basic¨ 6 release, VB has come of age as an enterprise component development platform. If you're an experienced VB programmer, this book is all you need to leverage VB's new capabilities in business-critical multi-tier and Web application development.

Other books cover aspects of distributed development with VB, but none are this comprehensive. Leading consultant Jim Maloney covers the waterfront: VB objects, COM, DCOM, networking, MTS, deployment, troubleshooting, and beyond. Understand multi-tier application architectures from the VB programmer's point of view; then master all these key skills:

  • Developing advanced Win32¨ applications using COM objects
  • Activex Data Objects, class objects, Activex Controls, and COM internals
  • Leveraging AutomationÑand adding Automation interfaces to your own applications
  • Making the most of Microsoft Transaction Server (MTS)
  • Embedding Internet transfer and Web browser capabilities in your applications
  • Using Activex documents for intranet development
  • Distributed application debugging and maintenance techniques that really work

Maloney presents authoritative comparisons of every Microsoft option for Web development; hard-to-find information on binary compatibility; a practical overview of ASP; and much more. If you're ready to build state-of-the-art VB software for the enterprise, you're ready for Distributed COM Application Development Using Visual Basic 6.0.

CD-ROM INCLUDED

CD-ROM contains thousands of lines of live code for Web, 3-tier, and 2-tierapplicationsÑincluding complete demonstration programs containing COM objects designed for easy reuse.

Editorial Reviews

Booknews
A book/CD-ROM package for serious developers of distributed applications, covering Visual Basic objects, COM, DCOM, networking, MTS, deployment, and troubleshooting. Explains multi-tier application architectures from the Visual Basic programmer's point of view, then offers instructions for every skill associated with Internet and distributed development in the Visual Basic environment. The CD-ROM contains live code for Web, 3-tier, and 2-tier applications, including complete demonstration programs containing COM objects designed for easy reuse. Annotation c. Book News, Inc., Portland, OR (booknews.com)

Product Details

ISBN-13:
9780130213433
Publisher:
Pearson Education
Publication date:
04/16/1999
Series:
Prentice Hall Microsoft Technology Series
Pages:
699
Product dimensions:
7.00(w) x 9.25(h) x 1.35(d)

Read an Excerpt

PREFACE: The day C. J. "Buck" Trayser of Digital Equipment Corporation suggested that I become certified to teach Microsoft's Visual Basic course was a major turning point in my career. The last time I had used the BASIC programming language was when I was working on an extra-credit project while pursuing a degree in Computer Science in 1976. The program was to run on a DEC PDP-8 and had to be saved on paper tape. I was trying to write a program that played backgammon, but ran out of memory after creating routines to make an opening move from an openings book and drawing the board on a character cell terminal. Now, nearly fifteen years later, I had considered myself a seasoned C and C++ programmer, and was on a contract assigned to teach VMS programmers how to call System Services using the C programming language. If Buck had not been such a good friend and respected colleague, I may have laughed at his suggestion. But he convinced me that becoming certified to teach Visual Basic 3.0 would be a good business decision - the demand for such training was skyrocketing.

I have since taken quite a liking to Visual Basic, and have used the language in developing corporate applications for many of my customers, often combining it with Visual C++. Its appeal stems from its many interesting attributes. For one, Visual Basic is amazingly easy to use, and is probably responsible for making many new programmers out of folks who were once "just" users. It is quite non-intimidating to approach, yet can end up challenging the most experienced programmer due to its rich feature content. It reminds me of what is printed on the box of MasterMind, a game in which one attempts to guess acolor code created by an opponent - "A minute to learn, a lifetime to master."

I thought of Buck again when Andrew Scoppa suggested that I write a book on developing distributed applications with Visual Basic. My affiliation with Andrew's company, UCI Software Training Centers, goes back over 16 years, and my respect for him is immense. As a quality provider of developer training, I take any suggestions Andrew makes quite seriously. Of course, at the time Buck suggested I look into Visual Basic, its features were not quite rich enough to develop distributed applications. But that has changed.

The Evolution of Visual Basic
As a language for developing Windows dialog-based user interfaces, Visual Basic is in its original element. As a teaching language, Visual Basic is ideal for illustrating not only Windows user interface programming concepts, but topics related to modular software development, code reuse, data scope, and even object-oriented design and programming techniques. For testing COM objects developed in C++ and ATL, Visual Basic offers the quickest solution.

The popularity of Visual Basic is no doubt responsible for its evolution from a graphical user interface development tool to an advanced, high-performance application development environment. Its ease of use, data access capabilities, multi-threading conformance, COM compliance, and native code generation capabilities now make it an excellent choice for the rapid development of the server-hosted business components of a distributed application. Having taught Visual Basic to developers for a number of years, I am beginning to see the language finally receive the respect it deserves. With over 20 years of software development experience and a degree in Computer Science, I feel qualified to author a book that treats Visual Basic with the same kind of respect.

About This Book
This is a book for serious developers of distributed applications. While it is, strictly speaking, an intermediate-level book, I expect the reader to be an experienced programmer. The main theme of this book is to get you started with the development of distributed applications using Visual Basic in the quickest way possible. I have provided complete examples of both 2-tier and 3-tier applications - these applications have thousands of lines of Visual Basic code. Complementing these complete applications are dozens of small demos that illustrate one or two important concepts. While instructions for running these demos are included in the chapters that follow, you should check the README.TXT file on the enclosed CD-ROM for additional and last-minute information regarding the use of the demos.

Probably the most unusual thing about this book is that I start with a chapter on deploying multi-tiered distributed applications. This approach has worked well in the classroom when I teach my courseware, and I expect the same results in this book. Since many of the demos used in later chapters depend on the sample applications being installed, it is essential that you read the first chapter and go through the installation procedures.

In Chapter 2, I discuss how to use objects from a Visual Basic application, using the sample video store objects provided with this book. Even if you are familiar with using COM objects in a Visual Basic application, you should read this chapter. The chapter may seem like a "show-and-tell" for an existing application, but it provides good examples of object design and documentation. In Chapter 3, I cover how to develop Win32 user interface applications that use COM objects. In addition to providing more examples of object use, the chapter is an excuse for me to introduce some advanced user interface techniques. In this chapter, you will learn how to use the Windows registry, display a splash screen, use OLE drag-and-drop, and use advanced user interface controls such as the tree view, list view, tab strip, and toolbar controls. My advanced Visual Basic students often ask to see how to use these controls and techniques in their programs.

I consider Chapter 4 to be the "paying your dues" chapter. In earlier days, programmers had to use APIs such as the TCP/IP socket API to develop distributed applications. The Windows platform SDKs and developer tools such as Visual Basic have made the creation of distributed applications much easier. If you are pressed for time, you can skip Chapter 4.

As an essential and fundamental introduction to developing the middle tiers of a distributed application, Chapter 5 is required reading. This chapter introduces Activex Data Objects (ADO), showing both their programmatic use and their use through the new ADO Data Control. Additionally, the chapter explains Data Environments and how to create programs that generate reports from a database.

Chapters 6, 7, and 8 are all about objects. First, I cover the use of class modules in Visual Basic, then move to their use in creating Activex Components. Finally, the internals of COM, the Component Object Model, are revealed in more detail than the typical Visual Basic developer would probably want - but more is better than less! If you are familiar with using class modules in Visual Basic, you can skip Chapter 6, but since some of the examples in Chapter 7 extend concepts presented in Chapter 6, it may be better to skim it rather than skip it.

In Chapter 9, I provide all you will need to know, and then some, about creating Activex Controls in Visual Basic. Although their development and use is, strictly speaking, not required in a distributed application, it is one of the most popular and requested topics of my students. If you wish, you can skip this chapter.

Interesting uses of COM are presented in Chapter 10, which covers automation fundamentals. In this chapter, you'll learn how to develop Visual Basic applications that launch and control other applications. You'll also learn how to add an automation interface to your own applications so that other programs can control yours. It's a short chapter, and one of my favorite topics, so I suggest you read this one.

A fundamental and hands-on introduction to DCOM, the Distributed Component Object Model, is presented in Chapter 11. Reading this chapter and performing the walkthroughs will give you a solid introduction to DCOM, as well as an appreciation for the features provided by Microsoft Transaction Server (MTS). The serious distributed application developer will want to read and understand this chapter.

Based on my experience, I am quite certain that many of you purchased this book for the topic covered in Chapters 12 and 13 - using MTS. For over a year now, I have often entertained myself by seeing the reaction of students when I ask, "How many of you are interested in learning about MTS?" Even people who have never raised their hands in public since the third grade eagerly raise one, if not both arms, often adding a vigorous circular motion. It goes without saying that you'll want to read both of these chapters.

One of the strongest objections to using a distributed approach to software development is the inherent difficulty in maintenance and troubleshooting - "How would you debug that thing?" In Chapter 14, I attempt to show you that it is not that hard to maintain a distributed application. Additionally, I provide information about the often-dreaded binary compatibility features of Visual Basic. This chapter is essential reading for the serious developer.

Entire books have been written on the topic covered in Chapter 15 - creating Internet interfaces using Active Server Pages (ASP). I have purposely kept this chapter light, because I never really bought into the concept of mixing a program (e.g., "script") with graphic content (e.g., HTML). Certainly there are thousands of developers who love this sort of thing, and are capable of creating interesting Web pages while also providing the programming behind them. The chapter goes a bit beyond getting you started, and I would consider it to be required reading, if only because chances are the existing Web applications you now have were implemented as ASP pages.

A far better approach to developing Web applications was introduced in Visual Basic 6.0, and is the subject of Chapter 16 - creating Internet IIS applications. This new approach allows an applications programmer to program applications and a graphics designer to design graphics. I highly recommend reading this chapter thoroughly.

In Chapter 17, I introduce Activex Documents, which many Visual Basic developers are likely to find as appealing solutions for intranet development. While their reach is limited, due to browser compatibility, if you don't need broad reach capabilities for your intranet application, Activex Documents are at least worth a look.

Wrapping up the book is Chapter 18, in which you will learn how to use the Internet Transfer and Web Browser controls. In this chapter, you will see how to embed browser capabilities directly in your Visual Basic application, and automate file transfers via FTP.

Acknowledgements
I have quite a list of people to thank for assistance in writing this book. First, I want to thank Buck Trayser of Digital Equipment Corporation for persuading me that learning Visual Basic would be a good thing. I must also thank Cheryl Jacobs and Tony Todd of M&M/Mars, great customers of mine, for asking that I do a course on Visual Basic 3.0. That course turned out to be the start of a total of eight courses I developed covering Visual Basic from its fundamentals to its advanced features.

Certainly this book would not have been possible without the help of Andrew Scoppa and Donna Thayer of UCI Software Training Centers in Stoneham, Massachusetts. As a senior consulting partner with UCI, I have enjoyed working with Andrew and Donna for nearly 16 years. In my opinion, they offer the best developer training anywhere.

Thanks to Dave Libertone, also of UCI, for his help on this book - as a published author himself, he was a great pathfinder for me. Dave provided me with a terrific opportunity to get my feet wet as an author when I wrote a short chapter for his excellent book Windows NT Cluster Server Guidebook, also published by Prentice Hall. In addition to being a great friend, Dave's technical advice is always as good as gold.

Claudio Ghisolfi and Kay Connolly, also of UCI, deserve a great deal of credit for this book as well. I want to especially thank Claudio for his patience and determination in examining the demos and walkthroughs presented in this book. Thanks to the excellent instructors who have used my courseware and provided feedback on errors, omissions, and suggestions, especially Karen Gallagher and Andy Macentee.

Thanks also to Art Kane and Olivia Kane of Ameriteach/UCI, Chip Hillman, Ed Stepian, and Debby Stepian of the Orange County Sheriff's Office; Mary Anne Vaughn of Microsoft Corporation; Melody Glover at the Kennedy Space Center; Michael Gorman and Dominic Vergata of Avon Corporation; Rick Wallace and Vicki Kyle-Flowers of Digital Equipment Corporation; Mike Meehan of Prentice Hall; Bob Barnes of Allen-Bradley; and Jim Slate, Bruce Kepley, and Ken Kelly. Also, I want to give a very big thank you to Robin at Sir Speedy.

Thanks to everyone at the Clearwater Research Group for providing the fresh academic and research environment that one needs to experiment with new technologies such as those discussed in this book.

The many students I have had the pleasure of teaching have helped a great deal with their comments and suggestions. In particular, I want to thank Connie Patton and everyone at Liberty Mutual; Rich Lagasse at Mathworks; Michael Joy at Sensitech; and Daniel Bagley.

Kasey, Tracy, Mary, and James, my children, deserve credit for their support. I wish to mention James in particular, a freshman at the University of Florida, for his fantastic job of data entry for the Mom-n-Pop Video Store database, and for providing me with the excellent opening paragraph of Chapter 16.

Lastly, and most of all, I cannot begin to thank Patty, my wife, for her support, encouragement, faith, and companionship during the development of this book and the courses that preceded it, and for all the errands, big and small, she ran for me, and for the excellent job she has done keeping the household running while I wrote this book. Without Patty, this book would literally have not been possible, especially since she helped me through a scare in which I thought the entire book was lost on my laptop - Patty found the hidden reset button on my ThinkPad!

Jim Maloney, MCSD, MCT
Honorary Research Fellow, Clearwater Research Group
St Petersburg, FL, November 1998

Customer Reviews

Average Review:

Post to your social network

     

Most Helpful Customer Reviews

See all customer reviews

Distributed COM Application Development Using Visual Basic 6.0 5 out of 5 based on 0 ratings. 1 reviews.
Guest More than 1 year ago
Includes information on receiving chapters updated for WINDOWS 2000 and COM+. Everywhere I go I find developers that want to know what multi-tier application development is all about. As far as I know, this is the only book written by a practicing developer and that covers all aspects of multi-tier application development. It's not just about the Internet and Active Server Pages, although there's plenty of that, along with a chapter on building Internet IIS applications. This book is really about building a complete suite of applications centered around a set of stateless, scalable objects deployed server-side under MTS - and doing it right (the only thing worse than a 'hack' is a 'distributed hack¿). In this book, I cover all the tiers of multi-tier application development, including one you may not have heard of - the 'client-side persistence layer' (or object model). I also cover advanced presentation layer (user interface) development. There are two complete chapters on MTS, and everything is backed up with examples, including a fully implemented application in both 2 and 3-tier versions - I don't think you'll find any book with more code examples.