Best of Fluent 2012: Maintainable JavaScript




Video of Nicholas Zakas from his Fluent Conference 2012 Presentation

Maintainable JavaScript tackles the difficult problem of writing code as part of a large team. When you’re writing code that only you will change, there aren’t any issues. As soon as you’re writing code that someone else is going to also be changing, you need to think harder about the decisions you make. Will another developer be able to understand what you did? Did you organize your code in such a way that it’s easy to adapt and extend? Long after you’re gone, will others be able to continue using the same code, or will it need to be rewritten because no one understands it? This session shows the best practices used by teams to ensure their JavaScript is as maintainable as possible.

NOTE: To view an HD version go to: http://youtu.be/nZihjH6_Qns

About Nicholas Zakas

Nicholas C. Zakas worked at Yahoo! for almost five years, building and defining front-end strategy for some of Yahoo’s largest sites. Nicholas is also the author of several books, including High Performance JavaScript, Professional JavaScript for Web Developers, and Professional Ajax.

Don’t miss an upload! Subscribe! http://goo.gl/szEauh
Stay Connected to O’Reilly Media by Email – http://goo.gl/YZSWbO

Follow O’Reilly Media:
http://plus.google.com/+oreillymedia
https://www.facebook.com/OReilly


Original source


42 responses to “Best of Fluent 2012: Maintainable JavaScript”

  1. The XMLHttpRequest name feels wrong no matter how you write it.

    Xml? Who capitalizes Xml? Ok, all caps then, like in the wild
    But how about the Http part then? If we put it all caps the reader will lookup for the new XMLHTTP protocol. We need to separate it somehow. Underscore? Well yes, but we use underscore for separating words in variable names. 

    There is absolutely no way to win this. Only by completely changing the object name. But how could you name the object of an XML HTTP request? ARGH!

  2. Thats one thing that makes Java and class based languages better than Javascript. If someone overrides a method in Javascript it can take days to figure out the bug. However in Java its only a matter of seconds to find incompatible overrides due to compile time checking.

  3. I like Nicolas Zakas’ talks a lot, because they are densely informational and I always take a lot out of them. What I don’t like about them is N. Zakas’ often embarassing attempts at humor (which – admittedly – mostly suffer from the moody reactions of the respective ,crowd’ he’s speaking to).
    In this one however, he seems much more relaxed and does not try to enforce laughs, which made the whole talk not only informative, but also very entertaining and even funny.

  4. Yes i mean it. we must kill the bad fat and belly first to get the 6 pack.

    Listen to this I saw an interview with body building champion where he talks about 7 odd foods he eats to keep his abs hard.

    have a look here bit.ly/19cFq2R?=plrwo

  5. Hey RO2player, why don't you join the rest of us in the wonderful world of 'check the description for the HD link' before posting a comment that already has been addressed? Go on, try it, you might like it.

  6. okthoajjavaentetrwhatwmownmaniowomwei0j3923i39082948384384934902048902q8+(4093mipwjofeiof)(fijckjkljdjwweofmariojwiojfiojewwahowhwfiowejfeijeiorjocldjkljahamenteryhahepjwpjsjwijiwj3i9eiji3j4ioj34j3wejt-t=e.

  7. I am new to Javascript coding and thought this was a great video!

    I have a question though.

    At 30:00 it says to keep css style out of Javascript. How would one manipulate the css style of an html element then?

    Example code:
    jsfiddle.net/5Ba2u/

    How would the above be done for better coding practice?
    Thanks in advanced.

  8. I assume you're referring to the fact that Pi is all caps? All of the Math constants are capitalized, following the general practice of capitalizing constants (the slide following camel casing).

  9. I'd just like to state for the record that "Id" is not an acronym, its an abbreviation. It means "Identification" or "Identifier", not like "I-Dentifier". So capitalizing both letters would be incorrect.

  10. I once had a 45 minute argument about whether or not JSLINT errors should break our jenkins build. Though the style itself doesn't effect the program, it was a good way to enforce our style guide. Any thoughts?

  11. This is a great video. JavaScript doesn't allow you to really split your programming patterns but this video gives you simple tips on how to understand and maintain JavaScript code better.

Leave a Reply