Have a suggestion?

Click here to suggest a blog item.

Newsletters Archive

Catch up with DonationCoder by browsing our past newsletters, which collect the most interesting discussions on our site: here.

Editorial Integrity

DonationCoder does not accept paid promotions. We have a strict policy of not accepting gifts of any kind in exchange for placing content in our blogs or newsletters, or on our forum. The content and recommendations you see on our site reflect our genuine personal interests and nothing more.


Latest News

July 2, 2024
Server Migrations Coming

  • Donationcoder server migration is slowly proceeding, expect some hiccups as we get all our ducks in a row..

July 19, 2022
Software Update

Jan 3, 2022
Event Results

May 13, 2020
Software Updates

Mar 24, 2020
Mini Newsletter

Dec 30, 2019
Software Updates

Jan 22, 2020
Software Updates

Jan 12, 2020
Newsletter

Jan 3, 2020
Event Results

Jan 2, 2020
Software Updates

Dec 30, 2019
Software Updates

April 27, 2019
Software Updates

Feb 26, 2019
Software Updates

Feb 23, 2019
Software Updates

Feb 14, 2019
Software Updates

Jan 6, 2019
Event Results

Dec 2, 2018
Software Updates

Nov 13, 2018
Software Releases

July 30, 2018
Software Updates

June 24, 2018
Software Updates

June 6, 2018
Software Updates

Apr 2, 2018
Fundraiser Celebration

Apr 2, 2018
Software Updates

Feb 24, 2018
Software Updates

Jan 14, 2018
Major Site News

Jan 10, 2018
Event Results

Latest Forum Posts

Our daily Blog

This page spotlights the most interesting posts collected from our forum every day.

You are viewing a specific blog item. Click here to return to the main blog page.

Mewlo Web Framework Blog Entry #4 - October 14, 2013

blog clipart
Mewlo Web Framework Blog Entry #4 - October 14, 2013 - A First-class Addon/Plugin/Extension System

At the end of my last Mewlo blog entry I talked about the central role of an addon/plugin/extension system in Mewlo, and the idea that it would be  a natural first structure to start coding.

There are very good reasons to start with an addon/plugin/extension system.  First and foremost because it makes it easier for other coders to start independently writing drop-in code packages, and makes it easier to keep these updated and integrated.  But I think another key benefit is that it brings into sharp relief early in development the need to craft an API to interact with the rest of the system.  The earlier we force ourselves to view the system as an API, the better.

What exactly should the addon/plugin/extension system for a web framework do? What features does it need to have?

Let's start by restating briefly the main goal of a (web) framework.  The goal is to provide a base upon which custom coding can be done.  A framework enables coders to avoid re-writing the same structures and code for each new project, and provides a well-organized and easy-to-maintain structure that can be extended.

So it should come as no surprise that all non-trivial frameworks have facilities for adding and integrating 3rd party extensions.

For web frameworks, we can distinguish two aspects of how such extensions work:

First, we can look at the actual API provided for interacting with extensions, and how they communicate with the rest of the framework.  Here we find generally quite robust implementations.

Generally one sees a signaling system, where components can register to receive signals when certain events occur, and can register their own signals that listeners can subscribe to.  A signaling system is a key way to let modules interact without requiring them to know too much about each other.

One also often sees a kind of component "registry", where extensions can add new objects that can be used by other code, or new functions that can be called, or where extensions can replace existing components.

However, while the internal API for facilitating interactions between extensions and the core system is often robust and clean, web frameworks generally provide only the most rudimentary higher-level maintenance support for managing extensions.

What exactly do I mean by "higher-level maintenance support for managing extensions"?

If we take a look at software that is one-level higher-up and removed from a web framework, like a Content Management System (CMS) or a blog, what we often see is quite elaborate support system for maintaining extensions.

Such a support system can include an administrative backend that can provide information about current installed extensions and their version and status, and a button to click to check for extension updates online.  The online update check can be as full-featured as a desktop update check tool, providing information about new versions available -- the changes and release dates, etc.  The system may also support dependency checking between multiple modules, and report on incompatibilities and dependencies between extensions.  The administration system may even support searching for extensions online, and then automatically downloading and installing (or uninstalling).

In one aspect, extension updates/installs/uninstalls for online web services are more complicated then desktop applications, and that is when the database needs to be substantially altered.  Whether one is installing, updating, or uninstalling, the need to perform database upgrades can be tricky (especially for a live system).  Frequently one may want to save a database backup to be able to roll-back a problematic update, and one may need to take the system offline while updating.

I take the position that such functionality is exactly the kind of thing that a framework should do more to assist: It is common functionality found in most modern web applications, represents a substantial amount of coding, is hard to code properly and is hard to maintain.  This is especially true for the situations where an extension update needs to perform some one time database updates.  In short, this is an areas that a web framework should do much more to assist with -- building a web application should not require the coder to reinvent the wheel when it comes to supporting extensions.  And yet it is an area that few (any?) web frameworks support robustly.

The support for such extension management and updating is a good example of how Mewlo is trying to occupy a middle ground between traditional web frameworks and higher level content management systems.  In some ways you might say that Mewlo is more of a Content Management System Construction Kit.



Share on Facebook