Welcome to MSDN Blogs Sign in | Join | Help

Service Factory: Entity Translation

For the third installment I've decided to talk about the entity translation (mapping) capability of the guidance package. Specifically, this is mapping between the entities that are [de]serialized to/from the wire representation and the entities that represent the business domain model. This time I used a high-quality mic (Shure) and better software (Camtasia Studio), but WMV is still the best output format for this delivery mechanism (MP4 isn't an option). I also tried 1024 x 768 instead of 800 x 600.

File: ServiceFactory-Mapping.wmv
Length: 15:15
Size: 5.93 MB

Published Friday, April 28, 2006 4:41 PM by donsmith
Attachment(s): http://dev4net.members.winisp.net/blogcasts/ServiceFactory-Mapping.wmv

Comments

# re: Service Factory: Entity Translation

Good stuff, Don. I have a question about the generated translator classes, though:

Is there any reason that they weren't created as static classes? They don't seem to have any functionality that would require them to be instanced.

Keep these up! They're great!
Friday, April 28, 2006 9:54 PM by Matt Hamilton

# re: Service Factory: Entity Translation

good stuff...
Saturday, April 29, 2006 10:35 AM by Srdjan

# re: Service Factory: Entity Translation

That's a great question Matt. As a matter of fact we we're asking ourselves that very question just yesterday. Many of us on the team agree with you that they would probably be more appropriate as static classes. However, the dev that implemented this functionality is an extreme TDD guy and generally doesn't favor static methods as a general rule because they don't test as well. With that said, don't be surprised if they are static the next time you see them ;)
Saturday, April 29, 2006 5:08 PM by donsmith

# re: Service Factory: Entity Translation

Is that a Shure SM57 or SM58? Sounds like your gain is up way too high.

Yet another great screencast!

- Mark
Monday, May 01, 2006 7:26 AM by Mark A. Richman

# re: Service Factory: Entity Translation

Thanks for these really useful, on-topic blogcasts.

Alas, since this is guidance, it would be nice if you stuck with best practices such as using a message contract to contain the data contract, as you did in the previous episode. Afterall, a bunch of developers will use this exactly as shown. Better to lead them onto the righteous path to WCF/WSCF services.

This is the purist in me speaking :)
Monday, May 01, 2006 3:00 PM by KjellSJ

# re: Service Factory: Entity Translation

looking fwd for the next blogcast, which gives information on how to modify the recipies in guidance package...

Wednesday, May 03, 2006 11:42 AM by Ashi

# re: Service Factory: Entity Translation

Great stuff, please keep them coming. They are very informative.
Saturday, May 13, 2006 5:29 AM by Markus

# re: Service Factory: Entity Translation

I'm still unclear where schema validation of the incoming message occurs in web service calls. For example, I create a USStateType schema entity that contains elements for all US states. I'll set the type of the Organization.State element (from the blogcast demo) to USStateType. Since State is a string, it will deserialize to a string value, even if the value isn't defined in USStateType.

In practice, I've seen two solutions to the problem:

1. Duplicate schema validation in web methods that receive an Organization object and manually check the Organization.State value.

2. Have the web method receive a generic XmlDocument and use the .NET built-in validating readers.

Neither of these are very good, but they can create a system that functions correctly (even though long-term maintenance will be a problem).

Can you comment on this, Don?
Sunday, May 14, 2006 12:36 PM by Craig Boland

# re: Service Factory: Entity Translation

Hi,
I'm currently involved in an insurance project in which the input (request message) is ACORD message which define almost all elements as optional and have acord defined code values for enumerations. The purpose of this web service is to map the ACORD message to corresponding business entities. The two main challenges faced were 1. How to do code list conversion and 2. How to map the elements where request message does not contain all the infomration(as they are optional) but in business entity they are defined as either required or null able.
Are you planning to issue some guidelines regarding these problems?
Thanks,
Gaurav
Tuesday, May 30, 2006 10:20 PM by Gaurav

# Two approaches to a LINQ Solution Structure

Background I’m in the process of writing a small windows application with a very straightforward architecture,

Monday, October 29, 2007 9:49 AM by Simon Ince's Blog

# WCSF Application Architecture 6: Structuring Modules

This article is part of a series; · WCSF Application Architecture 1: Introduction · WCSF Application

Thursday, November 20, 2008 12:23 PM by Simon Ince's Blog
New Comments to this post are disabled
 
Page view tracker