/hva-frontend2

Lecture frontend development 2.

Primary LanguageCSS

Frontend 2 - CMD

In this repository you'll find my assignments and webapp I created for the lectures of Frontend 2.


Best Practices

General:
  • Keep maps & files organized.
  • 2 spaces indentation.
  • Comment your code.
  • Use camelCase.
  • Separate style and content.
  • Limit HTTP requests.
  • Minify files for production.
HTML
  • Use HTML5
  • Put scripts at the bottom.
  • Write class specific.
  • Try to avoid inline-styling.
  • Give images always a width & height.
CSS
  • Create a base css with normalize.css.
  • Use em's instead of px.
  • Use a variation of the BEM methodology.
  • When possible, always use classes instead of id's.
JavaScript
  • Write object oriented JavaScript.
  • Use === instead of ==.
  • Use semicolons.
  • Capitalize constructors.
  • Namespace code where needed.
  • Avoid eval().
  • Avoid global variables.