Front-end Best Practices

SuTNT1

Part 1: Javascript

Agenda

  • Module Pattern in Javascript
  • Unobtrusive JavaScript 
  • Strict Mode in Javascript
  • Code duplication report in MMT

Module pattern in Javascript

  • Separation of concerns
  • Reduce global variables

Unobtrusive JavaScript 

  • Namespaces
  • Separation of behavior from markup

Example: issuedetail/view.jsp 773

Strict mode

Impossible to accidentally create global variables

Example: issueDetail/main.js 2100

Code duplication

Q & A

Front-end best practices

By Su Tran

Front-end best practices

Some thoughts on Javascript development

  • 730