I wonder why many CMSs (cmsms, wordpress,joomla and …) use index.php for all articles in all modules? how it can help them? why they don’t use separate php files for each module or plugin? I wanna design a small CMS and wanna know this technik. thanks
I wonder why many CMSs (cmsms, wordpress,joomla and …) use index.php for all articles
Share
They can’t afford to do so. The CMS’s machanism allows third party plugins as well for which they can’t create separate pages beforehand and that will be an overhead anyway.
What CMSs typically do is transter requests through URL and implement design patterns such as:
This helps them keep simple and be able to figure out which classes to load and functions to call. Same goes easy in case there is a plugin in-house or third party.
You should study those patterns to figure out the things for yourself.
Here is quote from Front Controller: