Various events within NGN are not named in a consistent way. I'd like to suggest a naming syntax to be used as standard for all events within NGN, JET, and any project in which we use either:
<event-namespace>.<event-target>.<event-name>
For example, if we have an app app which has a sidebar sidebar, and we want to show or hide it, we would use the following events:
app.sidebar.show or app.sidebar.hide
Each part of the event name is delineated with a ..
These events might fire additional events to indicate they are in a state of processing, in which case they should use the same <event-name> but in present tense:
app.sidebar.showing or app.sidebar.hiding
They also might fire additional events to confirm their completion, in which case they should use the same <event-name> but in the past tense:
app.sidebar.shown or app.sidebar.hidden with "hidden" used as a verb.
Event names should not reflect state, only actions, ie app.sidebar.visible or app.sidebar.hidden with "hidden" used as an adjective.
As another example, if we have a data model model, and we want to update a field, we might use this event:
model.field.update, and the completion event fired would be model.field.updated
Various events within NGN are not named in a consistent way. I'd like to suggest a naming syntax to be used as standard for all events within NGN, JET, and any project in which we use either:
<event-namespace>.<event-target>.<event-name>For example, if we have an app
appwhich has a sidebarsidebar, and we want to show or hide it, we would use the following events:app.sidebar.showorapp.sidebar.hideEach part of the event name is delineated with a
..These events might fire additional events to indicate they are in a state of processing, in which case they should use the same
<event-name>but in present tense:app.sidebar.showingorapp.sidebar.hidingThey also might fire additional events to confirm their completion, in which case they should use the same
<event-name>but in the past tense:app.sidebar.shownorapp.sidebar.hiddenwith "hidden" used as a verb.Event names should not reflect state, only actions, ie
app.sidebar.visibleorapp.sidebar.hiddenwith "hidden" used as an adjective.As another example, if we have a data model
model, and we want to update a field, we might use this event:model.field.update, and the completion event fired would bemodel.field.updated