O'Reilly logo

CMS Made Simple Development Cookbook by Samuel Goldstein

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Breaking a module into multiple files

A module in CMS Made Simple may be implemented in a single file. All that is required is that the file contains a subclass of CMSModule and overrides a few key methods.

Most modules, however, will typically evolve to contain some complicated functionality. As the amount of code in a module increases, keeping it all in a single file begins to make management difficult. Similarly, loading and parsing all of the module code on every request can lead to performance issues.

This recipe shows you how you can split a module into multiple files to improve its organization and reduce its footprint with respect to per-request resource requirements.

Getting ready

For this recipe, you will need write access to the filesystem ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required