You are right, we should think about how to make this more clear.
When you create a content type there is no cloud code associated with it. We show a default snippet to allow customers to get started quickly, but it is not stored anywhere. It gets stored and associated with the content type only after you click the Save button.
Once we have some cloud code, we store which event handlers are defined there and we execute the cloud code module only for those events. So, for example, if only beforeRead and afterCreate are defined, we will not invoke the cloud code module for DELETE and UPDATE requests, only for CREATE and READ. Thus, it is better to have nothing, than to have an empty handler.
Hope this makes sense.
Do you enjoy Icenium? Vote for it as your favorite new product here (use short code H048S).
Looking for tips & tricks directly from the Icenium team? Check out our blog!
Share feedback and vote for features on our Feedback Portal.