際際滷

際際滷Share a Scribd company logo
Amplify your stack
(suggestions on how to enhance your development setup)
My names Pi.
I love setups.
 (lets talk about yours)
bad foundation
Lets make this better
      Own the browser.
Organize your code
Fixtures are great
A uni鍖ed way to mock all your backend data.
$.鍖xture( /* magic */ )
or

$.ajax({
    url:your/fancy/url/,
    鍖xture:magic
});
Amplify your stack - Jsfoo pune 2012
Amplify your stack - Jsfoo pune 2012
protip: great for
backbone, spine, et al
AND the backend team has a neat reference point
write your model tests
     on this data
write your model tests
     on this data
       speaking of which...
write your model tests
     on this data
         speaking of which...

     you do write unit tests, yes?
鍖xtures + unit tests =
 photoshop for code
  formalized code outline is teh awesome.
essentially
 test(function(done){
        var v = you.do.something();
        make.sure(v).equals(expected)
         });
every new
bug/ feature/ issue
 gets a new test
   measure twice, cut once.
qunit, mocha/expresso,
 jtestdriver, yuitest/yeti/
jute, jasmine... go crazy!
I promise you, this
    saves time.
     but dont overdo it.
embrace templating.
stop constructing html inside your scripts. its irritating.
Amplify your stack - Jsfoo pune 2012
Backbone.Router
html5! page transitions! save state on client side! of鍖ine
              cache! localStorage! ponies!

point is, you can save and do a lot more client side now.
37signals,
linkedin mobile,
       etc
a note on deployment
[development]
(staging)
{production}
tips.
 automate as much as you can.
 stub generators, builds, perf tests, 鍖xtures,
  con鍖gurations, pages(?).
 DEVELOP BOLDLY.
 refactor slowly. refactor smartly.
 EVERY site becomes a single page app.
Sangam
[ shameless plug - https://github.com/threepointone/Sangam ]

More Related Content

Amplify your stack - Jsfoo pune 2012