Invoking Our Framework from the ProductX Web Client

The implementation examples for the server components I just went through would not be complete without the sample code that drives them. The code snippet in Listing 6.20 shows how you can generically prepare and call into the Commercial Framework using the helper methods shown. Here you begin by preparing a Packet object (DataSet with XML schema) on the client, fill the Packet with instance data from any external interface, and send it to the server with an entry-point method (Execute method) to invoke one of the business methods provided by ProductX. The ServerExecute method takes any “action” and relays it to the server for a response. Several helper methods have been provided, such as PreparePacket(). ...

Get .NET Patterns: Architecture, Design, and Process now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.