Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • D digitec-wiki
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Digitec
  • digitec-wiki
  • Wiki
  • javascript coding standards

javascript coding standards · Changes

Page history
rcabral created page: dependency-management authored Mar 22, 2014 by Rene Cabral's avatar Rene Cabral
Hide whitespace changes
Inline Side-by-side
javascript-coding-standards.markdown
View page @ 12431c2d
...@@ -14,6 +14,31 @@ ...@@ -14,6 +14,31 @@
This is a set of coding conventions and rules for use in JavaScript programming. It is inspired by the [Sun](http://www.sun.com/) document [Code Conventions for the Java Programming Language](http://java.sun.com/docs/codeconv/). It is heavily modified of course because [JavaScript is not Java](http://javascript.crockford.com/javascript.html). This is a set of coding conventions and rules for use in JavaScript programming. It is inspired by the [Sun](http://www.sun.com/) document [Code Conventions for the Java Programming Language](http://java.sun.com/docs/codeconv/). It is heavily modified of course because [JavaScript is not Java](http://javascript.crockford.com/javascript.html).
The long-term value of software to an organization is in direct proportion to the quality of the codebase. Over its lifetime, a program will be handled by many pairs of hands and eyes. If a program is able to clearly communicate its structure and characteristics, it is less likely that it will break when modified in the never-too-distant future.
Code conventions can help in reducing the brittleness of programs.
All of our JavaScript code is sent directly to the public. It should always be of publication quality.
Neatness counts.
#### JavaScript Files
JavaScript programs should be stored in and delivered as `.js` files.
JavaScript code should not be embedded in HTML files unless the code is specific to a single session. Code in HTML adds significantly to pageweight with no opportunity for mitigation by caching and compression.
`<script src=filename.js>` tags should be placed as late in the body as possible. This reduces the effects of delays imposed by script loading on other page components. There is no need to use the `language` or `type` attributes. It is the server, not the script tag, that determines the MIME type.
#### References #### References
......
Clone repository
  • alpha beta testing
  • browser testing
  • camtasia licenses
  • code delivery processes
  • coding practices
  • css and sass coding standards
  • database schema standards
  • dependency management
  • development environments
  • digitec agile process
  • digitec gitlab styles
  • digitec software promises
  • digitec spec process
  • gitlab administration
  • gitlab issues tags
View All Pages