providing hooks

5 views
Skip to first unread message

Nicolaas Thiemen Francken - Sunny Side Up

unread,
Jun 14, 2012, 7:48:45 PM6/14/12
to Silverstripe Ecommerce
Hi Everyone

When writing a SS module, is there a best practice for providing hooks (allowing decorators to update return values, etc....)?  Where should they be provided, to what methods, in what form.  

Also, I noticed that the pass-by-reference, which is often used in hooks, will be depreciated.  Should that be avoided? 

Am I right to believe that extending a class is preferred over adding a decorator and that we only use decorators where we can not extend?

I hope this is not a stupid question, but I am looking at providing a more standardised way to provide "hooks" in e-commerce and I want to get this right.

Thank you very much for any help.

Nicolaas

Nicolaas Thiemen Francken - Sunny Side Up

unread,
Jun 14, 2012, 9:29:37 PM6/14/12
to Silverstripe Ecommerce
Reply all
Reply to author
Forward
0 new messages