Foreword

1998 marks the fifth anniversary of the first public appearance of the Component Object Model. Five years after the fact, no two people completely agree about what COM is, exactly. Some view COM as a superior way to export functionality from DLLs that has at least some chance of withstanding two or three production cycles without producing absolute chaos. Some people view COM as a communications technology that can vastly reduce the cost of developing distributed applications. Others simply view COM as that thing that makes MTS work. Still others view COM as a confusing mess of ill-documented technologies that seems to exhibit no regular structure or form, much like a mural painted by five different artists on five different canvases who never looked at each other's brushstrokes until the final work was stitched together. While there is merit to each of these viewpoints, none of them capture the essence of what COM is really about: that is, tough love.

The most fundamental principle of COM is the separation of interface from implementation. If the interface is sufficiently well-defined (that's the tough part), the implementation is free to do whatever it chooses in a consequence-free environment of love and acceptance (that's the love part).

Being a COM developer implies collaboration with others. As in any other relationship, each party has his or her own habits, preferences, and annoying mannerisms. For a relationship to be successful, each party has to set boundaries so that everyone in the relationship knows what is and isn't acceptable. This is often done via the unspoken social contract that we all live by, but in more intimate relationships, the parties tend to explicitly verbalize their likes and dislikes to let everyone know what it takes to make them happy. In COM (where all relationships are intimate), we set these boundaries as interfaces in IDL.

Of course, having boundaries implies that individuals might have to change their behavior somewhat to avoid completely offending the other parties involved. If the required changes in behavior prove to be too much to bear, the relationship is doomed. If one party cannot agree to respect everyone's boundaries, the collaboration with that individual will be difficult, at best. This applies as much in COM as it does in everyday life.

COM has flourished largely because it is so adaptable to a broad spectrum of programming styles and applications. Part of COM's success lies squarely at the feet of the Visual Basic programmer. More than any other development culture, the Visual Basic world understands the value of components and reusability. Unlike many of their C++ counterparts, Visual Basic programmers see that the whole is often greater than the sum of its parts. C++ programmers (myself included) tend to think that the goal is to build infrastructure. Visual Basic programmers think that the goal is to solve problems. Granted, infrastructure is important, but the pragmatism of the average Visual Basic programmer is refreshing when compared to the machismo-laden C++ culture in which I have spent the last 10 years of my life.

In this book, Ted has captured the essence of COM and MTS programming and has written perhaps the most accurate and approachable text on MTS programming available today. Rather than simply parroting the SDK documentation and proclaiming that "stateless objects equal scalability," Ted has looked at the COM and MTS programming models and distilled the fundamental principles into a very readable (and short) text. In an age when authors seem to get paid by the pound, this book is a breath of fresh air. I am sure that this book will help many more developers achieve their personal COM and MTS epiphanies than any of its predecessors.

Don Box
Redondo Beach, California
August 1998

http://www.develop.com/dbox/default.asp



Programming Distributed Applications With Com & Microsoft Visual Basic 6.0
Programming Distributed Applications with Com and Microsoft Visual Basic 6.0 (Programming/Visual Basic)
ISBN: 1572319615
EAN: 2147483647
Year: 1998
Pages: 72
Authors: Ted Pattison

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net