You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current design pattern makes it very complicated when implementing complex handlePOST or PATCH methods.
Since in real life world additional checks, transformations have to be made before executing, custom logs, notifications should be processed after and flags and messages to be passed between these two.
Current validationCallbacks and viewCallback is no fit for the job, since passing message requires passing variables by reference so the modified value can be passed to viewCallback
Proposals:
a Perhaps a layered pattern like small middleware will be useful
b Use context for callables
An alternative approach might be to create an object context and transform callables to closures, so set context for them.
The text was updated successfully, but these errors were encountered:
Since it seems that most of the checks are reusable, a middleware solution seems ideal
Of course a name conversion for compatibility should be used since a lot of attributes should be read and written in each layer
Further discussion needed
Current design pattern makes it very complicated when implementing complex handlePOST or PATCH methods.
Since in real life world additional checks, transformations have to be made before executing, custom logs, notifications should be processed after and flags and messages to be passed between these two.
Current validationCallbacks and viewCallback is no fit for the job, since passing message requires passing variables by reference so the modified value can be passed to viewCallback
Proposals:
An alternative approach might be to create an object context and transform callables to closures, so set context for them.
The text was updated successfully, but these errors were encountered: