design-patternsweb-applicationsarchitectureframeworks

Plugin Architecture in Web Apps (Examples or Code Snippets?)


I am trying to learn to develop a web application (preferably NodeJS/MongoDB, although I used PHP and Python before) that is highly extensible and customizable via plugins to enable disabled functionality.

One possible option is to use Wordpress with hooks for plugins and widgets to hook into, its however lacking proper separation of view and logic code. That remains to be one option to learn from. Are there any other options?

Do you have any code snippets or example application I can learn from? Language or framework is not so important, I could probably roughly make out the concept behind


Solution

  • A good plugin architecture is difficult to achieve from scratch but offers its own rewards. It makes the software flexible and simple to maintain by localising complexity. The foremost skill it requires is the ability to write loosely coupled code. This demands a very firm grasp of polymorphism, Demeter's Law and the related Hollywood principle.

    I recommend that you initially gain a good familiarity with those, then the following design patterns, which will reduce the difficulty significantly :

    Once you grasp those, study some of the existing Plugin Framework implementations and architectures to see how they've been used. Apache have several in Struts, Geronimo custom server assemblies and Tomcat JNDI Resources; Also the Eclipse plugin framework.