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?
- None of them are really surprising, however it's defining the different parts of the code is a powerful concept. It makes testing easier and more concise.
-
Do you feel like you mentally split your client side code in IdeaBox and other past projects into these responsibilities?
- I tried to with ideabox, but I definitely did not. especially with view/presentaion code. It would have been better to have methods that handle just the presentation and make other methods to handle data manipulation. Step Four: Totally Optional: take a look at some of the other forks and comment if the spirit moves you.
👍