A bag acts as a container for tiddlers. As a container it provides several related functions:
- A bag provides a topical domain for the tiddlers. Tiddlers in bag X are related to some topic, concept, purpose, application, etc. For example all the tiddlers in the //teamtasks// bag are general data and code for running a teamtasks application whereas the tiddlers in the //notes// bag are random gatherings of tiddlers.
- A bag provides an authorization domain through the use of policies.
- A bag provides a building block for recipes.
These functions are implemented at the level of the bag rather than the tiddler to make the functionality easier to manage on a few dimensions: in the minds of people using them, in application design, and in code.
It should be noted that a bag does not //have to// indicate any sense of topicality: it's a place to put things and there is no obligation that those things be the same in any particular way.