background preloader

WCF

Facebook Twitter

Web Service Software Factory Modeling Edition. Service Station Web Service Software Factory Modeling Edition Gerardo de Geest and Gerben van Loon Code download available at:ServiceStation2008_Launch.exe(199 KB) Web Service Software Factory: Modeling Edition, also known as the Service Factory, is a collection of resources to help you model and build Web services for Windows® Communication Foundation (WCF) and ASMX in an easy and efficient way. The main difference from previous versions of the Service Factory is that this latest edition uses models whereas the previous release was based on wizards by way of the Guidance Automation Toolkit (GAT). The main disadvantage of using wizards by way of GAT for doing code generation is that it complicates matters when you have to change something in the generated code.

Building modeling languages that integrate into Visual Studio® was difficult in the past, but the Domain-Specific Language (DSL) Tools that ship with the Visual Studio SDK make it easier. Data Contract Model Service Contract Model. WCF Web Programming Model Resources. REST in WCF Blog Series. List of Out of the box WCF Bindings. SOA Future Batches. Pair<CustomerDto, ICollection<OrderDto>> GetCustomerAndOrders(int customerId); Today I had a very interesting lunch conversation, about designing the backend of a web side, SOA style.

SOA Future Batches

The initial suggestion called for an interface similar to this one: public interface ICustomerService{ CustomerDto GetCustomerById(int id); ICollection<OrderDto> GetOrdersForCustomer(int customerId);} One the surface, that was reasonable, until we started talking about the implementation. Which would look somewhat similar to this: PropertyBag["customer"] = customerSrv.GetCustmerById(customerId);PropertyBag["orders"] = customerSrv.GetOrdersForCustomer(customerId); I wasn't pleased with that, because this means two remote calls, instead of one. Beside, this is ugly: Pair<CustomerDto, ICollection<OrderDto>> GetCustomerAndOrders(int customerId); Clearly, something had to be done.

Public interface IHippoService{ AbstractResponse[] Process(params AbstractRequest[] requests);} Thoughts? Serializing Object Graphs Without and With References. Updated: 11/25/2007 and 12/12/2007 (Added C# class definitions, plus C# and VB object initialization code.

Serializing Object Graphs Without and With References

See below.) Windows Communication Foundation (WCF) defaults to the DataContractSerializer (DCS) for serializing services' object graph payloads to well-formed XML Infosets. DCS is capable of serializing 1:many associations of an object graph, such as Customers -> Orders -> OrderDetails, into a hierarchical XML Infoset, which has a structure that any WS-* SOAP client should be able to deserialize correctly. An alternative to DCS is the NetDataContractSerializer (NDCS), which can serialize graphs with 1:many and many:1 (bidirectional) associations by preserving association references in ID/IDREF pairs of Id and Ref values.

NDCS delivers graph fidelity at the expense of interoperability because it requires clients to support CLR types. Note: The Entity Framework (EF) maps associations to Navigation Properties. Serializing Partial Object Graphs with DCS and to deserialize it is: WCF Communication Options in the .NET Framework 3.5. David Chappell, Principal of Chappell & Associates, presents the various communication styles provided by Windows Communication Foundation (WCF) in his white paper called "Dealing with Diversity: Understanding WCF Communication Options in the .NET Framework 3.5". Windows Communication Foundation is Microsoft's approach of providing a single programming model for the diverse set of communication options faced when developing distributed systems.

The set of options ranges from inter process communication to peer-to-peer networking. In the past each communication model dictated a specific programming model. "By providing a common programming model for many kinds of communication, it can help developers work more effectively with diversity", says David Chappell. The whitepaper starts by introducing the two main WCF concepts that are responsible for working with diversity: From the beginning, WCF’s creators recognized that applications had diverse communication needs. RESTful Web Services. WCF Evolving for the Web. WCF Security Guidance.