设计模式 - 回调 [英] Design Pattern - Callback

查看:336
本文介绍了设计模式 - 回调的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须做一个回调模式的演示。
我只是想确保我得到它正确,因为我阅读关于回调,回调函数和回调模式...

I have to do a presentation of the callback pattern. I just want to be sure that I got it right because of what I read about callbacks, callback functions and callback pattern...

设计模式回调非常类似于观察者模式。

The design pattern callback is very similar to the observer pattern.

第一个更容易实现,但可能会混淆MVC实现。
你必须调用特定的函数或方法来进行回调。
没有具体的类图。

The first one is easier to implement but will probably mess with an MVC implementation. You have to call specific functions or methods to make the callback. There's no specific class diagramm.

http: //soapatterns.org/design_patterns/service_callback

http://searchdaily.net/callback-pattern-with-rmi-client-callback/#more-2009

第二个是为MVC,有一个特定的类diagramm等(如果我需要,我可以看维基百科)

The second is made for MVC, have a specific class diagramm, etc. (I can look on wikipedia if I need)

我写的是什么?

我的2个链接是否正确(说到模式回调)?

Is what I wrote right ?

我们同意回调模式和函数是完全不同的

Are my 2 links correct (speaking of the pattern callback) ?


推荐答案

所以没有回调模式。
有回调函数和一个回调机制(用于观察者模式)。

So there's no such thing as a Callback pattern. There's callback functions and a callback mechanism (used in the observer pattern).

这里是我使用的链接。如果你想要的演示文稿只是问:)
(抱歉,我不得不删除http,因为我没有足够的信誉添加超过2个链接)

Here are the links I used. If you want the presentation just ask ;) (Sorry I had to remove http because I don't have enough reputation to add more than 2 links)

回复搜索。

http://searchdaily.net/tag/callback-pattern/

SOAPatterns.org |设计模式|服务回调。 http://soapatterns.org/design_patterns/service_callback

SOAPatterns.org | Design Patterns | Service Callback. http://soapatterns.org/design_patterns/service_callback

oop - 观察者模式或回调? - 堆栈溢出。
stackoverflow.com/questions/4583269/observer-pattern-or-callback

oop - Observer pattern or Callback? - Stack Overflow.
stackoverflow.com/questions/4583269/observer-pattern-or-callback

回调(计算机编程) - 维基百科,自由的百科全书。 en.wikipedia.org/wiki/Callback_%28computer_science%29

Callback (computer programming) - Wikipedia, the free encyclopedia. en.wikipedia.org/wiki/Callback_%28computer_science%29

RoR指南&解决方案:验证,回调和观察者之间的差异。 rorguide.blogspot.ch/2011/07/difference-between-validations.html

RoR Guide & Solutions: Difference between Validations, Callbacks and Observers. rorguide.blogspot.ch/2011/07/difference-between-validations.html

软件设计模式 - 维基百科,自由的百科全书。 en.wikipedia.org/wiki/Software_design_pattern

Software design pattern - Wikipedia, the free encyclopedia. en.wikipedia.org/wiki/Software_design_pattern

设计模式 - 维基百科,自由的百科全书。

en.wikipedia.org/wiki/Design_Patterns_%28book%29

Design Patterns - Wikipedia, the free encyclopedia.
en.wikipedia.org/wiki/Design_Patterns_%28book%29

oop - 是否有处理回调机制的设计模式? - 堆栈溢出。 stackoverflow.com/questions/946834/is-there-a-design-pattern-that-deals-with-callback-mechanism

oop - Is there a design pattern that deals with callback mechanism? - Stack Overflow. stackoverflow.com/questions/946834/is-there-a-design-pattern-that-deals-with-callback-mechanism

这篇关于设计模式 - 回调的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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