What is the design pattern of WordPress Core? As this Stack Overflow question shows, WordPress does not follow the MVC pattern; however, developers can write plugins and themes that follow MVC. But my question pertains exclusively to WordPress Core, not to any additional add-ons, themes, extensions, plugins, or forked projects that may or may not follow an MVC pattern.

If WordPress Core does not follow an MVC design, then what design pattern does it follow?

有帮助吗?

解决方案

Spaghetti with meatballs

The term "spaghetti with meatballs" is a pejorative term used in computer science to describe loosely constructed object-oriented programming (OOP) that remains dependent on procedural code. It may be the result of a system whose development has included a long life cycle, language constraints, micro-optimization theatre, or a lack of coherent coding standards.

It also has a bit of macaroni mixed in...

http://en.wikipedia.org/wiki/Spaghetti_code#Spaghetti_with_meatballs

其他提示

WordPress uses the Event Driven Architecture due to action/hook API.

I think it is a singleton design pattern, as there is base class and base object called $wp which is global object.

许可以下: CC-BY-SA归因
scroll top