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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:22:42+00:00 2026-05-15T13:22:42+00:00

We’re about to set off our first larger WCF project, and we’re having some

  • 0

We’re about to set off our first larger WCF project, and we’re having some concerns on how to layer our application correctly and where all the patterns go.

The services will primarily be consumed by applications on the Intranet, and secondly by customers over the Internet.

Our idea was to layer the application this way, inspired by DDD and Microsoft Spain’s N Layer App:

  • Infrastructure layer
    • Using EF4 (POCO), and the repository pattern
  • Domain layer
    • So far we have a few domain services here
  • Application layer
    • Nothing here yet
  • Distributed services layer (WCF)
    • This is where the questions begin to arise.
  • Presentation layer

Now we have been reading lots of material, and as an example, Fowler mentions the Remote Facade pattern and Data Transfer Objects as distribution patterns in his book Patterns of Enterprise Architecture.

If I understood facades and WCF correctly, my remote facades will be the service contracts in WCF. However, Fowler has lots of these facades each of their own class (like Album Service), but in WCF I only have one service contract and one class (Microsoft does it in their N Layer App, calling it IMainModuleService)? We can of course “simulate” multiple facades using partial classes, but I don’t feel like thats “the way” if you understand. But is this the way it’s done in WCF, or do you ignore the Remote Facade pattern completely?

Fowler suggests that you send DTO’s over the wire instead of business entities which sounds reasonable to me. But many samples that I’ve seen does not do this. Do you do this in WCF?
Assuming that you’re using DTO’s in WCF, these would be our data contracts, right? Implementing DTO’s, Fowler has an example using an Album Service (the facade) which uses an AlbumAssembler class (one pr. DTO?) for assembling the DTO’s using the business entities. I imagine that this is done using services from the application-/domain layer?
But where are these DTO’s assembled? Is this done in the application layer where some validation occurs aswell, or where does this responsibility lie? I really need some guidance and best practices here which I hope you can give me.

These are some of our questions at the moment which we hope that you can guide us through. Any comments on the overall architecture will also be greatly appreciated. Another question that we haven’t considered much yet is best practices on how to handle security in WCF (using WIF?), in enterprise applications. If you have any comments on that matter, please share them.

  • 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-15T13:22:43+00:00Added an answer on May 15, 2026 at 1:22 pm

    However, Fowler has lots of these facades each of their own class (like Album Service), but in WCF I only have one service contract and one class

    You can define multiple service contracts, all of which define their own service endpoint. Generally one service contract should offer a well defined set of operations, like a class has ideally a limited set of public methods.

    Fowler suggests that you send DTO’s over the wire instead of business entities which sounds reasonable to me. But many samples that I’ve seen does not do this. Do you do this in WCF?
    Assuming that you’re using DTO’s in WCF, these would be our data contracts, right?

    You can decorate your business entities with the Datacontract and Datamember attributes and this way make them DTOs as well. This is a matter of coupling between your business entities and the datacontract. If you want low coupling you define a dedicated DTO and copy its datamember values from the business entities.

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

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I have some data like this: 1 2 3 4 5 9 2 6

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.