Step One: Watch Writing Testable JavaScript - Rebecca Murphey from Full Frontal 2012 (award for worst conference name ever?)
Step Two: Fork this gist.
Step Three: Consider the four responsibilities that Rebecca lists for client side code (hint: they're color coded).
- Did any of the responsibilities that she lists surprise you?
- All of the responsibilities that Rebecca lists make sense now, but I hadn't thought to break up my Javascript that way before. In the past, I wrote code based on convenience instead of splitting them up into clearly-defined pieces. I really like the data/communication/server interactions piece, as I wasn't breaking up my code that way before.
- Do you feel like you mentally split your client side code in IdeaBox and other past projects into these responsibilities?
- No, however, it's makeing a lot more sense as I become more comfortable with JS how to structure files/functions into individual responsibilities.
Step Four: Totally Optional: take a look at some of the other forks and comment if the spirit moves you.
👍