Game Development Reference
In-Depth Information
chapter 38
Designing an
Extensible Plugin-Based
Architecture
When I am working on a problem, I never think about beauty. I think only
of how to solve the problem. But when I have finished, if the solution is not
beautiful, I know it is wrong.
R. Buckminster Fuller
Many applications provide a mechanism to support extensibility through the use
of external code modules, also known as plugins, which are linked into the appli-
cation at runtime. Plugin support is generally used so that the application can be
extended with additional functionality without the need to recompile the source
code and distribute the executable to users. Some applications have business rules
that change frequently, or they have new business rules added on a regular basis.
Plugins allow business rules to be added or changed easily without recompilation
or redistribution.
The .NET framework and the Common Language Runtime provide a variety of
classes and mechanisms for dynamically loading assemblies at runtime and peer-
ing into the metadata of these assemblies. This dynamic support makes .NET an
ideal platform for plugin-based architectures.
Making your application plugin-aware is also an excellent way to promote a longer
lifetime. While not all applications are suitable for this kind of architecture, many
are, especially within tools development. This chapter will cover the rudiments and
advanced topics surrounding plugin-based architectures and the .NET platform.
433
Search Nedrilad ::




Custom Search