Microsoft TechDEV337

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
moniker="service:mexaddress=http://localhost:4629/aSimpleTicketAgency/mex" moniker=moniker + ", address=http://localhost:4629/SimpleTicketAgency" moniker=moniker + ", contract=ITicketAgencyService, contractNamespace=http://www.ticket.agency.co.il" moniker=moniker + ", binding=WSHttpBinding_ITicketAgencyService, bindingNamespace=http://www.ticket.agency.co.il“ Set ITicketAgencyProxy = GetObject(moniker) result = ITicketAgencyProxy.OrderTicket (1, "Alon", "Back to the Future") WScript.Echo CStr(result)
C++ COM+ Bank Account
ATL & Transaction Code & Catalog
.NET Enterprise Services
Easier COM+
• • • •
.NET based languages Mixed runtime of COM+ & CLR Leverage COM/CLR Interoperability Declarative programming model
Consuming WCF Service from Native Code
• .NET 3.0 installed a COM+ runtime support
• Installing .NET 3.0 will install a special Service COM Moniker
• The WCF Moniker enables early and late binding call to a service from VB 6.0, VB Script, Jscript and Option Explicit Dim even C++ ITicketAgencyProxy, moniker, result
Client Service
The IMAX Ticket Scenario
ComSvcConfig & SvcConfigEditor The COM+ Application.config Simple .NET Host WF Host
COM+ SOA Hostile Rules
Life is hard„
OrderFromWF
SimpleTicketAgency
TicketAgencyHost WFTicketAgency
WFTicketAgencyHost Legacy/Native
• C#, WF Service, client & service
• C#, Host for the WF Service
WCF Based IMax Cinema Ordering Service
COM+ Component as a Service
Component Identity
• COM
• Query IUnknown from any of the interfaces of a COM object will returns the same address
• Developers opt-in to consuming, exposing, and defining public-facing service faç ade. • Services and consumers are independently versioned, deployed, operated, and secured.
• COM+
• The component has an attribute that defines its identity • “Components” are no longer tied to their binary object
• They can be unloaded from memory • There can be more than one object representing the same component in memory
Enterprise Services
Extensibility Location transparency
WS-* Protocol Support
WSE
MessageOriented Programming
System.Messaging
Service Orientation
Boundaries are Explicit Services are autonomous
Share schema & contract, not class
Compatibility based on policy
• Data never includes behavior; • Objects with data and behavior are a local phenomenon. • Capabilities and requirements represented by a unique public name; Used to establish service suitability.
COM+
• Usability, Scalability, Maintainability, Availability, Security • Make COM easy & powerful:
• Add “Serviced” Environment • Use Context & Interception
Back to the Future
DEV 337 - From ORPC 2 SOA
COM+ WCF Interoperability Conceptual & Practical Approach
Alon Fliess CTO, MVP
Sela Group
alon@sela.co.il http://blogs.microsoft.co.il/blogs/alon
• Platform, Language, Types, Threading Model, Protocols
• Decoupling is investment (Coupling is easy RAD) • Loose Coupling:
• Reduce the assumptions that two entities make about each other when they try to exchange information • As the level of assumptions made between two entities goes up so does the efficiency between the two entities New technologies make decoupling easier and • However, at the same time, the two entities are cheaper less tolerant to changes
• .NET Remoting migration
Welcome to 1999
Welcome to 1999
COM+ is based on COM
COM Is:
• Component software model:
• Component def. “…binary, self-contained, reusable, language neutral piece of software”
Interface-based Dynamic Loading Runtime Metadata
Service-Oriented
2000s
Message-based Schema+Contract Binding via Policy
Session Objectives and Agenda
• Component oriented programming
Misc
• Miscellaneous files (VBScript Client)
• C++ ATL based COM+ • C#, WPF based client • C#, EneterpriseService based COM+ • C#, Host for the IMax Service
Interop With Existing Technologies
ASMX/WSE3
WS-* Protocols
WCF
COM+/ES
Moniker
WS-* Protocols
WCF
MSMQ
MSMQ Protocol
Moniker
WCF
Buying IMAX Movie Ticket
The Demo Solution
• COM is a Microsoft solution based on:
l
The OO paradigm
l
l
Binary reuse
Interfaces
l
More Characteristics:
l
l l
Clients bind to objects at runtime
Integrated services, easy-to-use tools, available applications Market for reusable, off-the-shelf, client and server components
I Have to tell you about the future and the past!
From Objects to Services
Object-Oriented
1980s
Polymorphism Encapsulation Subclassing
Component-Based
1990s
• Passing object references as parameters • Passing non COM Interop types • Applications that have application pooling enabled • .NET COM+ (ES) must be installed in the GAC
ATLBank
Back2TheFutureUI ESBank Host IMax
NativeOrderTicket
• C#, WCF, ticket ordering service
• C++, COM, Console based client • C#, Console based client for the WF • C#, WCF, client & service • C#, Host for the SimpleTicketAgency
• Handle:
• Threading, Concurrency, Process Management, N-Tier Complexity, Deployment
• Services:
• Transaction, Pooling, Load Balancing, Pub/Sub, Queuing
• Some Concepts & techniques
• Service Orientation
• Tenets & techniques
• WCF & COM+ Interoperability (The MAGIC)
• Tools, restrictions, & transaction flows
• COM+ [configuration] via attributesterprise Services Code & Catalog
ASMX
.NET Remoting
Interop with other platforms AttributeBased Programming
WCF Basics
Address, Binding, Contract
Client
A
C B A
Service
B C
B C
Message
A
Address
(Where)
Binding
(How)
Contract
(What)
17
It’s All About (De)Coupling
• Coupling:
相关文档
最新文档