Skip to content

Instantly share code, notes, and snippets.

@amcrawford
Forked from rrgayhart/unit-testing-javascript.md
Last active February 25, 2016 19:15
Show Gist options
  • Save amcrawford/efbf6d8b1f3893b620cc to your computer and use it in GitHub Desktop.
Save amcrawford/efbf6d8b1f3893b620cc to your computer and use it in GitHub Desktop.

Consider the four responsibilities that Rebecca lists for client side code (hint: they're color coded).

According to this talk, client side code is responsible for: Presentation & Interaction; Data/ Server Communication; Application State and Setup

  • Did any of the responsibilities that she lists surprise you?

    Not necessarily; coming out of Rails, getting used to putting all of those responsibilities like setup, in particular, feels a bit strange but, working with and having seen some of the projects that we will do and that will force us to manage all of these things in our client-side code it makes sense.

  • Do you feel like you mentally split your client side code in IdeaBox and other past projects into these responsibilities?

    I think that I have tried to create some separation of responsibility within my javascript files in past projects but that my choices have not necessarily been as clean as they could be. I've gone back to some of our older Rails projects and pulled some of my client-side coded out of the giant application.js file but think that I still need some work on consciously creating a client-side project structure that makes sense and separates responsibilities appropriately.

@rrgayhart
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment