converting core code to plugins
I have just checked in a change that converts the current page caching code into a new plugin. This might perhaps be a good time to explain the reasoning behind my shifting code into plugins.
Having build a reasonable effective plugin architecture I think it’s worth using it for several reasons:
- It shows that it works!
This is perhaps not a very technical reason, but I think it is important to show that a lot of different things can be archived by writing reasonably simple plugins - It keeps the core small
While this is true it is also true that critical stuff should probably stay in core. However, this offers the opportunity to build your own caching code and easily integrate it into ZenMagick.
Another example of a plugin that actually contains/modifies some very elementary functionallity is the Smarty plugin that completely changes the way templates are evaluated; still, it’s good to have this ability to plug in different templating systems without having to modify core. - Besides being useful it can be used as sample code
Again, not very technical, but probably crucial when trying to motivate other people to write plugins of their own
In addition to the above, plugin performance is not far off from core code performance. This is especially true when using core.php. In that case, all code is back together in a single file and the only overhead is the creating of the single plugin class.
