Hi Dustin -
Yes, this is
exactly the situation and just what i have in mind. The part i am fuzzy is the actual implementation. Sooo
I have a policies table in SQL. I will hold certain immutable values in fields there ( policy number, PK, FK to Carrier table etc ) and then I would like to have other data stored that has a variable number of elements ( additional Insured, Included Hazards etc )
Should I have a seperate varbinary(max) (?) column for each datum or are you suggesting first having an object which has properties which are collections and then to serialize that one object to a varbinary(max) field ? (that actually sounds cleaner)
IOW am I going to have a List(of Object) called BigObject and then bigobject.additionalinsured , bigobject.IncludedHazards (each of those being a LIst(of STring) and some List(of system.datetime) etc ) represented as one SQL column bigobject varbinary(max) or with I have a SQL Column for each list and serialize them one at a time?
1. At what point in the process do I deserialize the object ? When I do so, do I want to make the deserialized object a property of my BO?
2. How do I bind to the properties of the object? Supposed, for example, one of the properties is LOCATIONs which is a List(of STring).
I was thinking this might actually be an appropriate place to use grids.
Many of the columns are related on the forms, so a 5 column grid of n rows could be loaded from five of the properties of my object, modified or added to on save and written back to the 5 List(of T) properties and then the object serialized back to the strongly typed property of the bizobj that holds the big object. Is that the right idea?
For that matter, would it make sense to store the related columns as a datatable, making that a property of the BigObject so the grid could be just load from and written to that???
I have no experience with grids or loading them from lists etc but I doubt it is that hard to get data into and out of them, even if I have to use the lists to populate a datatable first. That part doesn't seem difficult (though perhaps tedious
) But I'm pretty sure a datatable as a source would be easier.
As far as performance there are never more than 21 rows in any of these lists and more commonly 3 - 10
Any suggestions about how to implement this approach much appreciated. The part I am the fuzziest on is in the policy BO - I assume there is just one property for the variable data but then as soon as the BO gets data the object gets deserialized to an object that hangs on the PolicyBO ? I guess in that case I wouldn't be really binding to those properties but just using them to load interface containers that would then write back to those properties before the whole thing got reserialized on a save ???
( this really sounds very cool )
Suggestions much appreciated and I think fleshing out this thread would be quite useful for a lot of SF users.