JavaScript Coding Standards: Difference between revisions

From Wikipedia of the Dark Brotherhood, an online Star Wars Club
m (Vexxtal Bot: Article underlinked, underlinked template added.)
mNo edit summary
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Underlinked}}== Inline JavaScript ==
{{eras|real}}
Inline JavaScript - e.g. the use of HTML attributes such as: onclick, onmouseover, onmouseout, etc - is an outright no-no.  Do NOT do this.  Instead, opt for event binding.
<center>
<table border="1">
<tr><th colspan="3"> [[Dark Brotherhood]] Coding Standards
</th></tr>
<tr><td colspan="3" align="center"> [[Coding Standards and Practices]]
</td></tr>
<tr>
<td> [[ASP Coding Standards]]
</td>
<td> [[CSS Coding Standards]]
</td>
<td> [[Database Standards]]
</td>
</tr>
<tr>
<td> [[HTML Coding Standards]]
</td>
<td> [[JavaScript Coding Standards]]
</td>
<td> [[PHP Coding Standards]]
</td>
</tr>
</table>
</center>


== jQuery ==
== Inline JavaScript  ==
The Brotherhood standardizes on the [http://jquery.com jQuery] library. All JavaScript should be written using jQuery; either using Core jQuery, jQuery plugins, or DJB created jQuery plugins.
Inline JavaScript - e.g. the use of HTML attributes such as: onclick, onmouseover, onmouseout, etc. - is an outright no-no. Do NOT do this. Instead, opt for event binding.


== Script Inclusion ==
Including JavaScript within '''script''' tags in the HTML is not advised.  Use an external file where possible.  This allows the individual files to be cached by browsers independent of the HTML file.


[[Category: DJB Info]]
==  jQuery  ==
[[Category:Coding Standards]]
The Brotherhood standardizes on the [http://jquery.com jQuery] library. All JavaScript should be written using jQuery; either using Core jQuery, jQuery plugins, or DJB created jQuery plugins.
 
 
==  Script Inclusion  ==
Including JavaScript within '''script''' tags in the HTML is not advised. Use an external file where possible. This allows the individual files to be cached by browsers independent of the HTML file.
 
 
[[Category:Coding Standards]]

Revision as of 18:46, 18 July 2016

Real World Perspective.
Dark Brotherhood Coding Standards
Coding Standards and Practices
ASP Coding Standards CSS Coding Standards Database Standards
HTML Coding Standards JavaScript Coding Standards PHP Coding Standards

Inline JavaScript

Inline JavaScript - e.g. the use of HTML attributes such as: onclick, onmouseover, onmouseout, etc. - is an outright no-no. Do NOT do this. Instead, opt for event binding.


jQuery

The Brotherhood standardizes on the jQuery library. All JavaScript should be written using jQuery; either using Core jQuery, jQuery plugins, or DJB created jQuery plugins.


Script Inclusion

Including JavaScript within script tags in the HTML is not advised. Use an external file where possible. This allows the individual files to be cached by browsers independent of the HTML file.