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

  • SEARCH
  • Home
  • 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 7995955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:34:26+00:00 2026-06-04T14:34:26+00:00

Building a stand alone WPF application that uses a MSSQL backend. I would like

  • 0

Building a stand alone WPF application that uses a MSSQL backend. I would like to structure it so it can later be converted to a client server via WCF. There are a set of classes that are shared by both the client and server. How can I structure this so the server parts can later be moved to a true server via WCF and keep the individual classes whole (or as whole as possible). Right now I have the business and data layer in single .CS with a single server class and a single a client class and set of shared classes. I get the feeling it should be three .CS but not sure.

  • 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-06-04T14:34:27+00:00Added an answer on June 4, 2026 at 2:34 pm

    Since I received no responses I built a test WCF application to try and answer myself.

    Clearly I am new to WCF.

    With WCF between the client and the server are ServiceContracts and DataContracts. These are defined on the server side. The client discovers these contracts and they exposed as types.

    A ServiceContract is a method. A DataContract is a class with just properties (OK it can do more this is just a simplification).

    So in answer to my question.

    Create a class with methods that represents the server side.

    Create some simple classes with just public properties to represent the DataContacts.

    For input to and from the methods that represents the server side only pass these simple classes.

    Use these simple classes as input to the constructor for your working client classes.

    The litmus test is that none of the client classes connect to SQL.

    In the stand along app have some cases where we let the client class connect to SQL where have a loop and hold a connection but leave note that needs to be re factored for WCF. I know I will get some security comments here. Right now the client is hosted in Citrix and port 1433 is not open to the public. The idea is to position the product to drop Citrix.

    The server methods are exposed interfaces so you can update the implementation without changing the contract.

    DataContract will support inheritance.
    DataContractInheritance

    If someone has a better answer I would be happy to accept it.

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

Sidebar

Related Questions

I'm building a multi-threaded client side javascript application, and I would like to have
I would like to get your advice. I'm building an application thats going to
Building an iPhone OS application that will allow users to anonymously post information to
I am building an application that calls upon a compiled executable. Said executable's source
I am building a web application with a backend restful web service. One of
I am building a stand alone program so there are no external files for
I have a legacy C++ application that uses DDS for asynchronous communication/messaging. I need
I'm building an application that serves up data to a standalone Google Earth client.
I'm trying to use tinysort as part of a mobile application that I'm building
We are looking at building an application that either proxies a standalone LDAP server

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.