图1显示了观察者模式的机制。
访问者模式是一种处理任意数据结构的简单技术。
The visitor pattern is a simple technique to process arbitrary data structures.
我使用的模式是直接、间接、外部提供者和外部消费者模式。
The patterns I use are the direct, Indirect, External Provider, and External Consumer patterns.
就访问者模式而言,本文未加详述的另一各方面就是迭代顺序。
Another aspect of the Visitor pattern not closely examined here is iteration order.
无论使用哪种语言,访问者模式都是操作树形数据的一种可靠工具。
In each case, I've found that the Visitor pattern is a reliable tool for manipulating trees of data.
因此,在Jam 中,访问者模式不能和mixin 一起使用。
Thus, in Jam, the visitor pattern can't be used with mixins.
外部消费者模式允许提供者控制领域外的第三方访问提供者提供的服务。
The External Consumer patterns allows third parties outside the provider governance domain access to services that the provider serves.
不过,观察者模式与单个事件源关联,而反应器模式则与多个事件源关联。
The Observer pattern is associated with a single source of events, however, whereas the Reactor pattern is associated with multiple sources of events.
在基本Web服务结构之上采用观察者模式,就为DEBA带来了回调能力。
It is the Observer pattern on top of the base web services infrastructure that gives DEBA its callback capability.
你是个敏感的人;当你被误解或未被赏识,情绪过度时,你很容易进入受害者模式。
You're a sensitive person; and when you feel overwhelmed, misunderstood or unappreciated, you easily fall into victim mode. Wa, wa, wa.
访问者模式往往用于将数据结构(本例中是树)与通过数据结构操作的算法分离开来。
The Visitor pattern is often used to separate a data structure (the tree, in this case) from the algorithms that operate over the data structure.
访问者模式将创建一个场景,简化对现有数据类型集合添加操作(新访问者)的过程。
The Visitor pattern creates a scenario where adding operations (new visitors) over the set of existing data types is easy.
请考虑访问者模式,其中用for方法为复合层次结构中的每个类都定义了访问者类。
Consider the visitor pattern in which a visitor class is defined with a for method for each class in a composite hierarchy.
第一种模式被称为用户-生产者模式,第二种是联合制作模式,在这之间还的许多模式。
The first model is called the user-producer model and the second the co-production model, with many models in between.
这将作为一种有用的基本用例,类似于经典访问者模式中的基本 Visitor类。
This serves as a useful base case, similar to a base Visitor class in the classic Visitor pattern.
除了简单使用对象和方法,正式的Jo对象使用了重构过的“观察者模式”OOP标准。
Aside from simple utility objects and methods, formal objects within Jo use a refined "observer pattern" OOP standard.
Swing框架以事件侦听器的形式广泛利用了观察者模式(也称为发布-订阅模式)。
The Swing framework makes extensive use of the Observer pattern (also known as the publish-subscribe pattern) in the form of event listeners.
外部提供者模式演示如何将一项非关键业务功能外包给访问一个或多个第三方服务的消费者。
The External Provider pattern demonstrates how to outsource a noncritical business function to a consumer accessing one or more third-party services.
将DEBA应用到Web服务中可以获得两方面的好处,包括Web服务的解藕特性和观察者模式的异步特性。
DEBA for web services benefits from the decoupled nature of web services and the asynchronous nature of the Observer pattern.
这篇文章仅仅是涉及了在访问者模式中使用zippers的一些浅显问题;目的在于激发您进一步探索的兴趣。
This article has just scratched the surface of using zippers in the Visitor pattern; the point of it is to whet your appetite for further exploration.
表1中三个方面的对照,分别为观察者模式、标准Web服务模型,以及在DEBA框架类中观察者模型的实现。
Table 1 shows the correspondence between the Observer pattern, the standard web services model, and the Observer pattern's implementation in the DEBA framework classes.
然而,通过访问者添加新数据类型(类)较为困难,因为访问者模式要求所有具体类型都具有一个visit方法。
Adding new data types (classes) with visitors is difficult, however, as the visitor pattern requires a visit method for all concrete types.
利用Clojure的函数式编程工具来实现访问者模式是消除这种附带的复杂性的一种方法,而且仍然是在JVM上编程。
Leveraging Clojure's functional programming tools to implement the Visitor pattern is one way to get around this incidental complexity, while still programming on the JVM.
如果alter操作是一个in - place alter,或者被修改复制表的参与者模式被设为只读,那么重放位置不会移动。
If the alter operation is an in-place alter, or if the participant mode is set to read-only for the replicated table being altered, the replay position is not moved.
反应器模式与观察者模式(Observerpattern)在这个方面极为相似:当一个主体发生改变时,所有依属体都得到通知。
The Reactor pattern is closely related to the Observer pattern in this aspect: all dependents are informed when a single subject changes.
假定有个开发人员,我们估且称他为Jim,他工作在一种典型的消费者模式下,就是说他的工作依赖于同一办公间里另外一位开发人员。
Consider a developer, let's call him Jim for sake of labelling, working in a typical consumer mode, i.e. his work is dependent on work performed by another developer down the hall.
AWT和Swing组件(例如JButton或JTable)使用观察者模式消除了GUI事件生成与它们在指定应用程序中的语义之间的耦合。
AWT and Swing components, such as JButton or JTable, use the Observer pattern to decouple the generation of GUI events from their semantics within a given application.
AspectJinAction (RamnivasLaddad,Manning 2003年):讨论了使用方面和观察者模式的策略实施。
AspectJ in Action (Ramnivas Laddad, Manning 2003) : Discusses policy enforcement using aspects and the Observer pattern.
RPM forRubyon Rails拥有开发者模式,它会把原始的性能数据保存在本地,开发者可以使用这些数据在开发阶段测试他们的应用程序的性能。
RPM for Ruby on Rails has a developer Mode, the raw performance data being saved locally and can be used by developers to test the performance of their application during development phase.
RPM forRubyon Rails拥有开发者模式,它会把原始的性能数据保存在本地,开发者可以使用这些数据在开发阶段测试他们的应用程序的性能。
RPM for Ruby on Rails has a developer Mode, the raw performance data being saved locally and can be used by developers to test the performance of their application during development phase.
应用推荐