sweh / ajja

JavaScript library for simple creation of forms and display of collections
MIT License
2 stars 0 forks source link

Explain and maybe clean up events and deferreds #13

Open sweh opened 10 years ago

sweh commented 10 years ago

Originally reported by: Thomas Lotze (Bitbucket: tlotze, GitHub: tlotze)


Events and state of the form are communicated by either triggering Javascript events, manipulating Deferreds, or sometimes both. It should be clearer and better documented why these things are done the way they are done; it just might turn out that things can be made simpler.

One example is the signalling of the fact that a form has been loaded. This uses both an event and a Deferred, with the latter being there at least for testability according to the comments.