7

Scenario:

  • A common assembly defines domain object types (an assembly that is referenced by both client and server assemblies)
  • A server assembly defines classes and methods that returns either primitive types or the types defined in the common assembly
  • An client assembly needs to call the server defined methods and, of course, get their results in the appropriate types.

What's the .NET 3.5 standard approach for solving this problem? Could you indicate any resource on the web to help me through?

Andre Pena
  • 56,650
  • 48
  • 196
  • 243

2 Answers2

11

It might be overkill, but it's the remoting method I'm most familiar with, and seems to be the current .NET platform standard: Windows Communication Framework (WCF).

Here are a few references:

MSDN library articles on WCF

WCF Developer's Primer from CODE Magazine

A quick summary primer of what's covered in the other two

Richard
  • 106,783
  • 21
  • 203
  • 265
Dan J
  • 16,319
  • 7
  • 50
  • 82
5

Well, you may use .NET Remoting, but that is officially deprecated, you should really go for WCF.

Edit: WCF does not share an assembly, instead it shares an XML contract that both client and server uses to generate parsers for specified types and methods.

Albin Sunnanbo
  • 46,430
  • 8
  • 69
  • 108
  • 1
    WCF can use shared types, if you like, but that will couple the client and server tightly, which is not the best way to do SOA. – John Saunders Aug 24 '10 at 20:04
  • You can also share assemblies in WCF. The documentation and examples can make you believe that you can't, but it's actually not difficult. – oefe Aug 24 '10 at 20:04