When you are working in team environments, a common coding standard is very helpful.
What I do is to define the coding standard to be implemented for a project, then do periodic code reviews to make sure the standards are being applied as well as making sure the code actually works and is sound.
(after thought - make sure your coding standards define how you'll do indentation - 4 spaces, 1 tab character, etc....)
Coding standards are common for a number of projects. I thought I had seen one for jQuery but am not seeing it right now. I did find this one for the jQuery.UI - http://jqueryui.pbworks.com/Coding-standards. Drupal has one at http://drupal.org/node/260140, and Zend Framework's is at http://framework.zend.com/manual/en/coding-standard.html (though it is down for me at the moment).
Code reviews should be done by someone who has sufficient background with the project to understand the "big picture". These reviews should not be done to ridicule anyone - there are syntax/logic issues, and then there are style issues. Where you might use a while loop, someone else may use a for loop - both are right, as long as the syntax and business logic are done right. Don't harp on anyone for style issues, though mentioning it and explaining why you use YOUR style can lead to some interesting discussions and growth for everyone.
Regarding best practices, I know there have been a few web postings for jQuery/JavaScript best practices. Here's one: http://www.smashingmagazine.com/2008/09/16/jquery-examples-and-best-practices/
Best Practices and Coding Standards should ALL be subject to the job at hand. That is, don't force the developers to jump through meaningless hoops just to satisfy and "administrative" requirement. Allow deviations from the target where it makes sense. On the other hand, getting all developers to use a common standard for a project does help quite a bit when collaborating.
Noel GUILBERT wrote:
Hello, I'm working on a document to standardize javascripts development for my team. Actually, each developer writes and organize its code in its own way, and it's currently a nightmare when an other developer have to work on the code of another. I've read a lot of interesting articles about javascript best practices, but all are about coding. There are not bad, but I'm more looking about packaging and organization. As we use jQuery for almost all our project, what is the best way to use jQuery to build RIA ? Should I build plugins for each feature ? How do you manage i18n and l10n ? Thanks! Noel