Archive for June, 2021

hcPluginFramework Released

Monday, June 21st, 2021

I just open sourced a dynamic application framework based on code from Mark Miller’s Borcon 2000 presentation (with his permission).  If anyone remembers CodeRush, the original product developed in Delphi for Delphi, it used the same plugin architecture.

Eagle Software’s Coderush was a revolutionary product that enabled developers to write code quickly using it’s own templating system, bookmarking, navigation and many other advanced capabilities.  I first saw it when a friend of mine, Kevin Meier, introduced me to the version he was using with Delphi 3.  Sadly, Mark sold the IP to, and went to work for, DevExpress who discontinued the product, rolling the core ideas into Coderush for .NET.  Delphi 7 was the last version of Delphi that Coderush supported.  I always wished that DevExpress had open sourced CodeRush.  Not only did it provide a boatload of functionality, but it enabled developers to easily create their own plugins to extend Delphi or Coderush functionality.  This was all back in the day when the OpenToolsAPI was undocumented Voodoo.

The class based interfaces of the plugin framework are defined in the PluginInterface package in the form of abstract classes.  In the ApplicationCore package, descendants of these abstract classes implement the actual functionality.

One of the cool features about this architecture, is that it allows all the plugins to be updated while the application is running.  This is achieved by the ThcCorePlugInLoader found in the dclhcPlugins design-time package.  The ThcCorePlugInLoader component loads the ApplicationCore package and can unload it at run-time.  This means you can update the ApplicationCore as well as any other package it loads, making it possible to replace all the functionality of the application while the shell is still running.

Included in the framework is a an About package that enables users to add/remove and unload packages at run-time.  If you have the need to supply customer tailored solutions for your product, hcPluginFramework will help make that more manageable.