Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>It may not be the answer you want but there are very few silver bullets here.</p> <p>You've really only got a few choices, and as such then depends on the level of functionality and type-hardening you want in your message classes:</p> <ol> <li>Shared DLL's - benefit that it can be code + structure e.g. useful constructors, complex enumerators, debugging ToString implementations etc. Strong versioning. Requires separate project and distribution for DLL.</li> <li>Shared Schema and Code Generation. Declare schema for your types and use code generation to create classes. Lots of different strategies here - some examples: <a href="http://msdn.microsoft.com/en-us/library/bb126445.aspx" rel="nofollow noreferrer">T4 Templating</a>, <a href="http://msdn.microsoft.com/en-us/library/aa302301.aspx" rel="nofollow noreferrer">Custom Code Generation</a>, Tools and libraries such as <a href="http://www.codesmithtools.com/" rel="nofollow noreferrer">CodeSmith</a> or <a href="http://groups.google.com/group/protobuf/" rel="nofollow noreferrer">Proto.Bufs</a>. Search will find you loads more. Can be pretty powerful - know many codeshops that start all projects through rapid prototyping with CodeGen from DB through to UI. You'd still need to distribute schema.</li> <li>Serializing message with enough fidelity to generate types through Code DOM. Each message incurs the cost of carrying enough type metadata to be representative of all it's message instances. e.g. representations of nullable fields. There would also be an intrinsic 1st time "discovery" cost to generate the message wrapper types.</li> <li>Serialize data in a weak structure such as name/value pairs, then generate dictionary-like wrapper classes. Weak typing - easy to extend tho'.</li> </ol> <p>Those really are the only choices. IMHO #2 then #1 in that order are typically the most useful patterns.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload