index.fm Page 403 Tuesday, August 5, 2003 2:52...
Transcript of index.fm Page 403 Tuesday, August 5, 2003 2:52...
403
Index
A
Abstract Cache pattern, 43, 320–342ASP.NET caching, 338–342Cache, 325cache container:
adding items to, 339–341retrieving cached items from, 341
CacheAdapter, 325class diagram, 327Client, 325ConcreteCacheable, 322, 325consequences, 322–324forces, 322ICache, 326ICacheable, 326IEnumerable, 326implementation, 326–342implementation sample of preparing a cache
using, 333–335intent, 320lazy cache service implementation, 332–333participants, 325–326problem, 320–322related patterns, 342setting SOAP headers using .NET, 331SOAP headers, 327–342SOAP message header example, 330
SOAP Toolkit Visual Basic header serialization example, 328–329
structure, 322wrapping a cache container (implementation
sample), 336–338Abstract Packet pattern, 42, 142, 178–192, 214,
257, 260benefits/liabilities, 181–183boxing/unboxing, 185–184consequences, 181–183DataSet, 183forces, 180generic class diagram, 181implementation, 183–192implementation class diagram, 180intent, 178Packet, 183Packet Translator, 183participants, 183problem, 179–180ProductDataSet, 183related patterns, 192structure, 181
Abstract Schema, 42, 203ADO DataSets, 24ADO.NET, 202–204, 209, 220, 232, 236, 363
index.fm Page 403 Tuesday, August 5, 2003 2:52 PM
404
Index
Advanced design patterns, 43, 319–401Abstract Cache pattern, 320–342
ASP.NET caching, 338–342Cache, 325cache container:
adding items to, 339–341retrieving cached items from, 341
CacheAdapter, 325class diagram, 327Client, 325ConcreteCacheable, 325consequences, 322–324forces, 322ICache, 326ICacheable, 326IEnumerable, 326implementation, 326–342implementation sample of preparing a cache
using, 333–335intent, 320lazy cache service implementation, 332–333participants, 325–326problem, 320–322related patterns, 342setting SOAP headers using .NET, 331SOAP headers, 327–342SOAP message header example, 330SOAP Toolkit Visual Basic header
serialization example, 328–329structure, 322wrapping a cache container
(implementation sample), 336–338Loosely Coupled Transactor Client (LCT
Client), 380–400benefits/liabilities, 383–384CLCTClientSoapSocket, 385CLCTClientThreadPool, 384consequences, 383–384CSoapSocketClientT, 385forces, 380–381implementation, 385–400intent, 380LCT Client C++ console implementation,
385–388LCT Client “plumbing” implementation,
388–391LCT Client “plumbing” implementation
(template code), 392–399participants, 384–385problem, 380structure, 381
Loosely Coupled Transactor Server (LCT Server), 350–379
asynchronous system design challenges, 350–354
benefits/liabilities, 359–362class diagram, 364Client, 362consequences, 359–362ExternalService, 363ExternalServiceProxy, 363forces, 357generic class diagram, 358implementation, 364–379intent, 350ITransactor, 363LCT Server “plumbing” implementation,
366–369participants, 362–363problem, 354–357related patterns, 379sample functional implementation drive by,
370–379structure, 358–359TransactorFacade, 363TransactorService, 362–363Visual Basic SOAP Toolkit client used for
calling, 363Password Storage pattern, 400–401
benefits/liabilities, 401consequences, 401forces, 400hashing helper method implementation,
341intent, 400participants, 401problem, 400structure, 401
Web Service Interface pattern, 342–350benefits/liabilities, 344–346client-side WSI implementation example,
350concrete WSI implementation example,
347–348consequences, 344–346forces, 343implementation, 347–350intent, 342IWebServiceInterface, 346participants, 346–347problem, 342–343sample interface, 347ServiceClient, 346ServiceProxy, 346structure, 344Web service piece of WSI implementation,
349
index.fm Page 404 Tuesday, August 5, 2003 2:52 PM
Index
405
WebServiceConcrete, 346WebServiceInterface, 346WSDL-generated proxy code, 349–350
Alexander, Christopher, 38–39American Clearing House Association, 274Application level, 76
Applying UML and Patterns
:
An Introduction to Object-Oriented Analysis and Design
, 39
.asmx, 20–21ASP.NET, 63, 278, 338–339Assembly, System.Reflection namespace, 160Asynchronous Web services, 286Authorize method, 170
B
Base Class Library (BCL), 9, 35Base exception class, 47BaseException base class, 49, 51
adding SOAP exception support to, 71–77COM exception handling, 75–76determining when to log, 76–77sample BaseException actor for allowing
SOAP Faults, 72–73sample SOAP Fault builder for, 71–72sample SOAP Fault detail node builder, 74–
75using XML, 76
applying the child class, 57beginning of, 54–57building, 53–63features handled by, 51–52
automated call stack formatting and display, 51
automated error stack formatting and display, 51
automated exception chaining, 51custom remote exception handling using
SOAP, 52error logging and message tracing, 52
logging, 52–53environmental information, 60–61error stack, building, 61–62sample logging routine, 58–59what to log, determining, 59–62where to log, determining, 58–59
sample child class, 50sample stack builder, 62system exceptions, throwing, 62–63
BaseException class, 71, 288BooleanSwitch, 80–82Boundaries, 179Box, Don, 38
Boxing/unboxing, 185–187BuildDetailNode method, 74–75BuildErrorStack method, 61Burgett, David, 298
C
C#, 3, 8, 35, 385delegate keyword in, 111
CacheAdapter, 325–326, 331, 335–336Call stack, 61Caller communication, 352–353Categorizing patterns, 39–41CExternalServiceT, 384Chained Service Factory pattern, 42, 142, 143–152,
284benefits/liabilities, 146–148ConcreteFacade, 148consequences, 146–148Execute method, 144Facade, 148forces, 145–146generic class diagram, 146implementation, 149–152intent, 143participants, 148problem, 143–145related patterns, 152Service, 148Service Factory metadata helper method, 150–
151Service Factory method sample
implementation, 149–150ServiceClient, 148structure, 146
CLCTClientSoapSocket, 384, 385CLCTClientThreadPool, 384Client faultcode, 66COM, 12, 35COM+, 29, 163, 166Commercial Framework, 267–270, 278, 304–306
architectural features, 284–289Abstract Data packet, 288exception handling and tracing framework,
288FTP client/FTP Web services, 286instrumentation, 288loosely coupled Web services, 284managed client framework, 284messaging and Message Listening Windows
2000 Service, 286network services, 286Poly model, 285Product Manager, 288
index.fm Page 405 Tuesday, August 5, 2003 2:52 PM
406
Index
Commercial Framework (cont.)remote tracing, 287scheduling service, 287service facades, 284unmanaged client framework, 285
roles in, 291vision statement, 282
Common language infrastructure (CLI), 5Common language runtime (CLR), 5, 9, 29–31, 35,
75Common language specification (CLS), 5Common type system (CTS), 5, 36ComplexReport object, 331–332ComplexType element tag, 205Contract interface, 144CORBA, 12–13, 24CreateInstance method, 161CreditCardDS child class, DataSet, 196Crivat, Bogdan, 380CSoapSocketClientT template, 381Custom SOAP Exception Handler, 41Custom SOAP trace extension, 288Custom trace listener, 80, 287
D
Data Access Interface, 285DataSet, 65, 94, 182–186, 222, 230, 313, 379DataSet Visual Studio, 207–208DBGetTransactionBySQL method, 259DCOM, 12–13, 24Decision schema, 290DefaultTraceListener, 78#define TRACE, 77DeleteKeys method, 247
Design Patterns
:
Elements of Reusable Object-Oriented Software
, 39DIME protocol (Microsoft), 24Disconnected coordination/administration, 352–
354Distributed applications, 6Distributed garbage collection, 24Distributed technologies, 11–13DLL-hell, 7Document type definition (DTD), 26DOM, 23Dump method, 58–59Dynamic Assembly Loader pattern, 42, 132–134
benefits/liabilities, 133consequences, 133constructing an object using Reflection, 134forces, 133implementation, 134intent, 132participants, 134
problem, 132–133structure, 133
E
EBInvoke method, 306–308eBusiness software, and communications
management, 7Edit Relation Dialog Box, constraints available in,
216Eiffel, 8Electronic Payments Network, 274Enterprise Java Beans, 12Error Cross-Reference Generator pattern, 42, 125–
128benefits/liabilities, 127calling, 128consequences, 127forces, 126implementation, 127–128intent, 125participants, 127problem, 125–126related patterns, 128structure, 126
ErrorCode set, 75Essential COM (Box), 38Etier3.LazyCacheService class, 330Event log listener, sample for adding to a global
collection, 79–80EventInfo, System.Reflection namespace, 160EventLogTraceListener, 78Exception boundaries, 60, 76
managing, 63–65Exception chaining, 61Exception wrapping, 63Exceptions, throwing from Web services, 63–65ExceptionThrower.asmx, 68–71Extensible Markup Language (XML) web services,
5–6ExternalCallback method, 359ExtractOriginalData method, 379
F
Faultcode, 70Faultfactory property, 70Federal Reserve, 274
automated check mechanism, 272FieldInfo, System.Reflection namespace, 160Filter Builder, 285FinancialServiceFactory.Execute, 144Framework patterns, 41, 45–105
application-specific exceptions, 47–53BaseException base class, building, 53–63custom trace listener, building, 82–104
index.fm Page 406 Tuesday, August 5, 2003 2:52 PM
Index
407
exception boundaries, managing, 63–65exception handling, 47–53overview, 45–47remote tracing, 82–104
remote trace receiver, building, 86–87remote trace viewer, building, 94–104sample business object to be placed on
queue, 88–92sample Remote Trace Listener viewer (GUI),
94–103sample RemoteTraceListener Web service,
86–87sample routine for constructing/adding
custom listener, 86sample socket routine for sending a
message, 92–94sending races to message queue, 87–92sending traces via sockets, 92–94Trace Listener template, 84–85
SOAP Faults, 65–77adding SOAP exception support to
BaseException class, 71–77detail element, 67, 71faultactor, 66faultcode, 66faultstring, 66sample SOAP Fault detail block, 67–68throwing custom SOAP exceptions, 68–71
trace listeners, 77–80FTP, 25, 316FtpException class, 49–51, 54, 57, 61FTPMessages string table, 50FTPWebRequest, 286FTPWebResponse, 286Function-specific exception classes, 49
G
Gang of four (GoF), 8, 38General network libraries, 286General Responsibility Assignment Software
Patterns (GRASP), 39GetDBType method, 310GetPlaceList, 16–17GetSchemaTemplate method, 26–27, 306, 313GetTransaction method, 262, 362–363, 379, 384,
391
H
Headers, SOAP, 28HTTP, 25HTTP GET request, 24HydrateDataObject method, 194, 195, 198
I
ICacheable interface, 335–336ICached interface, 332IErrorInfo interface, 75
COM, 75IHeaderHandler interface, 328, 330Information, and problem solving, 46InitTraceListeners method, 79–80Inner exception, 61Intellisense, 208, 357Internet protocols, 12InvokeTimeConsumingMethod method, 369–370IOException, 63IService interface, 347IWebServiceInterface, 346
J
J#, 8, 35JBuilder, 13
K
Kumar, Pranish, 380
L
Larman, Craig, 39LBInvoke method, 306–308LCT Client, 43LCT Client C++ console implementation, 385–388LCT Client “plumbing” implementation, 388–391LCT Client “plumbing” implementation (template
code), 392–399LCT Server, 43Logging, 76Loosely Coupled Transactor Client (LCT Client),
380–400benefits/liabilities, 383–384CLCTClientSoapSocket, 385CLCTClientThreadPool, 384consequences, 383–384CSoapSocketClientT, 385forces, 380–381implementation, 385–400intent, 380LCT Client C++ console implementation, 385–
388LCT Client “plumbing” implementation, 388–
391LCT Client “plumbing” implementation
(template code), 392–399participants, 384–385problem, 380structure, 381
Loosely Coupled Transactor (LTCT), 43
index.fm Page 407 Tuesday, August 5, 2003 2:52 PM
408
Index
Loosely Coupled Transactor Server (LCT Server) pattern, 350–379
asynchronous system design challenges, 350–354
benefits/liabilities, 359–362class diagram, 364Client, 362consequences, 359–362ExternalService, 363ExternalServiceProxy, 363forces, 357generic class diagram, 358implementation, 364–379intent, 350ITransactor, 363LCT Server “plumbing” implementation, 366–
369participants, 362–363problem, 354–357related patterns, 379sample functional implementation drive by,
370–379structure, 358–359TransactorFacade, 363TransactorService, 362–363Visual Basic SOAP Toolkit client used for
calling, 363
M
Macropattern, 202Managed C++, 8, 35Message batching, and SOAP, 24Message routing service, 286MessageInfo property, 92Messaging Manager, 286MethodInfo, System.Reflection namespace, 160Microsoft Bizatalk, 300Microsoft CRM, 276–277Microsoft Message Queue Server, 350–351, 359,
361Microsoft Message Queuing, 88Middle-tier patterns, 42, 142–200
Abstract Packet pattern, 42, 142, 178–192benefits/liabilities, 181–183boxing/unboxing, 185–184consequences, 181–183DataSet, 183forces, 180generic class diagram, 181implementation, 183–192implementation class diagram, 180intent, 178Packet, 183
Packet Translator, 183participants, 183problem, 179–180ProductDataSet, 183related patterns, 192structure, 181
Chained Service Factory pattern, 42, 142, 143–152
benefits/liabilities, 146–148ConcreteFacade, 148consequences, 146–148Execute method, 144Facade, 148forces, 145–146generic class diagram, 146implementation, 149–152intent, 143participants, 148problem, 143–145related patterns, 152Service, 148Service Factory metadata helper method,
150–151Service Factory method sample
implementation, 149–150ServiceClient, 148structure, 146
overview, 141–142Packet Translator pattern, 42, 142, 192–200
benefits/liabilities, 194ConcreteFacade, 194consequences, 194DataSet, 196forces, 193generic class diagram, 193implementation, 196–200implementation class diagram, 197intent, 192packet, 196PacketTranslator (participant), 195participants, 194–196problem, 192–193ProductDataSet, 196related patterns, 200sample implementation preparing packets,
197–198sample implementation translating packets,
199–200structure, 193
Product Manager pattern, 42, 142, 163–171benefits/liabilities, 166–167ConcreteDelegate, 168ConcreteProduct, 168consequences, 166–167
index.fm Page 408 Tuesday, August 5, 2003 2:52 PM
Index
409
delegation implementation, 169–170Facade, 167forces, 165generic class diagram, 166implementation, 168–171intent, 163ManagedProduct, 168method implementation, 169participants, 167–168problem, 163–165ProductManager, 167–168related patterns, 171structure, 166UnmanagedProduct, 168worker implementation, 170
Service Facade pattern, 42, 142, 171–178benefits/liabilities, 174ConcreteFacade, 175consequences, 174Facade, 175forces, 173generic class diagram, 173implementation, 175–178intent, 171participants, 174–175problem, 171–173related patterns, 178sample implementation, 176–177Service, 174–175structure, 173
Unchained Service Factory pattern, 42, 142, 152–162
Activator, 157Assembly, 157benefits/liabilities, 146–148ConcreteFacade, 157consequences, 155–156Facade, 157forces, 154–155generic class diagram, 155implementation, 157–162implementation using Reflection, 158–158intent, 152MethodInfo, 157.NET Reflection services, 159–162participants, 157problem, 152–154related patterns, 162Service, 157ServiceClient, 157structure, 155Type, 157
Module, System.Reflection namespace, 160Multisync Thread Manager pattern, 42, 122–125
benefits/liabilities, 124consequences, 124DoExecution method, 125–126forces, 123implementation, 124–125intent, 122participants, 124problem, 122–123related patterns, 125structure, 123
N
NACHA (National Automated Clearing House Association), 270–272, 277, 280
Nested relationships, 212–213.NET:
components of, 34–37controllable areas in, 30–31highlights of, 33–34interoperability support, 35
base class library (BCL), 35common language runtime (CLR), 9, 29–31,
35, 75common type system (CTS), 36full Web service and SOAP support, 36object-oriented ASP.NET, 36simplified deployment, 36XML at core, 36
libraries, 4and Microsoft, 43overview of, 34–36securing Web services in, 29–30and XML Web services, 13–18
.NET CLR, 9, 29–31, 343
.NET framework, 268, 281and a distributed new world, 5–13major components of, 33–34and object-oriented languages, 6, 8–11and objects, 18and OO, 8–11and Web services, 18
.NET Framework Configuration snap-in, 30
.NET Reflection services, 61, 159–162
.NET System.Messaging library, 88Notifying Thread Manager pattern, 42, 108–116
benefits/liabilities, 110calling Notifying Thread Manager, 113Client, 109–110consequences, 110delegate definitions, 111DoExecution method notification, 114–115ExecuteAsync method, 112forces, 109
index.fm Page 409 Tuesday, August 5, 2003 2:52 PM
410
Index
Notifying Thread Manager pattern (cont.)implementation, 111–115intent, 108Notifying Thread Manager, 109–111participants, 110–111problem, 108–109related patterns, 116structure, 109–110
O
Object references, 24Object-oriented ASP.NET, 36Object-oriented languages, 33
learning, 10and .NET framework, 8–11
Originating Depository Financial Institution (ODFI), 275
Originator, automated check transaction, 275OutputDebugString API, 78
P
Packet Translator pattern, 42, 142, 192–200benefits/liabilities, 194ConcreteFacade, 194consequences, 194DataSet, 196forces, 193generic class diagram, 193implementation, 196–200implementation class diagram, 197intent, 192packet, 196PacketTranslator (participant), 195participants, 194–196problem, 192–193ProductDataSet, 196related patterns, 200sample implementation preparing packets,
197–198sample implementation translating packets,
199–200structure, 193
Packet.Action property 298:ParameterInfo, System.Reflection namespace, 160Password Storage pattern, 400–401
benefits/liabilities, 401consequences, 401forces, 400hashing helper method implementation, 341intent, 400participants, 401problem, 400structure, 401
Patterns:categorizing, 39–41classifying, 342defined, 10, 37, 37–38gang of four (GoF), 8, 38pattern library, 41–43
advanced patterns, 43, 319–401general framework patterns, 41, 45–105how to use, 43middle-tier patterns, 42persistence-tier patterns, 42, 201–264presentation-tier patterns, 42, 107–139
repeatable, 37software design patterns, 38usefulness of, 34
Persistence-tier patterns, 42, 201–264Abstract Schema, 42, 203columns, 215keys, 215–217
keyrefs, 216–217primary keys, 215unique keys, 215–216
Poly Model Factory, 203Poly Model pattern, 42, 203, 217–231
benefits/liabilities, 223–226consequences, 223–226forces, 218–219implementation, 226–231intent, 217participants, 226problem, 217–218related patterns, 231stored procedure used for saving to
DATALOG table, 229–230stored procedure used for saving XML
instance data to main DATA table, 230
StoreTransaction method, 226–228storing instance data passed using DataSet/
passed-in stored procedure, 228–229structure, 219–223
Schema Field pattern, 42, 203, 231–245benefits/liabilities, 235–236Client, 226consequences, 235Data Access Object, 226forces, 233implementation, 235–245intent, 231problem, 232–233related patterns, 245structure, 234–235
Schema Indexer pattern, 42, 203, 245–264benefits/liabilities, 250–251
index.fm Page 410 Tuesday, August 5, 2003 2:52 PM
Index
411
cleaning up lookup keys from INDEX table, 253–254
consequences, 250–251database-specific helper method for
GetTransaction, 263forces, 247helper method used to GetTransaction in
Poly Model, 260–261helper method to store lookup key, 254–256implementation, 251–264intent, 245method called to save lookup column, 252–
253method using transaction ID directly, 262problem, 246–247related patterns, 264sample ad hoc query method used for
testing queries, 258–259sample schema generator and sample
LOOKUP instance data for convenience, 257–258
sample transaction retrieval method using WhereCollection SQL Builder, 259–260
simple GetTransaction method using transaction ID directly, 261–262
stored procedure source for storing lookup values to INDEX table, 256–257
structure, 247–250schemas:
and DataSets, 206–208nested relationships, 212–213one-to-many relationships, 213types of, 212–213XML schema, 204–206
table, 213–214typed DataSets, creating, 208–212
Pollable Thread Manager pattern, 42, 117–122AsyncReturn, 118, 119–120BeginExecution method, 119benefits/liabilities, 117–118Client, 118consequences, 117–118forces, 116implementation, 118–122intent, 116participants, 118PollableThreadManager, 118–119problem, 116related patterns, 122structure, 117WaitForCompletion method, 121–122
Poly Model pattern, 42, 202, 258, 263, 281, 283Poly schemas, 224
PolyData class, 310PrepareCache factory method, 326, 333, 335PrepareConfigData method, 335–336PreparePacket method, 196, 302, 313PrepareWorkers method, 335Presentation-tier patterns, 42, 107–139
Dynamic Assembly Loader pattern, 42, 132–134benefits/liabilities, 133consequences, 133constructing an object using Reflection, 134forces, 133implementation, 134intent, 132participants, 134problem, 132–133structure, 133
Error Cross-Reference Generator pattern, 42, 125–128
benefits/liabilities, 127calling, 128consequences, 127forces, 126implementation, 127–128intent, 125participants, 127problem, 125–126related patterns, 128structure, 126
Multisync Thread Manager pattern, 42, 122–125
benefits/liabilities, 124consequences, 124DoExecution method, 125–126forces, 123implementation, 124–125intent, 122participants, 124problem, 122–123related patterns, 125structure, 123
Notifying Thread Manager pattern, 42, 108–116benefits/liabilities, 110calling Notifying Thread Manager, 113Client, 109–110consequences, 110delegate definitions, 111DoExecution method notification, 114–115ExecuteAsync method, 112forces, 109implementation, 111–115intent, 108NotifyingThread Manager, 109–111participants, 110–111problem, 108–109
index.fm Page 411 Tuesday, August 5, 2003 2:52 PM
412
Index
Presentation-tier patterns (cont.)related patterns, 116structure, 109–110
overview, 107–108Pollable Thread Manager pattern, 42, 117–122
AsyncReturn, 118, 119–120BeginExecution method, 119benefits/liabilities, 117–118Client, 118consequences, 117–118forces, 116implementation, 118–122intent, 116participants, 118PollableThreadManager, 118, 119problem, 116related patterns, 122structure, 117WaitForCompletion method, 121–122
Stunt Driver pattern, 42, 135–139adding items to test parameters, 139benefits/liabilities, 136building test set the easy way with, 138consequences, 136forces, 135getting test parameters from, 136implementation, 136–139intent, 135ITestable component, 136participants, 136problem, 135related patterns, 139structure, 135Test Client, 136testing Stunt Driver, 138
WebForm Template pattern, 42, 128–132benefits/liabilities, 129–130consequences, 129–130default sample page, 132forces, 128implementation, 130–132intent, 128participants, 130problem, 128related patterns, 131–132rendering (complete), 131rendering (simple form), 130–131structure, 129
Process patterns, 265–318applying.NET patterns, 291–313
Product Manager pattern, 296–303Service Facade pattern, 292–296Unchained Service Factory pattern, 303–313
Commercial Framework, 267–270
architectural features, 284–289vision statement, 282
.NET technology, as competitive advantage, 279–291
ProductX, 270–271Product Manager pattern, 42, 142, 163–171, 296–
303benefits/liabilities, 166–167ConcreteDelegate, 168ConcreteProduct, 168consequences, 166–167delegation implementation, 169–170Facade, 167forces, 165generic class diagram, 166implementation, 168–171intent, 163ManagedProduct, 168method implementation, 169participants, 167–168problem, 163–165ProductManager, 167–168related patterns, 171structure, 166UnmanagedProduct, 168worker implementation, 170
ProductX, 94, 270–271automated check payments, 273–275checks vs. credit cards, 273and consumers/businesses, 271–272electronic check Web servicing, 275–279Electronic Funds Transfer (EFT)invoking framework from ProductX Web client,
313–317summarizing, 317–318
Proof-of-concept (POC) delivery vehicles, 267PropertyInfo, System.Reflection namespace, 160Protocols, 12Public Web services, 14–16
R
Random tracing, 76–77Real-time logging, 53Receiver, 275Receiving Depository Financial Institution (RDFI),
275Reference types, 185–186Referential integrity, 216Reflection, 134, 156, 281
Activator class, 158, 161Reflection services, 61Reliability protocols, 24Remote method invocation (RMI) protocol, 12
index.fm Page 412 Tuesday, August 5, 2003 2:52 PM
Index
413
Remote procedure calls (RPCs), 12, 144Remote trace errors, 94Remote Tracer, 41Remote tracing, 82–104
remote trace receiver, building, 86–87remote trace viewer, building, 94–104sample business object to be placed on queue,
88–92sample Remote Trace Listener viewer (GUI),
94–103sample RemoteTraceListener Web service, 86–
87sample routine for constructing/adding custom
listener, 86sample socket routine for sending a message,
92–94sending races to message queue, 87–92sending traces via sockets, 92–94Trace Listener template, 84–85
RemoteService.RemoteTrace, 85RemoteTrace class, 80RemoteTraceService.RemoteTrace, 86RemoteTraceViewer, 94RemoveAllKeys method, 253ReportingWebService report, 326Rootcause child node, 75
S
SaveTransaction method, 301Schedule Action Router, 287Schedule Viewer, 287Schema Field, 42Schema Indexer, 42Schema Indexer pattern, 258, 263Schemas:
and DataSets, 206–208nested relationships, 212–213one-to-many relationships, 213types of, 212–213XML schemas, 204–206
Server faultcode, 66Service Facade, 42Service Facade pattern, 42, 142, 171–178, 292–296
benefits/liabilities, 174ConcreteFacade, 175consequences, 174Facade, 175forces, 173generic class diagram, 173implementation, 175–178intent, 171participants, 174–175PaymentFacade, 293–294
problem, 171–173related patterns, 178sample implementation, 176–177Service, 174–175structure, 173
Service interface, 292Service-oriented architecture, 143SimpleType element tag, 205Simplified deployment, 36SMTP, 25SOAP, 9, 174
Body tag, 27defined, 20Envelope tag, 27headers, 28security in, 28–31success of, 26Web services, 23–28and XML, 24and XML Web services, 24
SOAP Exception Fault Builder, 67SOAP exception handling, 288Soap Fault Builder, 41SOAP Fault elements, 65, 74SOAP faultcodes, 66SOAP Faults, 65, 65–67SOAP message, 26–27
sample captured using SOAP Trace Utility, 27SOAP Toolkit, 65SOAP Toolkit (Microsoft), 21–22, 65SoapException class, 64, 68, 71, 73–74SoapException.DetailElementName type, 75SOAP-formatted messages, XML tags essential for
understanding, 25–26SoapSerializer object, 328SoapServer object (SOAP Toolkit 2.0), 67–68Sound designs, 40SpDNPatternsUpdateschema, 240Sproxy.exe, 21SPROXY.EXE, 381, 384SSessionId variable, 330Stack builder, 61State management, 352StoreKeys method, 246–247, 253–254StoreTransaction method, 311StoreTransactionRecord method, 311–312Structured exception handling (SEH), 47Stunt Driver pattern, 42, 135–139
adding items to test parameters, 139benefits/liabilities, 136building test set the easy way with, 138consequences, 136forces, 135getting test parameters from, 136
index.fm Page 413 Tuesday, August 5, 2003 2:52 PM
414
Index
Stunt Driver pattern (cont.)implementation, 136–139intent, 135participants, 136problem, 135related patterns, 139structure, 135testing Stunt Driver, 138
System exception classes, 62–63System Exception Wrapper, 41System exceptions, 47–48
throwing, 62–63System.ApplicationException class, 51System.Data.OracleClient, 312System.Diagnostics.Switch, 80–81System.Diagnostics.TraceListener class, 77–78System.Exception class, 47, 61System.Reflection namespace, members of, 160System.Resources.ResourceManager, 50–51System.Web.Caching.Cache object, 326, 338System.Windows.Forms.DataGrid controls, 94System.Xml.XmlDocument class, 75
T
T+3 settlement period, 273tblimp.exe, 168, 170TerraService (Microsoft), 14–15
main page, 14Web methods list form, 15
TextWriterListener, 78TIBCO, 350–351, 361TModels (Type Models), 32Trace listeners, 77–80
customer, building, 82–104Trace option, enabling, 77Trace originator, 92Trace receiver, 86Trace switches, 80–82Trace switching, 287Trace Viewer, 287TraceSwitch, 58, 80–82Trace.WriteLineIf method, 58Trace.Write/Trace.WriteLine, 78, 80Tracing, 53–54TransactorService, 379TransactorService.Execute, 362TransactorService.GetStatus, 362Translate method, 183
U
UDDI, tModels (Type Models), 32Unboxing, 186, 186–187
Unchained Service Factory pattern, 42, 142, 152–162, 284, 303–313
Activator, 157Assembly, 157benefits/liabilities, 146–148ConcreteFacade, 157consequences, 155–156Facade, 157forces, 154–155generic class diagram, 155implementation, 157–162implementation using Reflection, 158–158intent, 152MethodInfo, 157.NET Reflection services, 159–162participants, 157problem, 152–154related patterns, 162Service, 157ServiceClient, 157structure, 155Type, 157
Uniform Resource Identifier (URI), 66Universal Discovery Description and Integration
(UDDI), 20, 32–33Universal Resource Identifiers (URIs), 25Universal Resource Names (URNs), 25Unrecoverable exception, 47“Using Data Caching Techniques to Boost
Performance and Ensure Synchronization” (Burgett), 298
Utilities.SendSocketStream method, 92
V
ValidatePacket method, 301Value types, 185VB.NET, 4, 8, 35, 385VersionMismatch faultcode, 66Visa, 274Visual Basic/Visual Basic C++, 12Visual Studio .NET, 13, 33–34, 168, 171, 219, 268,
304, 354, 357, 359, 370sample Web service WSDL via, 21
W
Web Service, 287code, 63consumers, issues faced by, 17–18
Web Service Interface pattern, 42, 342–350benefits/liabilities, 344–346client-side WSI implementation example, 350concrete WSI implementation example, 347–
348
index.fm Page 414 Tuesday, August 5, 2003 2:52 PM
Index
415
consequences, 344–346forces, 343implementation, 347–350intent, 342IWebServiceInterface, 346participants, 346–347problem, 342–343sample interface, 347ServiceClient, 346ServiceProxy, 346structure, 344Web service piece of WSI implementation, 349WebServiceConcrete, 346WebServiceInterface, 346WSDL-generated proxy code, 349–350
Web service provider, issues faced buying, 18Web Service Proxy, 285Web services, 281Web Services Description Language (WSDL), 7Web.config, adding a listener using:WebForm Template pattern, 42, 128–132
benefits/liabilities, 129–130consequences, 129–130default sample page, 132forces, 128implementation, 130–132intent, 128
participants, 130problem, 128related patterns, 131–132rendering (complete), 131rendering (simple form), 130–131structure, 129
WebServiceInterface abstract class, 346Windows event log, 58Windows Event Viewer, 76WSDL, 7, 9, 31–32
defined, 20specification, 23
WS-Inspection Language, 33
X
XML, 236XML namespaces, 25XML schemas, 26, 204–206, 281, 283, 290
schema element, 204–205XML Web services, 9, 354
defined, 19–23and .NET, 13–18primer, 19–32
XML-formatted system configuration files, 29XmlNode class, 75.XSD, 208–209
index.fm Page 415 Tuesday, August 5, 2003 2:52 PM