Understanding and Programming COM+: A Practical Guide to Windows 2000 DNA

Other Format
from $0.00

Author: Robert J. Oberg

ISBN-10: 0130231142

ISBN-13: 9780130231147

Category: Windows 2000

The in-depth introduction to Microsoft's DNA and COM+\ Deepen your understanding of the crucial COM/DCOM concepts at the heart of COM+\ Build a working multi-tier Windows 2000 COM+ application-start to finish\ Learn how to create Web-based applications using COM+\ Master COM+ Transactions and Microsoft Message Queue (MSMQ)\ Go beyond the basics! Understand ADO, ATL, clustering, distributed transactions and more\ \ Make the most of Microsoft's COM+, DNA, and Windows 2000-hands-on!\ This is...

Search in google:

The in-depth introduction to Microsoft's DNA and COM+ Deepen your understanding of the crucial COM/DCOM concepts at the heart of COM+ Build a working multi-tier Windows 2000 COM+ application-start to finish Learn how to create Web-based applications using COM+ Master COM+ Transactions and Microsoft Message Queue (MSMQ) Go beyond the basics! Understand ADO, ATL, clustering, distributed transactions and more Make the most of Microsoft's COM+, DNA, and Windows 2000-hands-on! This is the only book you need to master Windows 2000 COM+ and Distributed interNet Applications (DNA) programming. Robert J. Oberg combines a crystal-clear review of COM+ theory with practical hands-on coding techniques-delivering the in-depth expertise you need for enterprise development! Oberg starts by introducing COM+ and Microsoft's DNA architecture: the forest and the trees. Discover how to build a testbed you can use for your COM+/DNA application development; then refresh yourself on the key COM/DCOM concepts that underlie COM+ development, including interfaces, classes, apartments, automation, error processing and debugging. Next, master the key COM+ techniques associated with advanced multi-tier development-hands-on, through building your own application You'll find detailed coverage of COM+ security in Windows 2000 environments; a "survival guide" of key database programming techniques; practical information on creating Web applications using Active Server Pages; and much more. The book, far more than most COM/DCOM/COM+ books, will make you self-sufficient in the most important practical technologies associated withWindows DNA.

