[asterisk-app-dev] Event naming conventions

Paul Belanger paul.belanger at polybeacon.com
Mon Oct 28 21:28:35 CDT 2013


On Mon, Oct 28, 2013 at 9:50 PM, Matthew Jordan <mjordan at digium.com> wrote:
>
> 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.
>
So, lets have that discussion.  And we'll keep it simple, which tense
should be have:

StartStasis
StartedPlayback

Do you agree we should pick one or just have two different?

> 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.
>

-- 
Paul Belanger | PolyBeacon, Inc.
Jabber: paul.belanger at polybeacon.com | IRC: pabelanger (Freenode)
Github: https://github.com/pabelanger | Twitter: https://twitter.com/pabelanger



More information about the asterisk-app-dev mailing list