Pages

Monday, July 16, 2012

Part 1: Let's talk about WCF

This will start a series about moving WCF configuration out of the typical application configuration files that are generated by Visual Studio and putting it somewhere, anywhere else, that is atypical of most systems. In this case, I will be showing how I was able to move it into a database.

You might ask why do this? For starters, this was a project for work. I fully support what this project's intentions and purpose was because it simplifies my life and the life customer support and the customers, even though there may exist people who will cringe at this (probably technical people who would see this as a bad idea, but see the disclaimer). Basically, the goal was to have a single point of configuration which would minimize work that would have to be done across multiple machines which share the same configuration, but each having its own copy.

For those new to WCF, it is Windows Communication Foundation. It's a framework for creating services, mostly web services and enterprise, and it's based on a client-server model. The server defines the operation contract, that is, what operations does the client have access to; and the data contract, that is, the data model the client and server expect from each other when communicating. In layman's terms, it's basically the server saying "We will communicate by speaking English and here are the commands and queries I will allow you to use". You can find the Microsoft page discussing WCF here.

So that's the very brief introduction. Next time, I'll go over the database side of things and what the application configuration looked like before and after I made my changes.

Disclaimer: I have limited knowledge of WCF in and of itself; I've done enough to know when something will work or when I should ask more questions. There could be design or security flaws in what I am doing here, but unfortunately for me, there was next to nothing about this on the Internet and at the moment there is nobody else on my team who understands WCF to this level. Also, my WCF intro could be completely wrong; if so I apologize for that. That being said, I welcome constructive criticism of my design decisions regarding this project (not my lack of WCF knowledge); post those in the comments.