PREFACE: \ Preface\ The book is intended as a practical guide to learning COM+ for use in building three-tier applications that exploit Microsoft's Windows DNA architecture. It is based on many years of experience programming and teaching COM. The book is focused on the needs of developers, but it should also prove useful to others on a COM+ project, including architects and managers.\ Learning this new technology can be very enjoyable and interesting, but also quite challenging, because there are so very many concepts and tools involved. This book aims to be largely self-contained, providing basic tutorial information on everything needed to implement hands-on examples of the major services provided by COM+. (See the first chapter for a discussion of what COM+ is.) In particular the book incorporates a systematic treatment of the foundations of COM that are integral to COM+. Thus the book should be completely accessible to you, even if you have no prior COM experience. The core COM chapters are clearly identified, so if you are experienced with COM you can proceed directly to the new features of COM+.\ The book is organized into three parts. The first part introduces COM+ and provides an overall introduction to Microsoft's Distributed interNet Applications architecture, or Windows DNA. This comprehensive architecture is Microsoft's blueprint for building robust three-tier distributed applications. COM+ provides the core infrastructure for the whole architecture. This introduction orients the reader to the whole subject — starting with the "forest". COM+ is introduced in its historical perspective as an evolution of object and component systems. There isalso a chapter guiding you in setting up a testbed that can be used for hands-on work during the rest of the book. It is useful to start setting up the testbed early, because there are so many pieces that will ultimately be required. Any snags encountered can be fixed before they become a blocking problem.\ The second part of the book provides thorough coverage of the fundamentals of COM which underpin COM+. The third part covers COM+ itself and shows how to build multiple-tier applications conforming to the Windows DNA model.\ The book uses both C++ and Visual Basic as important development languages. One of the great strengths of COM is that it is language neutral, and different parts of an application can be developed in the most appropriate language. This approach works well in development, and it also is useful in learning the subject. We use both C++ and Visual Basic in Part 2. There is somewhat greater emphasis on C++ in Part 2, because C++ helps in understanding the concepts of COM better than Visual Basic, which hides so much. On the other hand, in Part 3 we focus more on Visual Basic, because we are interested in learning the important services provided by COM+ without getting bogged down by the more complex coding required by C++. For example, we use Visual Basic as a very simple interface for database access using ADO. A database access component implemented in Visual Basic can easily be called by a business object implemented in C++. Note that in "real life" you may in fact wish to reverse this usage. It will be more efficient to implement a database component in C++ using OLE DB, and the business logic might be implemented in Visual Basic. This book should make you comfortable with such mixed language development.\ What about Java? It is indeed very feasible to implement COM components using Microsoft's version of Java, Visual J++. In fact the Java feature of a class implementing multiple interfaces makes Java a good fit for COM. But standard Java does not provide this COM support, and if you are using Java you may well be interested in its cross-platform capabilities. The future of Visual J++ is somewhat unclear, with some hints that Microsoft may in the future switch to its own language nicknamed "COOL". For these reasons, and to keep the book within scope, I decided to focus on C++ and Visual Basic.\ Using both C++ and Visual Basic is well and good, but you are probably much more oriented towards one of these languages than the other. How does that affect the usability of the book for you? I've tried to structure the book so that it will be useful to both C++ and Visual Basic programmers. If you are a C++ programmer you should have no trouble creating simple Visual Basic client programs There is also complete coverage on implementing Visual Basic servers, which should prepare you for the use of Visual Basic in Part 3. If you are a Visual Basic programmer, read Part 1 completely, followed by Chapters 4, 6 and 9 through 13, focusing on the concepts. You should study Chapter 11 in detail. Then you should be well prepared for Part 3, which is primarily in Visual Basic.\ Another important topic is database programming, and here too you may or may not have very much background. Or you may have used a desktop database such as Access but not SQL Server. Chapter 18 provides a complete tutorial to using SQL Server 7.0, which is actually a database that is very easy to use. There is also a discussion of OLE DB and ADO. Databases are used in the following two chapters on transactions and on Web application development.\ Many companies are moving towards Web-based applications. Web applications have the tremendous advantage of ease of deployment. All that is needed on the part of a client is a Web browser, and clients can reach the application from anywhere in the world. The server capability can be arbitrarily powerful, using the full capabilities of COM+. Chapter 20, which covers both the fundamentals of Web programming and also the use of COM+ on the middle tier, is in fact the longest chapter in the book.\ Two important technologies in Windows DNA on NT 4.0 are Microsoft Message Queue (MSMQ) and Microsoft Transaction Server (MTS). There is a hands-on introduction to MSMQ in Chapter 21. MSMQ is important in COM+ because it provides the infrastructure for Queued Components, and MSMQ may on occasion be used directly in COM+ applications where some of its extended features are required. MTS is a different story. It is completely subsumed in COM+ and disappears as a separate entity. Thus we do not have any specific discussion of MTS, except of a survey nature in Part 1. This book is focused on what is currently needed in COM+ application development moving forward. All of the fundamental concepts of COM discussed in Part 2 remain important, but MTS as such drops out.\ An important consideration in learning a new technology is hands-on examples. There are many example programs throughout the book. Complete code is provided on the accompanying CD-ROM. There are a number of demonstrations in some chapters, which lead you through hands-on work. Most of the examples are deliberately kept quite simple and minimal, focusing on the concept at hand. On the other hand small point examples do not really illustrate what is involved in creating a complete three tier application. The book contains a complete case study of an Electronic Commerce Game, which I hope you will find both instructive and enjoyable.\ The COM+ examples provided in this book were developed using beta software (Windows 2000 Beta 3 and Release Candidate 1), and the usual caveats apply. Changes may be made to the final product. Indeed, Microsoft announced some changes late in the writing cycle. The In-Memory Database (IMDB) has been deleted from the final shipment of Windows 2000. Also, the Component Load Balancing (CLB) service is being moved to a separate product. Accordingly, I deleted the IMDB chapter from the book but retained the chapter containing information on CLB. The information provided is the best I have available at the time of writing. I am committed to maintaining up-to-date information about COM+ on my Web site, www.ObjectInnovations.com, which is mirrored at the publisher's Web site. The COM+ area contains corrections and updates to the book, corrections to the example programs, and new technical write-ups and example programs.\ A Note on the CD-ROM\ As is usual with programming books, there is a CD-ROM provided with this book. I don't know what your experience with book CDs has been, but mine has been quite mixed, to the point that now I rarely load the CD. It seems that in many cases making the examples work smoothly gets lost in the shuffle of writing the text for leading edge technology.\ I have tried very hard to make this CD-ROM different, and if you don't load it, I believe you will be making a mistake. This book lives and breathes by sample programs, and running these programs, studying the code, and creating your own experiments will add immeasurably to your understanding of the material. And if you enjoy programming as well as its being your job, I think you will find it fun too! Even if you are a manager or architect I encourage you to do a little hands-on experimentation as you read the book. One of the nice things about Microsoft's development technology is that they have made it remarkably easy to do some interesting things. I'm sure that programmers in your group will be happy to help you get set up.\ What gives me confidence that the example programs in the CD-ROM will work smoothly is that I have a lot of experience in producing code disks for industrial training courses. Some of the example programs come form these courses and thus have been classroom tested. Many others were created expressly for this book, but benefit from my experience in creating similar instructive examples.\ If you happen to have taken an Object Innovations course you will notice some differences between the courses and this book. One is in the directory structure. For courses I have a master Examples directory, which is a repository for all the programs in the course, and an install script copies starter code where appropriate to lab working directories. In the book I have a simpler structure, with a separate directory for each chapter in the book.\ A second difference is that there are no "labs" in the book. I decided to place my priorities on writing the text and creating the example programs rather than on labs. I hope you will find this a reasonable trade-off. If I had created lab instructions at the detailed level I provide for courses, they could have become out of date as new versions of the software comes out. A book by its very nature is more durable than an industrial course. But I hope the absence of structured labs will not prevent you from doing your own experiments as you read the book. It is when you start to write things yourself that your knowledge and skills grow to a higher level. And it is nice to do some of your experiments on "toy" code rather than on your next project!\ The structure of the CD-ROM is very straightforward. Under the top-level ComPlus directory, there is a chapter directory for each chapter in the book for which there are working code samples. The chapter directories in turn have subdirectories for each sample program in the chapter. Some of these have multiple steps. Some chapter directories also have a Demos directory, where you are encouraged to work along with a specific demo described in the book. The subdirectory CaseStudy contains the Electronic Commerce Game.\ To install the CD-ROM to your hard disk, simply copy the directory ComPlus from the CD drive to your hard drive. I suggest you copy to the top level of partition C. (If you copy to another partition, you will need to edit the paths of the .reg registration files in Chapter 6.) You will then have at your immediate disposal a place to build and experiment with the sample programs and to do the demos. Since the CD-ROM has the example programs expanded in the directory structure, you can make changes on your hard disk freely and go back to the CD-ROM to get back any original files you need.

ForewordPrefaceAbout the Author1What is COM+?32Three-Tier Applications and Windows DNA253A Testbed for Windows DNA494COM Clients: Concepts and Programming715C++ and the Component Object Model1056In-Process COM Servers1297Active Template Library1498Visual C++ COM Support1759EXE Servers18310Introduction to DCOM20311Automation and COM Programming Us Visual Basic22912Error Processing and Debugging25113Multithreading in COM27914COM+ Architecture Fundamentals30515A COM+ Tutorial32916Concurrency in COM+35917Windows 2000 and COM+ Security36918SQL Server and ADO Survival Guide41119Transactions in COM+44920Web Applications Using COM+47121MSMQ and Queued Components51922COM+ Events54723COM+ and Scalability569App. A. Learning Resources587App. BElectronic Commerce Game Case Study589Index599