I'm studying Juval Lowy's excellent Programming WCF Services and I've just created a really simple in-proc component using his InProcFactory class that comes along with his ServiceModelEx library.
Why would you do this instead of using just regular classes in your project? Using his method requires referencing his library and creating an interface.
I can think of a couple of advantages:
- If you do this consistently you'll reduce coupling considerably.
- Once you've written your in-proc components they're ready to be used out-of-proc or remotely without change.
Are there more advantages in doing this?
Do you write code with in-proc WCF components?
Should all classes be components?
Can you go totally overboard with the whole decoupling thing?
Do the disadvantages of componentizing all your classes outweigh the advantages? Vice versa?