Productive JavaScript Workflow
Upcoming SlideShare
Loading in...5
×
 

Productive JavaScript Workflow

on

  • 2,062 views

Presentation about best development practices for JavaScript teams.

Presentation about best development practices for JavaScript teams.

Statistics

Views

Total Views
2,062
Views on SlideShare
1,872
Embed Views
190

Actions

Likes
4
Downloads
14
Comments
0

4 Embeds 190

http://szafranek.net 183
http://szafranek 4
http://a0.twimg.com 2
http://www.szafranek.net 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Productive JavaScript Workflow Productive JavaScript Workflow Presentation Transcript

  • Productive JavaScript workflow Krzysztof Szafranek
  • Happy beginnings
  • Happy beginnings
  • 11 years later...
  • 2 years> 80 000 lines of JavaScript4 major redesigns15 front-end developers
  • Do you test every change in each browser? Before each commit? × ×
  • Are you sure you didn’t breakany page in the application?
  • Do you know if you didn’tbreak somebody else’s code?
  • You don’t know
  • How to stay sane whileworking on a large JS project? Krzysztof Szafranek
  • Part Ie basics
  • jslint will hurt your feelings Early
  • Unit testing
  • “But we don’t have time to write tests!”“My manager didn’t want unit tests”
  • How do you know your codeworks, when you don’t have a test for it?
  • How do you know your codestill works aer each commit,when you don’t have a test for it?
  • You don’t know
  • Added bonus:Refactorings are a breeze
  • Refactoringwithout tests
  • Which framework?DOH Jasmine RhinoUnitJSUnit screw-unit JasUnitQUnit Test.Simple FireUnitCrosscheck Test.More Js-test-driverJ3Unit TestCase Sinon.jsJSNUnit TestIt SOAtestYUITest jsUnitTest VowsJSSpec JSTest NodeunitUnitTesting JSTest.NET TyrtleJSpec jsUnity
  • Doesn’t matter (As long as you use it)(And is easy to automate)
  • JS Test Driver
  • How about testing layouts?
  • Part IIPutting it all together
  • Running tests in every browser takes timePeople make mistakes
  • Automation to the rescue!
  • Continuous Integration is a soware development practicewhere members of a team integrate their work frequently . . .leading to multiple integrations per day. Each integration isverified by an automated build (including test) to detectintegration errors as quickly as possible.Martin Fowler
  • CI for front-end pushjslint deploy tests
  • Early bug detectionEarly fixesNo more FTP uploadsApplication is always shippable
  • Warning!
  • Part IIIHumans are useful, too
  • Pair programming
  • Best debugging tool ever
  • Code reviews
  • .. soware testing alone has limited effectiveness – the averagedefect detection rate is only 25 percent for unit testing, 35percent for function testing, and 45 percent for integrationtesting. In contrast, the average effectiveness of design andcode inspections are 55 and 60 percent.Steve McConnellCode Complete
  • A little help from the process Not Checked Code Design QAStarted Out Review Review Review Are there unit tests?
  • Before we part1. Use jslint and unit tests to get feedback early2. Use CI to have shippable soware all the time3. Don’t be afraid of your peers (and ducks)
  • Linkshttp://www.jslint.com/http://code.google.com/p/js-test-driver/http://jenkins-ci.org/http://sinonjs.org/
  • krzysztof@szafranek.net Photo credits: SpoiltCat, RemixDave, activeside, kate.gardiner, Jiheffe