A plugin (or plug-in) is a computer program that interacts with a main application (a web browser or an email program, for example) to provide a certain, usually very specific, function.
Typical examples are plugins that
- read or edit specific types of files (for instance, multimedia files)
- encrypt or decrypt email (for instance, PGP)
- filter images in graphic programs
The main application provides services which the plugins can use, including a way for plugins to register themselves with the main application and a protocol by which data is exchanged with plugins. Plugins are dependent on these services provided by the main application and do not usually work by themselves. Conversely, the main application is independent of the plugins, making it possible for plugins to be added and updated dynamically without changes to the main application.
Plugins are slightly different from extensions, which modify or add to existing functionality. The main difference is that plugins generally rely on the main application's user interface and have a well-defined boundary to their possible set of actions. Extensions generally have fewer restrictions on their actions, and may provide their own user interfaces. They sometimes are used to decrease the size of the main application and offer optional functions. Mozilla Firefox uses a well-developed extension system to reduce the feature creep that plagued the Mozilla Application Suite.
Perhaps the first software applications to include a plugin function were HyperCard and QuarkXPress on the Macintosh, both released in 1987. In 1988, Silicon Beach Software included plugin functionality in Digital Darkroom and SuperPaint, and the term plug-in was coined by Ed Bomke. Currently, plugins are typically implemented as shared libraries that must be installed in a place prescribed by the main application. HyperCard supported a similar facility, but it was more common for the plugin code to be included in the HyperCard documents (called stacks) themselves. This way, the HyperCard stack became a self-contained application in its own right, which could be distributed as a single entity that could be run by the user without the need for additional installation steps.