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 7016723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:49:20+00:00 2026-05-27T22:49:20+00:00

I have a tech demo application to write, with multiple clients: web client (ASP

  • 0

I have a tech demo application to write, with multiple clients: web client (ASP MVC 3), desktop client (currently it’ll be a WCF app, planning to spice it up to Metro later) and a mobile client (Wp7 is the default task, but if I feel like a time-millionaire, I might try MonoDroid too)

I was thinking using WCF for the clients.
I was thinking using EF Model First for back-end.
However my problem arises when I try to figure out where do I put my domain logic (validation, computed properties, etc) without having to manually duplicate everything I already declared in my EF Model.

My first main problem is that EF has a nice object tracking built in (obj.Components.Add(...); db.Save();), but this functionality isn’t available on the clientside easily. Is there a way around it without having to implement my own? (I know how to do that, but that’s way too much work for this demo)

My second main problem (as the title suggest) is the domain logic, mainly validations.

  • Should I recompile the business objects to clientside and serialize the wcf into the same objects?
  • Should I try to work with the WCF generated classes on client-side? (back to the first problem)
  • Should I try to use shared assemblies?

  • If I write my logic into MVC controllers, my WCF service won’t be able to call them neatly.

  • If I write a separate BusinessLayer should that also use EF entities or should I write custom Business Objects? (essentially duplicating everything AGAIN)
  • If I use EF entities, I have to partial the validation on, which is ugly (at this point, should I just switch to EF Code first?)
  • Is there a nice way to use these same validations on client side?

  • Should I scrap the whole thing and try RIA services?

Oh, so many questions…

  • 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-27T22:49:21+00:00Added an answer on May 27, 2026 at 10:49 pm

    I’ve built cross-platform apps before on Windows (specifically WPF / Silverlight clients, C# SQL Server back end) and what I’ve done is this.

    • Employed a messaging layer or middleware (RabbitMQ for asynchronous messaging, or webservices for request/response) and serialization technology (Protobuffers or JSON) that works across all three boundaries. Use a cross platform middleware where possible. This is why I mention RabbitMQ / protobuffers / JSON.
    • Moved all business logic to the server – the client cannot access the database at all and has to go through the middleware. Clients, including desktop, literally become like thin browsers accessing middleware services for all operations.
    • Created shared assemblies to hold messages, datacontracts and common classes between client(s) and server which can be referenced by all clients and the server.

    This last step (shared assemblies) involves creating 1 project which is full C# compatible (so works on WPF Desktop or Server) and additional projects for each web client (Silverlight, WP7). To dual deploy code on multiple clients you have one copy of the source in the desktop assemblie and then “Add as Link” the same source files to Silverlight / WP7 assemblies. You will have to have a few #if preprocessor statements but by and large it is possible to dual deploy large chunks of code using this method.

    Your stack becomes

    Clients:

    all clients have serialization, client side implementations of webservices/middleware and MVVM / MVC patterns

    Middleware:

    middleware implemetation on server / wpf desktop can be the same. Wp7 and monodroid etc will need to be different

    Messages/DataContracts:

    shared across all clients/server using the techniques I outlined above

    Server:

    All business logic, DB access and server-side middleware implementations. For DB Access I’ve used PetaPoco as an excellent MicroORM. I believe a microORM implementation powers stack overflow but I might be mistaken.

    I would also take a look at this article for inspiration. It is possible – I’ve written client/server apps with SL/WPF clients and C# servers, also WPF client/Java servers using the above methods.

    Best regards,

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

Sidebar

Related Questions

I have an application that uses ASP.NET MVC. I have it deployed to a
I have an asp.net MVC app that i am working on and I wrote
Our inHouse tech have installed our own app to some of our iPods 3.x
We have developed a .NET web application that uses SQL Server as a backend.
I have an opportunity to learn some new tech to write this code. Basic
I am working on a project which adopted ASP.NET MVC3(Razor) tech. Now, I have
I have a small classic asp site and I am concerned that a client
I have an application used by pretty tech-savey people and they want small island
In our game, we have a typical tech tree, which is currently edited by
Tech - asp.net 3.5, Sql server 2005 I have integrate aspnet membership for my

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.