Skip to content

Conventions

Axel Faust edited this page Jan 2, 2017 · 4 revisions

Repository-tier UI

  • Lightweight HTML rendered via standard web scripts using Java, JavaScript and/or Freemarker Templates
  • Very limited dependency on JavaScript UI libraries for key functional aspects (tool should render fine without the library, and library should in most cases only enhance visual appeal, value of information and usability)
  • => Common exception: tools focused on charting
  • All original client-side JavaScript artifacts must pass JSHint validation - included libraries are exempt and may be excluded via .jshintignore

Share-tier UI

  • Primarily Aikau-based pages and components
  • => Try and use bundled versions of Aikau as reference
  • => Add minor custom UI modules for customisations and/or backports to avoid forcing newer Aikau version on user if only relevant for a minor feature
  • => If all else fails we can and will define a "lowest supported Aikau-version" for this addon
  • Very limited dependency on additional 3rd party JavaScript UI libraries in addition to what is commonly bundled in Share and/or Aikau
  • All client-side JavaScript artifacts must pass JSHint validation

Web Scripts

  • All JavaScript web script controllers must pass JSHint validation
  • => Web script controllers that only import other JavaScript files and contain no logic of their own (except trivial function calls) are exempt
  • Common logic and templating elements should be bundled in library JavaScript and Freemarker files
  • Java web script controllers and/or custom Script API components should only be used when absolutely necessary
  • => Maintaining state across multiple invocations of different web scripts
  • => Using reflection to bridge version differences and/or deal with libraries that may not be available (e.g. Alfresco Enterprise JARs)

Source Style and Formatting

TBD