Coding Standards & Best Practices

Standards and best practices always differ from person to person, organization to organization, environments to environments. We propose to have consistency. Here are some conventions/practices/standards that we want to share which have been beneficial.

Basic file naming conventions(used in StaticFrame)

  1. HTML/template files names in lower case and hyphenated. Ex: product-details.html
  2. Folder names to be in lower case and hyphenated. Ex: /product-details/
  3. Javascript file names in the following format : < namespace >.< module-name >.js If you have a version management, you can additionally append the version before .js extension.Ex: sf.product-details.js, sf.libs.1.0.1.js