Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
Forward_Event
I just want to clear up my knowledge of the Forward_Event function.
Our old product does not use SRP's Frameworks. The is no Write_Pre support for example.
When I was introduced to OI, I was told inhouse that by the time the code in the Write event in the form was executed the actual write to the DB had already happened. However, in most of the Write events there is some code, then a Forward_Event, then some more code. I was further told that basically this behaved like a Pre-Write-Post situation.
I never really questioned it because I didn't really need to.
Now I am supporting some old code and sort of need to understand the flow.
The doc explains "The Forward_Event subroutine allows the current event to be passed to the next event handler in the current chain. This enables an event handler to implement some processing both before and after the remainder of the event chain."
My question is this:
Using a forward event allows the Write to behave with Pre-Write-Post behaviors? If so, with no Forward event, would that not make the Write a PRE action, not a POST?
Our old product does not use SRP's Frameworks. The is no Write_Pre support for example.
When I was introduced to OI, I was told inhouse that by the time the code in the Write event in the form was executed the actual write to the DB had already happened. However, in most of the Write events there is some code, then a Forward_Event, then some more code. I was further told that basically this behaved like a Pre-Write-Post situation.
I never really questioned it because I didn't really need to.
Now I am supporting some old code and sort of need to understand the flow.
The doc explains "The Forward_Event subroutine allows the current event to be passed to the next event handler in the current chain. This enables an event handler to implement some processing both before and after the remainder of the event chain."
My question is this:
Using a forward event allows the Write to behave with Pre-Write-Post behaviors? If so, with no Forward event, would that not make the Write a PRE action, not a POST?