Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Amplify your stack - Jsfoo pune 2012

1,924 views

Published on

Published in: Technology
  • Be the first to comment

Amplify your stack - Jsfoo pune 2012

  1. 1. Amplify your stack(suggestions on how to enhance your development setup)
  2. 2. My name’s Pi.
  3. 3. I love setups. (let’s talk about yours)
  4. 4. bad foundation
  5. 5. Let’s make this better Own the browser.
  6. 6. Organize your code
  7. 7. Fixtures are greatA unified way to mock all your backend data.
  8. 8. $.fixture( /* magic */ )or$.ajax({ url:‘your/fancy/url/’, fixture:magic});
  9. 9. protip: great forbackbone, spine, et alAND the backend team has a neat reference point
  10. 10. write your model tests on this data
  11. 11. write your model tests on this data speaking of which...
  12. 12. write your model tests on this data speaking of which... you do write unit tests, yes?
  13. 13. fixtures + unit tests = photoshop for code formalized code outline is teh awesome.
  14. 14. essentially test(function(done){ var v = you.do.something(); make.sure(v).equals(expected) });
  15. 15. every newbug/ feature/ issue gets a new test measure twice, cut once.
  16. 16. qunit, mocha/expresso, jtestdriver, yuitest/yeti/jute, jasmine... go crazy!
  17. 17. I promise you, this saves time. but don’t overdo it.
  18. 18. embrace templating.stop constructing html inside your scripts. it’s irritating.
  19. 19. Backbone.Routerhtml5! page transitions! save state on client side! offline cache! localStorage! ponies!point is, you can save and do a lot more client side now.
  20. 20. 37signals,linkedin mobile, etc
  21. 21. a note on deployment
  22. 22. [development]
  23. 23. (staging)
  24. 24. {production}
  25. 25. tips.• automate as much as you can.• stub generators, builds, perf tests, fixtures, configurations, pages(?).• DEVELOP BOLDLY.• refactor slowly. refactor smartly.• EVERY site becomes a single page app.
  26. 26. Sangam[ shameless plug - https://github.com/threepointone/Sangam ]

×