Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 495399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:35:22+00:00 2026-05-13T05:35:22+00:00

I have a WPF application which so far has been client only, but now

  • 0

I have a WPF application which so far has been client only, but now I’m working on splitting it into a client and server side. In this work I’m introducing WCF for the client-server communication. My application has several projects, and service references are needed from more than one of these.

Initial effort in doing the separation is to do everything “straight forward”. All projects needing to communicate with a service gets a service reference, and so do the main WPF application project – to get the app.config there. I find this to turn into a mess rather quickly, and I can’t imagine this being the typical architecture people use? I’ve also seen problems with the fact that each of the service references generates a new implementation of the DataContract classes – hence there is no common understanding of the DataContract classes on cross of projects. I have some ViewModel classes in one project, and another project instanciating some ViewModel. I’d like to pass the object received from service, but I can’t as the generated client-side representation of the object received differs in each project.

So – is there a recommended way of structuring such client/server separations using WCF? Or principles to follow? I’m thinking one common Proxy project used on the client side that does the communication with the services, wraps the received data, and returns data on a form well known to the client libraries. Should give only one service reference, and I guess I only need the App.config in the wpfApp-project? Does this make sense?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T05:35:23+00:00Added an answer on May 13, 2026 at 5:35 am

    I like to structure my WCF solutions like this:

    Contracts (class library)
    Contains all the service, operations, fault, and data contracts. Can be shared between server and client in a pure .NET-to-.NET scenario

    Service implementation (class library)
    Contains the code to implement the services, and any support/helper methods needed to achieve this. Nothing else.

    Service host(s) (optional – can be Winforms, Console App, NT Service)
    Contains service host(s) for debugging/testing, or possibly also for production.

    This basically gives me the server-side of things.

    On the client side:

    Client proxies (class library)
    I like to package my client proxies into a separate class library, so that they can be reused by multiple actual client apps. This can be done using svcutil or “Add Service Reference” and manually tweaking the resulting horrible app.config’s, or by doing manual implementation of client proxies (when sharing the contracts assembly) using ClientBase<T> or ChannelFactory<T> constructs.

    1-n actual clients (any type of app)
    Will typically only reference the client proxies assembly, or maybe the contracts assembly, too, if it’s being shared. This can be ASP.NET, WPF, Winforms, console app, other services – you name it.

    That way; I have a nice and clean layout, I use it consistently over and over again, and I really think this has made my code cleaner and easier to maintain.

    This was inspired by Miguel Castro’s Extreme WCF screen cast on DotNet Rocks TV with Carl Franklin – highly recommended screen cast !

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 305k
  • Answers 305k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer There is not a system call to do it for… May 13, 2026 at 9:02 pm
  • Editorial Team
    Editorial Team added an answer You should create query-only properties (access="noop", see http://ayende.com/Blog/archive/2009/06/10/nhibernate-ndash-query-only-properties.aspx) with the… May 13, 2026 at 9:02 pm
  • Editorial Team
    Editorial Team added an answer Use the REPLACE command: UPDATE SPORTS SET matchup = REPLACE(matchup,… May 13, 2026 at 9:02 pm

Related Questions

Time ago I created an application which has some buttons in the form. Now
Currently I am working with a custom business object layer (adopting the facade pattern)
I have created a custom WPF user control which is intended to be used
I am trying to determine that if (before I start) on a new project
I'm very new to 3D Graphics and Silverlight so this may be a ridiculous

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.