MediateV.S EventHandler

最近看了一些wiz框架的例子,发现Mediate这个标签用的比较多,只知道它的作用跟EventHandler是一样的,但是两者有什么区别,实在是没搞明白。原以为这个标签功能更强悍,上网google了一把,才知道在SWIZ1.0之后更偏向用EventHandler,因为Mediate会让人感到有些疑惑,而且不能很好的描述这个标签的意图,用EventHandler就明朗多了.以下是原话:

Mediate will continue to work since it has been around for so long, but it
is being deprecated in favor of the [EventHandler] metadata tag. We decided
that Mediate was just confusing and didn't describe the intent of the tag
very well. EventHandler makes it more obvious what the tag is doing.

你可能感兴趣的:(职场,休闲,EventHandler,Swiz,Mediate)