I’ve got a business object with some properties that are conceptually a composite type. For example, a price expressed as a number and a currency type, or a dimension expressed as a number and a unit. (60 pesos, 8 furlongs, etc)
To me these seem like natural candidates to be stored as structures – they’re small, they usually need to be passed together, they aren’t meaningful on their own. But, if I declare a property on my business object to be a structure, it screws up the way binding works – a grid row only adds one column for the property, and when I drag-and-drop from the Data Sources window to a user control (like we learned in the book :) ) it won’t let me drag the structure properties. If I try to change the binding on an existing control, it lets me pick the property, but there’s no where to manually add the syntax to specify which structure element I want.
Has anyone else run into this type of problem? What are people’s thoughts about the trade-offs between designing a business object that binds easily vs. one that’s coherent and easy-to-understand for human consumers?
Thanks,
Andy
Copyright (c) Marimer LLC