Plug-in Framework Made Easy
Due to the factor such as time, manpower and to meet the evolving requirement in software development, it is often not possible to include all the features users might need during the initial release of software. As an extensive software platform, it is imperative to provide a robust infrastructure where the services are always up-to-date and up-to-demand so that user requirements will be met as time goes. Software plug-in is a good mechanism to provide frequent update and encourage user contribution to improve the software. In order to ease the end-users of enhancing the software, a plug-in must be able to implement easily without extensive coding. The small plug-in file can then be downloaded by the users and ‘plug’ into the program to provide extended functionality to the software.
Reflection is a generic term that covers various .NET base classes that allow one to find out information about the types in programs or other assemblies, and also to read other metadata. Other then obtaining information, the power behind reflection mechanism is that it allows dynamic instantiation of the type discovered into a concrete object. This creates an interesting possibility that a program can dynamically create classes which is not known yet during the compilation of that program, which may be located in any external file. This is the heart of the plug-in mechanism that I will be presenting here. I will show you the basic architecture of our plug-in framework, and then followed by a quick demonstration to see it in action.
The link for downloading source code of the demo application is provided at the end of the presentation. Thie plug-in framework is a concept that was created in 2003 when I was developing an extensible IP telephony system. You can read more about the project here to see how this concept can be applied in real-world application.
Click here to download the source code for XShow.
About The Author
Thomas Cheah is the Principal CTO-for-hire of Procto. He helps business owners and executives to innovate their business model thru strategic technology management so that they get 80% of the benefit for 20% of the cost. If you have innovative ideas but do not the technical expertise, he is your partner to validate and build your digital business models. Thomas believes that constant business innovation is increasingly important in today's business environment so that our business is prepare for rapid change of customer behavior, rising cost, and globalization in order to stay ahead (or away) of competition.
Learn more about Thomas Cheah.