Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize event-handlers naming convention (on, onbefore, onafter) #29

Open
cedricfrancoys opened this issue Mar 6, 2023 · 0 comments
Labels

Comments

@cedricfrancoys
Copy link
Collaborator

cedricfrancoys commented Mar 6, 2023

For now (on, onbefore, onafter)

  • ondelete = onbeforedelete
  • onupdate = onbeforeupdate
  • oncreate = onaftercreate (!)

alternate notation: oncreate(before)/oncreated(after), onupdate(before) /onupdated(after)

Global methods (oncreate, onupdate, ondelete) conflict with fields and are ambiguous regarding their execution timing
They are still useful, but we should :

  1. discourage their use
  2. always use the explicit version (onbefore… or onafter…)
  • oncreate / onaftercreate
  • onbeforeupdate
  • onafterupdate
  • onbeforedelete
  • onafterdelete
@cedricfrancoys cedricfrancoys moved this to 📋 Backlog in eQual Jun 18, 2023
@cedricfrancoys cedricfrancoys changed the title standardize event handlers naming convention Standardized event-handlers naming convention Jun 18, 2023
@cedricfrancoys cedricfrancoys changed the title Standardized event-handlers naming convention Standardize event-handlers naming convention (on, onbefore, onafter) Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🔖 Ready
Development

No branches or pull requests

1 participant