I think I should probably begin this post with a brief apology – whilst what follows will inevitably be influenced by the functionality of VBA, this is more of a generic challenge rather than being platform specific.
I am currently writing some modular functionality that I plan to use as a skeletal structure for a couple of applications that I’ve been asked to write. The skeleton essentially consists of a small number of core features:-
1. A dynamic menu-management system
2. A role-based access control system [geared around activating/deactivating menu options]
3. An integrated user authentication mechanism
I would also like to add a generic, general-purpose application event log capability, such that it will be trivially easy to add a log record to a centralised archive – and of course to develop a simple front-end that would allow an administrator or auditor to trace activities on the system.
Having brain-stormed this as an idea, I’ve come up with two general approaches – but I am not sure whether either technique would be more [or less] appropriate to attempt in VBA.
1. To have a general-purpose table with a scant handful of fields, but then a “BLOB” field in to which I could load a serialized copy of a data object (i.e. before and/or after it is changed).
2. To have a more structured table with a few more fields, then create an “event type” table and require each logged event to have a dedicated record in this event type table, which I can refer to via it’s key field.
I’ve had a brief look around to see what VBA offers in the way of serialization features and found this (un-tested) reference,
http://www.vb-helper.com/howto_net_serialize.html
which strongly suggests that this approach is technical possibly. But being technically possible and being a good idea are two very different things!
This question/decision struck me as something both a little more subtle and a little more profound that asking, “Is there a cool way to serialize objects in VBA?”
In terms of requirements, I would suggest that [in decreasing order of importance] my goals would be: -
1. Extensible framework – easily expanded to include new event types
2. Efficient in performance terms [write time, disc storage]
3. Easy to invoke – in a perfect world it would be a single line of code
4. Easy to code the core functionality
5. Perhaps able to provide an “undo” feature [if I code in “before” images]
I did perform a search in these forums, looking through many of the “audit” related posts, but I didn’t find anything that discussed this particular question. Apologies if I’ve missed anything relevant.
I would be very grateful for any feedback, suggestions or thoughts on the relative merits of these or other approaches. If anyone is aware of best practices or sample solutions I should consider, that would be very welcome too.
Thank you, in advance, for your consideration.
I am currently writing some modular functionality that I plan to use as a skeletal structure for a couple of applications that I’ve been asked to write. The skeleton essentially consists of a small number of core features:-
1. A dynamic menu-management system
2. A role-based access control system [geared around activating/deactivating menu options]
3. An integrated user authentication mechanism
I would also like to add a generic, general-purpose application event log capability, such that it will be trivially easy to add a log record to a centralised archive – and of course to develop a simple front-end that would allow an administrator or auditor to trace activities on the system.
Having brain-stormed this as an idea, I’ve come up with two general approaches – but I am not sure whether either technique would be more [or less] appropriate to attempt in VBA.
1. To have a general-purpose table with a scant handful of fields, but then a “BLOB” field in to which I could load a serialized copy of a data object (i.e. before and/or after it is changed).
2. To have a more structured table with a few more fields, then create an “event type” table and require each logged event to have a dedicated record in this event type table, which I can refer to via it’s key field.
I’ve had a brief look around to see what VBA offers in the way of serialization features and found this (un-tested) reference,
http://www.vb-helper.com/howto_net_serialize.html
which strongly suggests that this approach is technical possibly. But being technically possible and being a good idea are two very different things!
This question/decision struck me as something both a little more subtle and a little more profound that asking, “Is there a cool way to serialize objects in VBA?”
In terms of requirements, I would suggest that [in decreasing order of importance] my goals would be: -
1. Extensible framework – easily expanded to include new event types
2. Efficient in performance terms [write time, disc storage]
3. Easy to invoke – in a perfect world it would be a single line of code
4. Easy to code the core functionality
5. Perhaps able to provide an “undo” feature [if I code in “before” images]
I did perform a search in these forums, looking through many of the “audit” related posts, but I didn’t find anything that discussed this particular question. Apologies if I’ve missed anything relevant.
I would be very grateful for any feedback, suggestions or thoughts on the relative merits of these or other approaches. If anyone is aware of best practices or sample solutions I should consider, that would be very welcome too.
Thank you, in advance, for your consideration.