[web-devel] real Models in Yesod
vlado at dikini.net
Wed Jul 13 12:53:43 CEST 2011
> The main aspect is the addition of triggers, which are callbacks ran before
> a save to the database. A trigger is either a validator or a modifier.
> A validator is run as a callback before a save to the database.
The key, IMHO, will be the order of execution of the callbacks. In
most, if not all, systems I've used so far, based around such
architecture this was their Achilles heel. Drupal hooks are one
The problem stems from the weird abstractions - you either don't know
enough what else is out there, or you know too much. both of which are
bad. Subject-observer while good, has its downsides :(
The other option is to enforce separation of the results of the
callbacks, so that the output is always deterministic.
More information about the web-devel