Daklu Posted March 16, 2012 Report Share Posted March 16, 2012 A while back James posted this question. Question: Why don't you have a "VariantMessage" Type? So... I'm working on an update for LapDog.Messaging. Among other things, the update adds a library of native array types. I'm strongly considering adding a VariantMessage based on James' arguments on that thread. My question... Is there sufficient value in having a VariantArrayMsg included in the array message library to justify the additional overhead? I prefer to keep the library reasonably small so projects don't get bogged down with lots of unused classes, and an array of variants can just be stuffed inside a regular VariantMessage so I'm not seeing a lot of value in a VariantArrayMsg. Thoughts? Quote Link to comment
asbo Posted March 16, 2012 Report Share Posted March 16, 2012 Having not used LapDog (and not much intention in the near future), I'd still agree that VariantArrayMsg seems unnecessary. There are few use cases where you're "doing it right" if you have to do that, I think, and is a corner case that, like you said, can be covered by the VariantMsg. Quote Link to comment
drjdpowell Posted March 17, 2012 Report Share Posted March 17, 2012 I would say “no”, as generally one could choose to either use variant messages or a long list of specific-type messages. Array of Variants is kind of a mix of both. — James Aside: After our previous conversation, I actually modified my own message hierarchy by eliminating all simple-type messages in favor of VariantMessages, except where there was extra functionality involved (for example: ErrorMessage). And in actual use, I tend to either use completely generic messages (Variant) or create specific-purpose messages for specific uses. The latter can have multiple data elements and are usually used in the “Command Pattern” (i.e. they have “Execute" or “Do" methods rather than “Read”). Thank you for considering VariantMessage for LapDog, BTW. I have recently been doing consulting work where I can't use my own messaging package, so I’m interested in Lapdog being widely adopted and as flexible as possible. Quote Link to comment
Daklu Posted March 18, 2012 Author Report Share Posted March 18, 2012 Thanks for the feedback everyone. That's what I thought but since I rarely use variants I don't have a good understanding of how other developers use them. Hopefully I'll get LapDog.Messaging v2.1 out soon. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.