The scriptDB dispatcher

Why a dispatcher

Because you may want to have multiple handlers, protected in different ways, as described in Handler for cScriptDbCom requests you need to centralize 'air traffic control' for the one or more scriptDB instances you want to access with the VBA API

The dispatcher needs a library reference for each scriptDB it will control access to. The Handler will ask the Dispatcher for a reference to a particular named library's (or a default) scripDB. This is the only role of the dispatcher. Every scriptDB that is referenced by the dispatcher needs to contain this function.

function showMyScriptDb() {
  return ScriptDb.getMyDb();

Typical dispatcher code

As in this case, the default scriptDB (could be the only one if you prefer) scriptDB is the dispatcher's own

The role of the dispatcher

You can get me on Google plus, Twitter or this forum, and compare this topic with - nosql database for VBA and - noSQL database for GAS so you can see more about choosing about which noSQL database to use.

For help and more information join our forumfollow the blogfollow me on twitter