Splitting the work
There are many options for storing data and code in the Wikibase system:
- as data entering the item/property paradigm;
- as templates in the Template: namespace;
- as module in the Md: namespace, i.e. using a Lua script;
- as widget in the Widget: namespace;
- as Javascript in the user script/common.js paradigm (User:/MediaWiki:).
The widget namespace probably only makes sense for the operation of the website itself.
A lot can be and should be reused from Wikidata, but those probably have to do with the operation of the website itself as well.
Otherwise, there are factors to take into account:
- access control is meant to function for each namespace (considering that specific items can be protected);
- some data will remain user-side, and needs to be semantically aligned. Therefore it makes sense to maintain some of the information within the datbase rather than the code;
- some data will be written by technical contributors, who will not write code but data.
A concrete example can illustrate the last two points: the system might want to store in the user's personal data store that the "_ga" cookie on the website "example.com" had a given value. Alongside, the system should also store, that the email address of the user is "joe@schmo.com". Both are attributes of the individual user, so they should be stored in the same way. The best way to achieve this is to have one item for "email address", and one for "_ga cookie on example.com". We call this principle "internet architecture as semantic data".