I see Composite Oriented Programming and DCI as interesting techniques to use within a rest framework, but have run into an issue. Is it possible to serialize a mixin object and get all it's properties? For example:
public class IHasOwner
{
string owner();
}
public class HasEngine
{
string engine();
}
Let's say we make a CarComposite object with the two classes above as mixins. Could I deserialize this CarComposite class to get the following xml?:
<CarComposite>
<owner></owner>
<engine></engine>
</CarComposite>
I'm curious to how this is handled in general, but with close attention to .NET, since you canot deserialize Interfaces.