Best practice for large WCF service?

前端 未结 5 1105
时光说笑
时光说笑 2021-01-29 21:52

What is the best practice for writing a rather large wcf service, containing a lot of OperationContracts and DataContracts?

How would I separate functional areas into se

5条回答
  •  生来不讨喜
    2021-01-29 22:49

    That's been a big question surrounding services since their inception. SOA done successfully is SOA planned to the extent you're talking about. Having said that, I've always leaned more toward splitting services out, but using them in a composite manner. That is, several endpoints when you have several contracts, but most of them are only consumed by a few endpoints that are consumed by non-service callers. (wow, that was a mouthful, did it even make sense?)

    Also, I would advise to have as few contracts as possible. Too many contracts can lead to poor manageability. Good contract design will help limit the number of endpoints and service calls. Removing OO concepts from contract design is one way of doing so. Contract design is a massive topic in itself, but suffice it to say that through good contract planning (up front), comes good service design.

    Maarten Mullender writes a great blog on WCF design, and is a must read. There are also some great SOA/WCF books emerging as well.

    Some good books:

    • Pro WCF: Practical Microsoft SOA Implementation
    • Programming WCF

提交回复
热议问题