New hoptoad_notifier plugin

4 views
Skip to first unread message

Joe Ferris

unread,
Jul 29, 2009, 10:35:56 AM7/29/09
to Hoptoad Notifier Dev
Hi,

We plan on releasing a newly improved hoptoad_notifier plugin to go
with our new API. Here are our goals for the new notifier:

* Maintain interface compatibility with the previous notifier
* Separate concerns in the implementation
* Better documentation
* Stable API
* Make it easier to use outside a Rails app
* Make it easier for other notifier plugins to reuse components

Our efforts are taking place in a Git branch, viewable on Github:
http://github.com/thoughtbot/hoptoad_notifier/tree/refactoring

Currently, I plan on splitting the notifier into the following
components:

Interface: HoptoadNotifier
Configuration: HoptoadNotifier::Configuration
Sending: HoptoadNotifier::Sender
Normalization: HoptoadNotifier::Notice
Catching: HoptoadNotifier::Catcher

Here's the general flow for a Rails application:

* The user calls HoptoadNotifier.configure from an initializer
* #configure yields a Configuration instance
* The Configuration instance is kept as HoptoadNotifier.configuration
* A Sender is created using the configuration and kept as
HoptoadNotifier.sender
* Catcher is included into ActionController::Base
* An exception is raised during a controller action
* The exception is rescued by Catcher
* The exception is converted into a Notice
* The Notice normalizes the exception data
* The Notice generates XML for the exception
* The XML is passed to the Sender
* The Sender delivers the XML to the Hoptoad server

As a user of Hoptoad, everything but the first step is invisible. Even
as a notifier author, you wouldn't need to use most of this, but we're
hoping that separating these components will make is easier for
authors to swap in their own implementations of each concern.

hoptoad_notifier also sends a client name and version now, and we will
be requiring these fields in the new API.

As an author of a Ruby Hoptoad Notifier library, what else can we do
to make things easier for you? What problems have you run into, and
how can they be solved by the upcoming API and notifier?

Thank you for your time, and I hope to hear back soon.

-Joe Ferris
thoughtbot, inc.
Reply all
Reply to author
Forward
0 new messages