Hi Nwuan, You should link this from https://sites.google.com/a/wso2.com/engineering/
--Srinath On Wed, May 23, 2012 at 2:01 PM, Tharindu Mathew <[email protected]> wrote: > Hi Nuwan, > > +1 for the idea. Can we pick a subset of the tools and do a session on how > to apply it? It might help to gain wider adoption. > > > On Wed, May 23, 2012 at 1:05 PM, Nuwan Bandara <[email protected]> wrote: >> >> Hi All, >> >> Writing javascript code should not be considered lightly. It is as serious >> as your server code. If you write crappy code and create bugs, comparatively >> they are harder to find and solve; During code reviews please make sure >> following guidelines are also met for any javascript code written by >> developers. >> >> As a general standard for Javascript programming, developers need to >> adhere to the javascript guide [1] originally published by Google. >> >> As for tools, >> >> For code sanity check - JSLint [2] or Closure Linter [3] >> Javascript documentation - JSDoc-toolkit [4] >> Unit testing - QUnit [5], JSUnit [6] >> Javascript minification - JSMin [7], YUICompressor [8], Closure Compiler >> [9] >> >> What you MUST do >> >> All javascript that are written need to be checked against JSList. This is >> something similar to find-bugs for java. >> All scripts that are being used across the platform need to be minified, >> from any of the tools mentioned above. >> Create Unit tests for code javascript code you wright, use one of the >> tools above. (QUnit proves to be easier) >> Try to do documentation as much as possible and use JSDoc to generate >> documentation >> >> I have documented there guide lines >> at https://sites.google.com/a/wso2.com/engineering/standards-conventions/javascript-standards-tools. >> (for internal reference) If I have missed anything please do update the >> document. >> >> With increase use of javascript as server-side language, I believe we need >> conventions and guidelines in-place. We will be creating/modifying tools >> such as JSLint, JSMin, JSDoc and QUnit to be compatible with Jaggery as >> well. >> >> [1] http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml >> [2] https://code.google.com/p/jslint4java/ >> [3] https://developers.google.com/closure/utilities/ >> [4] http://code.google.com/p/jsdoc-toolkit/ >> [5] http://docs.jquery.com/QUnit >> [6] http://www.jsunit.net/ >> [7] http://code.google.com/p/jsmin-ant-task/ >> [8] http://developer.yahoo.com/yui/compressor/ >> [9] https://developers.google.com/closure/compiler/ >> >> >> -- >> Thanks & Regards, >> >> Nuwan Bandara >> Associate Technical Lead & Member, MC, Development Technologies >> WSO2 Inc. - lean . enterprise . middleware | http://wso2.com >> blog : http://nuwanbando.com; email: [email protected]; phone: +94 11 763 >> 9629 >> >> > > > > -- > Regards, > > Tharindu > > blog: http://mackiemathew.com/ > M: +94777759908 > > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > -- ============================ Srinath Perera, Ph.D. http://www.cs.indiana.edu/~hperera/ http://srinathsview.blogspot.com/ _______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
