I am redesigning my full website and using Yii to do it. I have a lot of questions most are starting to be answered while i have been using Yii and reading about it.
One question i haven’t answered myself is:
For a stock control system should I use behaviours or just call a function when it’s needed. For example, when an item has been removed from stock (when the order has been click sent in the system) should i have an event StockRemoved and then a behaviour onStockRemoved somewhere else in my code? Or should i just call a function needed to remove the item from stock?