Reputation: 15200
We are moving a WPF app across to use WCF and POCO. So far there are 10 or so services, but this will grow with time. It seems to me that we are having to repeat a lot of rubbish (the same text, I know its not rubbish) in the app.config to wire up the services for WCF.
It seems to me to be a nice place to work with convention over configuration. If I put what the defaults would be in a config section and listed / integrated what the services are it could wire them up when the application fires up.
It feels like this would also make deployments easier as there would only be one or two lines to change (addresses etc).
Is there any framework out there (did a bit of Googling and didn't find anything) that does this sort of thing? If not, is it because this is a daft idea or not practical to implement?
I am reasonably new to WCF so there could be issues that I am not aware of at this point.
Thanks for any and all advice around this subject.
Upvotes: 0
Views: 65
Reputation: 755013
.NET 4 cleans up the config quite nicely, and WCF 4 in .NET 4 also has lots of sensible "defaults" - you might not even need any additional config files, with the default endpoints (one for each service contract implemented by your service class, and for each defined base address in your config / service host) and so forth in WCF 4.
Read all about the new features in WCF 4 here:
A Developer's Introduction to Windows Communication Foundation 4
Read, digest, enjoy! :-)
Upvotes: 2