Plug it in! Configurable plug-in execution...design
A short while ago, I was working on the architecture of a large system that needed to perform a variety of "tasks"...specific actions that could be triggered by the user or run internally by the system through code according to a prescribed recipe or set of conditions. The issue at hand was, the variety of these widgets that would ultimately be implemented was not known a priori. In addition, the functions to be run needed to be
-
Data driven...actions and functional code outcomes needed to be based upon information in a database
-
User configurable at run-time...each function or action did not simply execute in the absence of custom user inputs, but could be scheduled or otherwise configured. For example, "send a message and attach this specific document to that message".
-
Persisted...essentially the custom actions could be planned, added, or removed from a list at any time so we'd need to perform CRUD operations to store and edit instances of each custom action.
-
Extensible post-rollout...the application was going to be delivered in phases with planned enhancements delivered via service packs or other update mechanisms over time. In addition, customers may wish to purchase custom coded widgets or develop their own. Constantly recompiling of the entire system to support new functionality was out of the question.