WordPress之所以能够风行全球,一个重要的原因就是其开放式的架构平台,支持灵活的插件机制,能够让其他志愿者较快地开发所需要的plugin来扩展其功能,从而形成一个良性互动的开发者社区,这一点与Facecook的策略类似“平台之争-从Facebook Platform谈起”,当然Firefox、Eclipse、Winamp等都是采用Plugin机制的经典案例。
目前炒得很火的OSGI与Plugin也有莫大关系。
一个Plugin Architecture应该提供如下一些功能:
- 插件的定义
- 插件的加载。(文件、URL等形式)
- 插件的生命周期管理。(安装、卸载、启动、停止、更新)
- 插件间的交互机制
- 插件的扩展
1、wordpresss架构
http://codex.wordpress.org/Plugin_API
http://www.mengyan.org/blog/archives/2005/07/14/32.html
http://steve-yegge.blogspot.com/2007/01/pinocchio-problem.html
2、wordpress数据库结构
A look inside the WordPress database
http://wpbits.wordpress.com/2007/08/08/a-look-inside-the-wordpress-database/
Database description
http://codex.wordpress.org/Database_Description
WordPress 数据库探究
http://fairyfish.net/2007/08/11/wordpress-database-intro/
3、其他一些近期需要关注plugin-based的软件
OSGI: Eclipse+OSGI
Openfire、Spark:
Gregarius:
4、关于plugin与extension
在firefox中,对plugin和extension和较为明显的区分,wikipedia的定义:
Plugins and Extensions
Plugins are slightly different from extensions, which modify or add to existing functionality. The main difference is that plugins generally rely on the host application’s user interface and have a well-defined boundary to their possible set of actions. Extensions generally have fewer restrictions on their actions, and may provide their own user interfaces. They sometimes are used to decrease the size of the host application and offer optional functions. Mozilla Firefox and related software use Add-on as an inclusive term for a category of augmentation modules that are subdivided into plugins, themes, search engines and a well-developed extension system which reduces the feature creep that plagued the Mozilla Application Suite. This is good example article
5、参考资料
http://en.wikipedia.org/wiki/Plugin
http://en.wikipedia.org/wiki/Extension_%28computing%29
转载请注明:出家如初,成佛有余 » WordPress Plugin 架构