为了使软件具有更好的可重用性和可扩展性,提出了插件(Plug-in)的思想并,国外一些优秀的都是基于此写的.ie,firefox,eclipse等等...具体理论知识我也不多说了,从网上摘了两段.....
In computing, a plug-in (also: plugin , addin , add-in , addon , add-on , snap-in or snapin ; but see also extension ) consists of a computer program that interacts with a host application (a web browser or an email client , for example) to provide a certain, usually very specific, function "on demand". Often, add-on is considered the general term comprising plugins, extensions, and themes as subcategories[citation needed ] .
Applications support plugins for many reasons. Some of the main reasons include:
Examples of applications and their plug-ins include:
基本原理:
The host application provides services which the plug-in can use, including a way for plug-ins to register themselves with the host application and a protocol for the exchange of data with plug-ins. Plug-ins depend on the services provided by the host application and do not usually work by themselves. Conversely, the host application operates independently of the plug-ins, making it possible for end-users to add and update plug-ins dynamically without needing to make changes to the host application.
Open application programming interfaces (APIs) provide a standard interface, allowing third parties to create plug-ins that interact with the host application. A stable API allows third-party plug-ins to continue to function as the original version changes and to extend the life-cycle of obsolete applications. The Adobe Photoshop and After Effects plug-in APIs have become a standard[citation needed ] and competing applications such as Corel Paint Shop Pro have adopted them to some extent. Other examples of such APIs include Audio Units and VST.
Games and productivity applications often use plug-in architectures which allow original and third-party publishers to add functionality.
The Microsoft Flight Simulator series has become well-known for its aircraft add-ons.
Outside software, a network switch may ship with an unoccupied but non-standard port to accommodate various optional physical-layer connectors.
Outside software again, manufacturers can use plug-ins to create vendor lock-in by limiting upgrade options solely to those available from or endorsed by the original manufacturer. IBM's Micro Channel Architecture , technically superior to Industry Standard Architecture as a way to add components to IBM PCs, largely failed to gain wide support due to the difficulty in getting certification for third-party devices.
上面这边原文的连接地址为:http://en.wikipedia.org/wiki/Plug-in_%28computing%29#Plug-ins_and_extensions
csdn里有有一篇介绍插件实现的bolog:http://blog.csdn.net/stella_tangxing/archive/2005/04/28/366850.aspx
在我的资源里有一个我用CSharp写的一个简单的程序,阐述了插件的具体实现.....或者邮件告我我发给你们...请您多多指教.....