[asterisk-app-dev] Event naming conventions
Matthew Jordan
mjordan at digium.com
Mon Oct 28 20:50:50 CDT 2013
On Mon, Oct 28, 2013 at 7:49 PM, Paul Belanger <paul.belanger at polybeacon.com
> wrote:
> On Tue, Oct 22, 2013 at 12:03 PM, Matthew Jordan <mjordan at digium.com>
> wrote:
> >
>
>
<snip>
> To keep this thread going, I'm going to start work on a patch and I'll
> be using past tense for the events. Here are some examples of the
> syntax we use, what do people prefer:
>
> Started / Stopped
> - StasisStarted / StasisStopped
> - PlaybackStarted / PlaybackStopped
>
> Started / Ended
> - StasisStarted / StasisEnded
> - PlaybackStarted / PlaybackEnded
>
> Started / Finished
> - StasisStarted / StasisFinished
> - PlaybackStarted / PlaybackFinished
>
> Created / Destroyed
> - BridgeCreated / BridgeDestroyed
> - ChannelCreated / ChannelDestroyed
>
> Feedback welcome
>
>
This isn't an all or nothing proposition. You can't pick "Stopped" as the
only valid verb, than suppose that "ChannelStopped" is the same thing as
"ChannelDestroyed". The two have vastly different semantic meanings - one
implies stopping an ongoing action (in which case, is Channel an object or
an operation?) - the other implies that an object's lifetime has ended and
its resources reclaimed.
I'm not comfortable making unilateral rules such as this and applying them
to any interface. If there are particular events that fail to convey their
semantics given their current name that's worth having a discussion over;
otherwise, I'm not sure I'd proceed with this change.
Matt
--
Matthew Jordan
Digium, Inc. | Engineering Manager
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-app-dev/attachments/20131028/4b2e0de0/attachment.html>
More information about the asterisk-app-dev
mailing list