Why WordPress architecture is not pure object oriented and it don’t use MVC pattern? [closed]

I am pretty new in WordPress and PHP development (I came from Java and C#) and I am a bit
astonished about how WP is structured.

Coming from Java and C# I’m used to work on totally object oriented architectures and now, working on WP, it seems to me that it is not totaly object oriented.

For example the function.php file ino every theme is not a class but is a simple php file containing some functions, so it respect the old procedural model.

At the same time it seems to me that WP don’t use MVC pattern

My question is: why WordPress (that is a modern CMS) don’t use a totally Object Oriented paradigm and don’t adopt the MVC model?

1 Answer
1

WordPress as a project has extreme commitment to backwards compatibility. Whatever new things you add the old things need to work still. Whatever things you change still need to work in old way as well.

So regardless of how WP started as non–MVC application, it cannot become one without retaining all of its non–MVC ways. Which makes it pretty pointless direction.

Coming from formal background MVC might seem like a baseline and “naturally” preferable way to organize. Coming from self–taught background (or lack of programming background entirely) it’s mostly overblown abstraction which even people who like it cannot agree on.

WordPress largely targets users, not developers. Any complicating of the learning curve will just be shooting its strong sides for little gain.

Leave a Comment