Matt,
Matt Kruse wrote:
> Laurent Bugnion [MVP] wrote:
>> In agreement with the head of our R&D department, I published my
>> firm's JavaScript Coding Guidelines.
>
> Fantastic!
> Although I don't agreement with all of the conventions, I think that
> publishing documents like this could give someone a good place to start from
> in trying to make their coding more consistent, and in the end that will be
> nothing but positive. Thank you for sharing.
To be honest, I also don't agree with all of them (though I strictly
adhere to them in my job, and use my own set in my private projects).
Guidelines like this are a teamwork, and sometimes we had to compromise.
> Do you use any tool to check that js source files adhere to these standards?
We don't, but we used code reviews, where one of the criteria tested was
the enforcement of these guidelines.
> What positive impact has this document had in your work environment - do
> people follow it?
Yes, very much so. In fact, the situation was relatively easy, because
most of my coworkers didn't have much (if any) experience with
JavaScript, so they kind of believed me when I told them that this was
the way to go

Seriously, the people I worked with (and coordinated)
in that project did an excellent job. For the records, the application
is an ASP.NET web application used for building automation. The server
part relies on an existing unmanaged C++ product which we extended with
..NET code. We rely on .NET remoting for communication between the web
server and the C++ server, and make quite intensive use of web services
between the client and the web server. We already had the web
application up and running for more than 2 weeks in intensive test
conditions without any trouble. We wrote about 15000 lines of code (not
counting generated code, for which we wrote a JavaScript cross compiler).
The development time was about 1.5 years
> Is it enforced? Was there any push back against it?
No push back. All the developers are professionals with many years
experience in other languages (C++, Java, C# mostly) and all of them
understand the value of guidelines.
Greetings,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog:
http://www.galasoft-LB.ch
PhotoAlbum:
http://www.galasoft-LB.ch/pictures
Support children in Calcutta:
http://www.calcutta-espoir.ch