Skip to content

Instantly share code, notes, and snippets.

@GregoryArmstrong
Forked from rrgayhart/testable-js.markdown
Last active April 6, 2016 01:13
Show Gist options
  • Save GregoryArmstrong/6350c397a36738982037c00e077b7081 to your computer and use it in GitHub Desktop.
Save GregoryArmstrong/6350c397a36738982037c00e077b7081 to your computer and use it in GitHub Desktop.
Writing Testable JavaScript

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?
  • I've never quite thought of them in these exact divisions, but they're not too surprising to see. If I had to pick one as the most surprising, I'd say the setup responsibility. In my mind everything is set up by the server and just presented to the client, who then sends a response. But I suppose now that I see it listed by Rebecca, there is some inherent setup on the client side to take what information has been delivered by the server, and execute it / get it ready to be shown to the client.
  • Do you feel like you mentally split your client side code in IdeaBox and other past projects into these responsibilities?
  • Yes except for the setup, for the same reason as the previous answer. I'll begin to try and think of my code in these four divisions for the next project.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment