Maybe a silly question this, but I'm a rookie developer.
Lets say, in a data-driven CRM'ish application, I have a customer type that can go through a number of phases - i.e. phases 1 - 5.
As a customer changes phase - events should trigger. Example - as a customer enters phase 3 from phase 2, an email is sent, some lists are updated and some calculations are performed.
I'm imagining that a customer changing state could be the result of a user of the application manually updating the customer through some graphic interface.
So I'm wondering - should I handle this by asserting that there's only one way to update the phase state of the customer, and then insure that whenever that action completes, a list of actions are carried out?
In my mind (and scenario) this would mean retrieving a customer from a relational database, updating a phase field, persisting the customer back down, and then always reacting to this action by firing off whatever actions are registered as dependent on that particular phase change. However I'm not sure this would be smart if I wanted to do a batch phase change of 10.000 customers.
Any thoughts at all to this? I'm really just looking for any kind of input - assume that I'm completely clueless.