事件驱动的CMS - 优点和缺点 [英] Event-driven CMS - advantages and disadvantages

查看:593
本文介绍了事件驱动的CMS - 优点和缺点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图找出一些CMS的事件驱动的优点和缺点。



事件驱动并不罕见。你可以在许多脚本语言中看到它,例如涉及客户端的Actionscript,javascript,jquery。如何在CMS中的事件及其响应发生在服务器上。这种方法有什么优点或缺点,还有什么其他方法,人们可能更喜欢更多。



请注意,我使用Actionscript,JQ和JS作为示例。您认识到,当以这种方式谈论CMS时,其响应都是服务器端的东西。



strong>:我看到很多人说,使用事件驱动没有意义,因为他们没有得到它是什么。已经使用这种方法的CMS系统之一是Drupal,所以相信我是一个现有的方式,我不是从我的A中提取想法。它只是意味着CMS的内部(所有服务器端的东西)是事件驱动的。核心做它的事和定义事件。插件可以响应这些事件以添加自己的逻辑。我提到Actionscript作为一个例子,因为客户端是这个概念是最知名的,但它也可以在服务器端,也许不是正常的应用程序相关,所以不知道。但是对于一些更复杂的内容,如CMS,其他开发人员想要添加自己的插件,或者甚至更改CMS的预建逻辑,这是有意义的。



解决方案

你确定事件驱动是正确的术语吗?



我想你在说的是一个插件钩子基础设施,允许插件在事件发生时触发(钩子被触发)。



我所知道的事件驱动是桌面应用程序在UI元素中存储事件,就像Javascript可以为HTML元素一样。桌面应用程序完全是这样构建的。这是永远不可能实现基于Web的PHP,因为它是完全面向请求。



无论如何,我看到你的意思。在某种程度上有CMS和框架 - 例如Wordpress和Dokuwiki。





此外:


我试图找出一个由事件驱动的CMS的优点和缺点。


是显而易见的:它变得更加容易钩入系统,而不必攻击核心。可以编写真正的插件。



一个大的优点是,系统趋向于变慢,长期来说有更多的钩子,并且注册的插件越多到钩子。我看到一个巨大的门户维护操作 - 删除几百个Drupal节点 - 在超快速生产服务器上占用小时,主要是因为钩子系统。


I'm trying to identify some of the pros and cons of having a CMS that is event driven.

Event driven is not uncommon. You see it in many scripting languages like Actionscript, javascript, jquery that involve a client. How about in a CMS where the events and their responses happen on the server. What advantages or disadvantages might this approach have, and what other approaches are there that people may prefer more.

P.S. Please note that I use Actionscript, JQ, and JS as an example only. You realize that when talking about a CMS this way, the events an their responses are all server side stuff.

Edit: I see a lot of people saying that it makes no sense to use event-driven as they don't get what it is. One of the CMS systems that already use this approach is Drupal, so trust me it's an existing way, I'm not pulling ideas out of my A. It just means the "internals" of the CMS (all the server-side stuff) are event-driven. The core does its thing AND defines events. Plugins can respond to those events to add their own logic. I mentione Actionscript as an example because client-side is where this concept is most known, but it can be on the server-side too, just maybe not as relevant for normal applications and so not as known. But it makes sense for something more complex like a CMS where other developers want to add their own plugins or even change the pre-built in logic of the CMS.

解决方案

Are you sure "event-driven" is the correct term for this?

I think what you are talking about is a plugin hook infrastructure that allows plugins to act when an event takes place (a hook is triggered).

What I know as "event driven" is when desktop applications store events in UI elements, just as Javascript can do for HTML elements. Desktop apps are built entirely that way. That can never be achieved in Web-based PHP because it is entirely request oriented.

Anyway, I see what you mean now. There are CMSs and frameworks that have this to some extent - Wordpress for example and Dokuwiki.

In addition:

I'm trying to identify some of the pros and cons of having a CMS that is event driven.

The pros are obvious: It becomes much, much easier to hook into the system without having to hack the core. It becomes possible to write real plugins.

One big con is that the system tends to become slower on the long term the more hooks there are, and the more plugins are registered to the hooks. I've seen a huge portal's maintenance operation - the deletion of several hundred Drupal nodes - take hours on a ultra-fast production server, mainly because of the hook system.

这篇关于事件驱动的CMS - 优点和缺点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