Global Distributed Applications With Windowsfi DNA Global Distributed Applications With Windowsfi DNA Enrique Madrona Artech House Boston (cid:149) London LibraryofCongressCataloging-in-PublicationData Madrona,Enrique. GlobaldistributedapplicationswithWindowsDNA/EnriqueMadrona. p.cm.(cid:151)(ArtechHousecomputinglibrary) Includesbibliographicalreferencesandindex. ISBN1-58053-086-9(alk.paper) 1.MicrosoftWindows(Computerfile)2.Electronicdataprocessing(cid:151)Distributed processing.3.Internet(Computernetwork) I.Title.II.Series. QA76.76.O63M334 2000 99-089512 005.4(cid:146)4769(cid:151)dc21 CIP BritishLibraryCataloguinginPublicationData Madrona,Enrique GlobaldistributedapplicationswithWindowsDNA.(cid:151)(Artech Housecomputing library) 1.MicrosoftWindows(Computerfile) 2.Electronicdataprocessing(cid:151)Distributed processing 3.Distributedoperatingsystems(Computers)(cid:151)Management I.Title 004.3(cid:146)6 ISBN1-58053-086-9 CoverdesignbyDuttonandShermanDesign '2000ARTECHHOUSE,INC. 685CantonStreet Norwood,MA02062 All rights reserved. Printed and bound in the United States of America. No part of this book may be reproduced or utilized in any form or by any means, electronic or mechanical,includingphotocopying,recording,orbyanyinformationstorageandre- trievalsystem,withoutpermissioninwritingfromthepublisher. Alltermsmentionedinthisbookthatareknowntobetrademarksorservicemarks havebeenappropriatelycapitalized.ArtechHousecannotattesttotheaccuracyofthis information.Useofaterminthisbookshouldnotberegardedasaffectingthevalid- ityofanytrademarkorservicemark. InternationalStandardBookNumber:1-58053-086-9 LibraryofCongressCatalogCardNumber:99-089512 10987654321 To Eva, the most special, the most intelligent, the most beautiful. The light of my life. ActiveX, BackOffice, FoxPro, FrontPage, IntelliSense, JScript, Microsoft, MS- DOS, MSDN, Outlook, SourceSafe, Visual Basic, Visual C++, Visual FoxPro, Visual Interdev, Visual J++, Visual SourceSafe, Visual Studio, Win32, Windows and Windows NT are either trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Other product and company names mentioned herein may be the trademarks of their respective owners. Contents Introduction xiii What Is the Purpose of this Book? xiv A Word about Visual Basic xvi Who Is the Audience for this Book? xvii Skills Needed to Read this Book xviii Structure of the Book xviii Resources and Additional Information xviii Acknowledgments xix Section I Global Technology 1 Chapter 1 Platforms and Technologies 3 1.1 Overview of Current Global Technologies 3 1.2 Enterprise Operating Systems 7 1.2.1 Microsoft Windows NT Server 8 1.2.2 Unixware and Other Unix Implementations 10 1.2.3 Sun Solaris 11 1.2.4 Linux 11 1.3 Global Intranets 12 1.4 Internetwork Protocols and Technologies 16 1.4.1 HyperText Markup Language (HTML) 17 1.4.2 HyperText Transfer Protocol (HTTP) 18 1.4.3 Transfer Control Program/Internetwork Protocol - TCP/IP 19 1.4.4 Support and Development Tools 20 vii 1.5 Browsers 23 Chapter 2 Using Microsoft Technologies 27 2.1 Why Microsoft Technology? 27 2.2 The Distributed Internet Applications Architecture 29 2.2.1 Windows DNA COM and DCOM Services 32 2.2.2 Windows DNA Transaction Services 34 2.2.3 Asynchronous Communications and Queues 38 2.2.4 Internet Information Services 38 2.2.5 Universal Data Access Components 39 2.2.6 The Windows DNA Development Paradox 40 Chapter 3 Mapping the Technology to the Business 43 3.1 Mapping the Technology to the Business 43 3.1.1 Reducing the Total Cost of Ownership (TCO) 46 3.2 Mapping Windows DNA 48 3.2.1 The Impact of Object and Component Technology 49 3.2.2 The Impact of Middleware 50 3.2.3 The Impact of Messaging, Communications, and Data Services 52 3.2.4 The Impact of Development Products 54 3.2.5 The Impact of Server and Internet Services 55 Section II Global Architecture 57 Chapter 4 Architectural Review 59 4.1 The Client/Server Model 59 4.1.1 Two-Tier Client/Server Systems 59 4.1.2 Three-Tier Client/Server Systems 61 4.1.3 n-Tier Client/Server Systems 63 4.1.4 Distributed Client/Server Systems 64 4.1.5 Internet Client/Server Systems 65 4.2 Object Technology 67 4.2.1 Encapsulation 68 4.2.2 Inheritance 68 4.2.3 Polymorphism 71 viii 4.2.4 Virtual Methods and Abstraction 71 4.2.5 Representing Objects 72 4.2.6 Object Life Cycle: Instantiation, Invokation, and Disposal 73 4.2.7 Business Objects 74 4.2.8 Object Models 75 4.2.9 Object Repositories 76 4.3 Componentware 77 4.3.1 Components and Objects 77 4.3.2 Component Life Cycle 78 4.3.3 Interfaces 79 4.3.4 Business Components 81 4.3.5 Component Repositories 82 4.4 The Component Object Model 83 4.4.1 COM Component Architecture 84 4.4.2 DCOM 89 4.5 Universal Data Access 90 4.5.1 Microsoft Data Access Components (MDAC) 91 4.5.2 OLE DB 92 4.5.3 ODBC 93 4.5.4 ActiveX Data Objects (ADO) 95 4.5.5 Remote Data Services (RDS) 97 4.5.6 Choosing a Data Access Component 97 4.6 Microsoft Transaction Server (MTS) 98 4.6.1 Principles of MTS-based Distributed Systems 99 4.6.2 The Paradigm Shift: Stateful vs.Stateless Programming 103 4.6.3 Building MTS-enabled Components with VB 108 4.7 The Microsoft Message Queue (MSMQ) 111 4.8 Conclusion 112 Chapter 5 Windows DNA Development Tools 113 5.1 Internet Information Server 113 5.1.1 The Microsoft Management Console 113 5.1.2 IIS Process and Component Management 117 5.1.3 Setting Up and Configuring a Web Site Using IIS 119 5.2 Microsoft Visual Studio 121 ix 5.2.1 Microsoft Visual Sourcesafe (VSS) 123 5.2.2 Visual Studio Analyzer (VSA) 124 5.2.3 Visual Modeler (VM) 125 5.3 Microsoft Visual Basic 126 5.3.1 Visual Basic and COM 127 5.4 HTML, DHTML, and XML 129 5.4.1 HyperText Markup Language (HTML) 129 5.4.2 Client-Side Scripting 133 5.4.3 Cascading Style Sheets 134 5.4.4 Dynamic HTML/DHTML 135 5.4.5 Extensible Markup Language (XML) 136 5.5 Active Server Pages (ASP) 137 5.5.1 ASP – Important Language Issues 138 5.5.2 The ASP Object Model 139 5.5.3 The Global.ASA 145 5.6 Conclusion 145 Chapter 6 Building Global Distributed Applications 147 6.1 Software Application Structure 147 6.1.1 Security 151 6.1.2 System Objects 152 6.1.3 Accessing Data 154 6.1.4 Component Architecture 159 6.2 Design Considerations 161 6.2.1 Component Design MTS 162 6.2.2 Object Hierarchies and Object Models 167 6.2.3 Component Packages and Marshaling 168 6.2.4 Business Rules and Processes 170 6.2.5 Script Dos and Don’ts 171 6.3 Complying with COM 172 6.3.1 Compliance by Default 174 6.3.2 Complying the Right Way 175 6.3.3 Designing Interfaces 177 6.4 Complying with MTS 182 6.4.1 Designing MTS Components 184 6.4.2 Instance Management 185 x 6.4.3 Transaction Management 190 6.4.4 State Management 192 6.4.5 Thread and Process Management 194 6.5 The Role of ASP in Distributed Applications 195 6.6 Conclusion 196 Chapter 7 Testing and Debugging 197 7.1 Testing and Debugging 197 7.1.1 Testing Windows DNA Applications 197 7.1.2 Debugging Windows DNA Applications 204 7.1.3 Code Debuggers 205 7.1.4 Debugging Issues 207 7.2 Error Detection, Interpretation, and Correction 213 7.2.1 Error Detection 213 7.3 Handling Problems 223 7.3.1 Setting Up the Error Handler Component 234 7.3.2 Understanding the Error Handler Component 234 7.3.3 Using the Error Handler 237 7.4 Conclusion 238 Section III Managing the Global Project 239 Chapter 8 Managing the Software Project 241 8.1 Managing DNA Projects 241 8.2 Project Organization 243 8.3 Project Requirements and Planning 247 8.3.1 Gathering Initial Requirements 247 8.3.2 Planning 254 8.4 Risk management 261 8.4.1 Risk Assessment 262 8.4.2 Risk Control 265 8.5 Project Plan and Phased Delivery 265 8.5.1 Identifying Project Phases 266 8.5.2 Project Plan 267 8.6 Change Management 271 8.7 Project Documentation 273 xi
Description: