Pro Yearly is on sale from $80 to $50! »

HPB JS Patterns

HPB JS Patterns

The presentation has some gifs. It's not fun as the the keynote. Here's the keynote link: https://www.dropbox.com/s/0dxb2c7xas6s5xq/L%26L.key?dl=0

Be74fd9a577ea5ef1ab2e7c71bcfa4b5?s=128

Djalma Araújo

July 10, 2015
Tweet

Transcript

  1. HPB JS Patterns

  2. Why?

  3. Why? • Code understanding / Organization • Large code base

    • Too many developers • People moving between projects
  4. What patterns? Object Literal + “Class functions”

  5. JS has Classes? Class-less Language Java Programmer

  6. Object Literal • No instances allowed • Awesome for utilities

    (Loading Spinner, Simple Binds, Specific Behaviour in a page) • Such an object is also sometimes called singleton.***
  7. HPB Way • setup method • main.js.coffee (to call everything)

  8. Module Pattern Way

  9. Questions?

  10. Function as a Class • Multiple Instances • Great for

    multiple rendering modules • Good for objects that needs inheritance • ECMAScript 6 brings “class” method as a syntax sugar
  11. How to Class ES6

  12. How to Class ES6

  13. Questions?

  14. thanks. @djalmaaraujo