If you have written complex client/server communications protocols before, you would be thankful for a facility that allows you to call functions (procedures) remotely. If you had such a facility, you might wish that there would be an object-oriented means for objects in cyberspace to collaborate with one another. And if object-oriented remote procedure call is what you desire, you are reading the right book.
This book is a combination of my exposure to Distributed COM through research, teaching, and systems architecture, design, and development. It is about building distributed software using Distributed COM. Distributed COM is not solely about distributed computing though. It is also about building better softwaresoftware modules that can peacefully coexist and collaborate with one another regardless of who has developed them. But since distributed computing is the focus of this book, I will escort you through the distributed aspects of COM without neglecting the required fundamentals that you need to be a competent COM programmer.
Scope of This Book
Ive designed this book so that each chapter assumes knowledge from the previous one. This allows you to read the book from beginning to end, limiting the need for jumping here and there among chapters. To give you a heads up, here are brief summaries for the chapters and appendices covered in this book.
, takes a brief look at the progress of distributed computing. While it describes several popular distributed computing technologies, its real purpose is to point out that the communications layer becomes more advanced as time progresses. It is this advancement that gives birth to technologies such as RPC and Distributed COM.
, provides a high-level introduction to COM and the motivation of this ubiquitous technology. This chapter also provides a general examination of the important facilities and services that a typical distributed object technology should support. It uses the COM terminology that prepares you to take on the rest of the chapters in this book.
cannot execute alonethey require a hosting binary module, such as a DLL or an EXE. In this book, we call these binary modules components. This chapter shows you how to wrap a number of COM classes (whose instances are called COM objects) into a server component. Youll also learn how to develop a client component that uses the services exposed by a server component.
by filling the memory, threading, and security management gaps. Youll learn what the COM infrastructure does and why it does what it does. By the time you finish this chapter, you will know the fundaments necessary to build distributed systems using COM.
is boilerplate code. In fact, you can write template classes and macros to hide the boilerplate code, so that it will take less code to write a component. This is exactly what ATL does. It is a set of C++ template classes and macros that hides the boilerplate code. By using these classes and macros, you reduce the amount of code that you must write to build a distributed component.
, presents several ways to use a distributed COM object. In this chapter, you will learn four different techniques for using a COM object developed by someone else. Some of these techniques are easier to use than others, but you should know them all. This knowledge will allow you to choose an appropriate technique when using a COM object.
, shows you how to build ActiveX controls that can be embedded into a container application, such as Internet Explorer. Youll build an ActiveX control without a complex user interface and two other ones with a complex user interface. Since you can put these ActiveX controls into a web page, you will also develop the web pages that can host them. In addition, youll learn how to expose your COM objects properties through the use of property pages.
. Youll build a server component that takes advantage of the access token, server-side COM security, Windows NT security, auditing, and administrative alerts. Youll also build a client component that takes advantage of client-side COM security, which includes specifying the process-wide security, choosing an identity that is used for launching distributed components, and using call-level security.
, reminds you that the main importance of Distributed COM is that it allows a pointer to be passed from one machine to a second, from the second to a third, and so on. This notion is the key that opens the doors into the world of distributed objects computing. It also allows two objects to pass interface pointers between themselves to achieve bi-directional communications. To grasp this notion, youll build a simple chat system that includes a chat broker, server, and client.
, describes three simple, but very powerful, techniques for debugging distributed components. Learn these techniques because they can be very valuable.
, exhibits the performance data for in-process, local, and remote method invocations. This appendix also shows the drastic performance differences among different threading models for in-process COM objects.
, introduces you to the new features of COM in Windows NT 4.0 Service Pack 4 and above. This appendix also includes a brief discussion of COM+, which will be released with Windows 2000.
, serves as a supplement to help you understand the source code located within the Hello directory. This appendix is for those who want to get a sneak preview at the kind of code that must be written in order to develop simple distributed components using COM. Again, I provide this appendix solely as a supplement, so you must read the whole book to really build distributed systems using COM.