Plugin (design pattern)

from Wikipedia, the free encyclopedia

The plug-in (German: Steckmodul) is a design pattern from the field of (object-oriented) software development and belongs to the category of behavioral patterns. It is used for the institutionalization (clear division) of public parts of the software (generally classes / methods) that are allowed to be used by the user of the software ( published parts ) and which should not be used. The usage is often an extension in the sense of "adding functionality". A plugin consists of an extension point and one or more using extensions.

use

Plugins are mainly used in basic software ( frameworks , set of basic classes). The use of plugins is generally recommended if you want to make the software available to other software developers for integration. A plugin defines which part can be used and how this part can be expanded.

One advantage is that the basic software in the unpublished areas can be further developed without any problems. The type of use or expansion of the basic software is standardized and therefore easier to exchange.

A disadvantage is that the plugin has to be described separately. Plugins limit the expansion options and are more performance-intensive in terms of programming.

Examples

The basic software is a person management system with which people and their addresses can be entered / changed / deleted. The basic software provides two plugins with the extension items "Create_person" and "Change_person".

The basic software is to be used in a judo sports club. The commissioned software developer uses the extension point "Create_ Person" with an extension for recording the year of entry into the association. The commissioned software developer uses the extension point "Change_person" with an extension for the documentation of a passed belt test. The commissioned software developer also uses the "Change_person" extension item with an extension for documenting changes to the weight class. However, the commissioned software developer has no way of influencing or expanding the <delete person> process.

A well-known example of a plugin-based framework is e.g. B. Eclipse , an IDE written in Java .

Individual evidence

  1. ^ Martin Fowler , David Rice , Matthew Foemmel , Edward Hieatt , Robert Mie , Randy Stafford : Patterns of Enterprise Application Architecture . Addison-Wesley , 2002, ISBN 0-321-12742-0 .