Skip to content

Instantly share code, notes, and snippets.

View gicappa's full-sized avatar
🏠
Working from home

Gian Carlo Pace gicappa

🏠
Working from home
  • Hyland / Alfresco
  • Gallarate, VA
  • X @gicappa
View GitHub Profile
@avdi
avdi / gist:3842243
Created October 5, 2012 20:38
Observer pattern terminology

When it comes to the Observer pattern, there are a number of related, overlapping terms used by different codebases. Off the top of my head:

  • Observer/Observable/Subject
  • Listener/Listenable
  • Event/Event source/Event sink/Event handler
  • Hook/Callback
  • Subscriber/Subscribable
  • "Firing" vs. "Triggering" vs "Notifying" vs "Executing"

Which of these do consider to be synonymous?

@dagobah
dagobah / sketch.rb
Created July 6, 2012 06:49 — forked from mattwynne/sketch.rb
sketch for Matt Wynne
class Organization
def to_param
"42"
end
def saved?
rand < 0.5
end
end