gigi
gigi

Reputation: 3936

Structuring an application using wcf

i am new to wcf and i am creating a test application which i structured like this: enter image description here

I have few question: 1) is it ok this separation, entities+data access+client+server? 2) how do i manage connection string? i added it to the app.config on the service and i seem to get an exception :Unable to load the specified metadata resource. 3)does it make any point to make a separate dll for transfer objects over the generated once, which means something like data access+transfer objects+client+server?

Upvotes: 0

Views: 100

Answers (1)

regex
regex

Reputation: 3601

I would recommend looking into the "Web Service Software Factory 2010" which is a part of the Guidance Automation Extensions (GAX) that are available in Visual Studio.

The solution structure it provides is based on the recommendations of Microsoft's Patterns and Practices team. You may find that the overall solution can be a bit too much depending on the complexity of the project and the size of the organization you work for. However, it provides a good starting point for you solution and can be tailored to suit your needs.

Update: Sorry, I realize now that I only answered your first question. In concern to your other questions, as a practice I always keep the connection strings in the config file of the project that will be compiled to host your application. This will most likely be a Web Application Project that can be deployed to IIS, but it could just as likely be a Windows Service or Console / Forms Application. By keeping the connection strings in the config file, you implement loose coupling of the compiled code and the database locations. I find this to be useful and I have enjoyed, on numerous occasions, the benefit of only needing to change the endpoint in a connection string after database migrations / upgrades.

Upvotes: 3

Related Questions