Another great session by Juval Löwy. Juvals proposal is that all the added functionally you get from transforming every class into a WCF Service way overweighs the performance degradation. We showed some historical data that showed that every time you go to an higher level of abstraction and better tooling you get a performance degradation but the performance hit is nothing compared to the productivity boost you get with the new abstraction.
Juval said: Ideally, all classes should be WCF services. He also realize this is not very practical.
When combining his recommendations in session ARC315 Zen of Architecture and this session you get the suggested architecture:
- At least every layer should be a WCF service
- Always use a factory(WCF uses factories) or Dependency Injection framework to instantiate a layer-boundary implementation
- This should also be used internally in layers to promote decoupling and maintainability
- Only pass primitives between layers
- Logic in data contracts should not cross layers
This is basically the architecture we use in one of our applications except that we currently use ASMX web services that don’t give you all the ilities that WCF do.
It really feels good when you get parts of your architecture validated by some one like Juval.