#The JavaScript Developer’s Playbook
Writing production quality JavaScript is hard, but it's not impossible. This talk looks at the patterns, tools, libraries and workflows that Test Double uses to be successful with this challenging language in the browser. I talk about the pain we've felt from mistakes we've made and how that informed Lineman.js, our build tool.
We'll cover when it's a good idea to isolate the frontend code and how to do that. I'll talk about stubbing API calls so that frontend workflow can be free of server side concerns. Finally, we'll cover the testing libraries and tools that Test Double uses to keep code sane.
###Outline
####Who We Are ####What We Do
- SPAs - Isolated from Backend
- Whole Projects - backend + frontend
- Libraries - No server
- Servers - Node, Clojure, Rails
- Work in a variety of cultures. Cannot depend on Asset pipeline.
####Workflow
- Tech Choices (Lineman, Angular, Jasmine, CoffeeScript)
- HTML prototype
- outside in - drill down
- e2e tests
- unit tests
- Stub out API calls, use as a document to spec out server API
- Handoff to server team or move
####Lineman
-
JavaScript - Second class citizen by default
-
We treat client code as peer to server code
-
Grunt based front-end tool. Not a framework. No production server opinions. Only language dependency is Node.
- Development server.
- Build. (compile, lint, concat, min)
- Test runner
- CI
- Distribute
-
Neutral ground. Cannot guarantee asset pipeline or other platform specific tools
-
Pre-configured grunt tasks based on assumptions. Over-rideable.
-
http://blog.testdouble.com/posts/2013-11-12-1st-class-web-development-with-lineman.html