#Developers Hangout: JavaScript Events
###Example app with event-driven architecture
App folder
Given code is written with help of basic classes from backbone.js framework.
There are 2 main entities in the app: Boss and Employee. Boss has EmployeeCollection
as a property stored. He has limited budget and he distributes it between his
Employees.
Each time Employee has worked 50 times, he asks Boss if his salary may be increased. Boss checks if his budget is bigger than the salary Employee asks for and makes a decision.
If Employee's salary reaches 800, he gets happy.
Note: the code in app folder is not a working app but rather set of code snippets showing certain concept. The structural code is placed here
###Custom mediator object
Source
A very simple mediator object implementation. Contains commentaries describing basics.
Lacks events unbinding, callback execution priorities, context passing, once subscription.
###Modules worth looking at
####Capo
####Mediator / pubsub implementations
###Recommended reading list
- Essential JS Design Patterns by Addy Osmani