BizTalk R2 Adapter Framework: Handling Metadata
One of the main differences between .NET 3.0 and BizTalk adapter frameworks is the approach to handle metadata. Metadata is a key component of a message-based adapter framework specially when comes to interact with LOB applications. The use of metadata raises the level of abstraction of untyped send-receive operations with data that has a semantic meaning for the LOB or technology the adapter is abstracting.
In the case of BizTalk Server Adapter framework metadata is represented as context properties or as part of the message schema itself. Both cases implied that metadata is always generated at design time (add adapter wizard, context properties, etc.); in other words there is no notion of dynamic metadata at runtime. Metadata Exchange is always relevant in scenarios where target system artifacts changes frequently. For instance; if the signature of a stored procedure changes more than likely developers will need to recreate the schema definition using the Adapter Metadata Wizard. Also the BizTalk Adapter Framework is intended to handle low level send-receive operations but it does not provide a way to define high level LOB specific operations like ReceivePO, etc. Those operations need to be implemented using other BizTalk orchestrations.
The .NET 3.0 Adapter Framework presents a more generic way to abstract metadata. This is part given that WCF presents a more generic messaging framework compared with BizTalk Server. One of the cool features of the new adapter framework is the support for searching, browsing and retrieving metadata at both design and runtime. This is accomplished using interfaces like IMetadataBrowseHandler, IMetadataSearchHandler, IMetadataResolverHandler, etc. Taking the same previous example a .NET 3.0 adapter can query SQL Server at runtime to regenerate the metadata required to invoke the new stored procedure.
Also the .NET 3.0 adapter framework introduces the notion of operation metadata and type metadata (based on WCF Service and Data Contract). The operation metadata is related to specific operations in the LOB system like ReceivePO, etc. The type metadata represents messages associated with those operations. The use of both Operation and Type metadata allow developers to build high level interfaces (for instance WCF services) raising the level of abstraction for the client applications.