Today, most applications comprise at least three tiers: a client application tier, a middle tier, and a database tier. Client applications, be they web applications or rich clients, rely on the middle tier to coordinate access to application resources including database assets. In a service-oriented architecture, this middle tier is composed of services – each exposing a well-defined chunk of business functionality. Windows Communication Foundation is Microsoft’s technology for developing services, and for building clients that consume services. WCF can be used to build classic client-server applications that rely on services hosted within a specific intranet domain, or to build and consume interoperable services or REST-based services over the Internet. Most WCF documentation focuses on how to design, implement and host WCF services – with limited discussion of the client-side implications. This whitepaper will focus specifically on the client-side experience when building Windows Presentation Foundation applications that consume WCF services over the intranet or Internet. Specifically, this paper will focus on issues that client developers frequently encounter when consuming WCF services including:
Recommended practices for proxy generation
Data binding considerations
Guidance on sharing libraries between clients and services
Managing proxy lifetime and dealing with exceptions and session timeouts
Caching optimizations
Considerations for multithreaded and duplex clients
Hosting services at the client
Consuming REST-based services
Today, most applications comprise at least three tiers: a client application tier, a middle tier, and a database tier. Client applications, be they web applications or rich clients, rely on the middle tier to coordinate access to application resources including database assets. In a service-oriented architecture, this middle tier is composed of services – each exposing a well-defined chunk of business functionality. Windows Communication Foundation is Microsoft’s technology for developing services, and for building clients that consume services. WCF can be used to build classic client-server applications that rely on services hosted within a specific intranet domain, or to build and consume interoperable services or REST-based services over the Internet. Most WCF documentation focuses on how to design, implement and host WCF services – with limited discussion of the client-side implications. This whitepaper will focus specifically on the client-side experience when building Windows Presentation Foundation applications that consume WCF services over the intranet or Internet. Specifically, this paper will focus on issues that client developers frequently encounter when consuming WCF services including:
Recommended practices for proxy generation
Data binding considerations
Guidance on sharing libraries between clients and services
Managing proxy lifetime and dealing with exceptions and session timeouts
Caching optimizations
Considerations for multithreaded and duplex clients
Hosting services at the client
Consuming REST-based services