Design principles

Unobtrusive JavaScript

  • the user interface should be intuitive and not draw attention to itself
  • features that fail or operate incorrectly should be omitted rather than producing errors
  • core functionality should be guaranteed even if scripts fail
  • content (HTML), presentation (CSS), and behavior (JavaScript) should be kept separate
  • write clear, documented, maintainable code

Graceful degradation

  • graceful degradation is another name for fault tolerance
  • core web page functionality should be guaranteed even when scripts fail to run
  • features which are not fully functional should be eliminated from a page
  • graceful degradation and progressive enhancement are somewhat opposed

Progressive enhancement

  • first goal is to guarantee basic functionality and content
  • accessibility is a primary concern
  • enhanced features may be added if they are available and work properly
  • emphasizes separation of content (HTML), presentation (CSS), and behavior (JavaScript)
  • progressive enhancement and graceful degradation are somewhat opposed

Responsive web design

  • goal is to provide optimal viewing on any type of device
  • website should detect environment and adapt
  • designs should use fluid layouts and relative measurements
  • CSS styles using the @media rule are used to change layout without using JavaScript

Polyfill