admin管理员组文章数量:1417709
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?
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?
Share Improve this question edited May 23, 2017 at 11:33 CommunityBot 1 asked Nov 28, 2014 at 19:18 jfmercerjfmercer 2632 silver badges6 bronze badges 2- 14 Simply none. There are a bunch of files, with zillion of functions, some classes and a big hope that everything will work. – gmazzap Commented Nov 28, 2014 at 20:04
- 2 Totally agree with @G.M. there is no conclusive, stringent pattern, but of course some design decisions have been made, for example this might be interesting for you: Wordpress and event-driven programming - what is it about?. – Nicolai Grossherr Commented Nov 28, 2014 at 21:06
3 Answers
Reset to default 23Spaghetti 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/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.
本文标签: What is the design pattern for WordPress Core
版权声明:本文标题:What is the design pattern for WordPress Core? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745275322a2651149.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论