J
Jo Inferis
So, I'm using a 3rd party com object via interop (already I can hear screams
of anguish). This object was originally written to be used as the backend
for multiple screens of a VB application. Now in this situation the object
remains in memory the whole time, so persistence of data between screens is
not a problem, but on the web I'm assuming (from previous experience) that
we'll need to use Load and Commit methods on this object - where the object
persists its own data to whatever datastore it utilises between requests (as
long as I call these methods, of course).
Ok. With me so far?
It has been suggested to me that rather than use these methods (which
apparently haven't been implemented) I should store the object in the
Session. This sounds horrendous, particularly because the object isn't
serializable but also because it's quite a large object.
It's also been suggested that I add a module which stores and persists the
object, but afaict all this does is create ONE instance of the class and
then all sessions would use that. Which is a bit pointless really.
I'm thinking that I have ample reason for them to get working and implement
those Load/Commit methods, but might there be other relatively simple ways
to persist the object on a per session basis that I just haven't thought of?
of anguish). This object was originally written to be used as the backend
for multiple screens of a VB application. Now in this situation the object
remains in memory the whole time, so persistence of data between screens is
not a problem, but on the web I'm assuming (from previous experience) that
we'll need to use Load and Commit methods on this object - where the object
persists its own data to whatever datastore it utilises between requests (as
long as I call these methods, of course).
Ok. With me so far?
It has been suggested to me that rather than use these methods (which
apparently haven't been implemented) I should store the object in the
Session. This sounds horrendous, particularly because the object isn't
serializable but also because it's quite a large object.
It's also been suggested that I add a module which stores and persists the
object, but afaict all this does is create ONE instance of the class and
then all sessions would use that. Which is a bit pointless really.
I'm thinking that I have ample reason for them to get working and implement
those Load/Commit methods, but might there be other relatively simple ways
to persist the object on a per session basis that I just haven't thought of?