~/talk

The Unbearable Lightness of Node Modules

Talkat NodeConf Argentina 2017 · on Saturday, 2017-10-28· [nodejs]
slides:none on file

Compares ImageMagick/GM (wrapper requiring a system install) with sharp and finds sharp sufficient for cropping/overlay tasks, builds a souvenir image successfully and notes GM/GraphicsMagick wrappers total ~260k monthly downloads while sharp is ~150k installs last month and requires no external brew install imagemagick dependency. Tests ORMs by building a JavaScript drag‑queen‑name generator: Sequelize auto-creates tables and shows ~700k monthly downloads, Bookshelf is lighter but has maintenance uncertainty and thus feels risky for production.

AI-written summary · about

  1. 0:00Intro
  2. 0:19Michelle Garrett
  3. 1:01How can we be responsible curators of our node_modules?
  4. 1:18too many dependencies
  5. 1:59Dependencies are bad?
  6. 2:13organic vegan javascript
  7. 2:23How do I know if a package is good enough to npm install?
  8. 3:47We put too much emphasis on size over other factors for server side modules.
  9. 4:39Technical costs are real, but consider the human cost of adding a dependency.
  10. 5:10Installing a module raises the barrier to entry for your code base.
  11. 5:35There are problems a wider community of people can solve that you or your team can't (or shouldn't) tackle alone.
  12. 6:04(Of course this is different for every project).
  13. 6:32How intuitive is the API?
  14. 9:04Let's compare some packages.
  15. 11:49GraphicsMagick and Image Magick for Node
  16. 14:35brew install ImageMagick
  17. 15:32high performance Node.js image processing
  18. 16:01Sharp does not require you to install external dependencies
  19. 17:12Imagemagick or Sharp?
  20. 18:37ORMs (aka Object Relational Mappers)
  21. 21:23The Event Loop Princess
  22. 21:59Lightweight ORM for Node.js, built on top of the Knex SQL query builder.
  23. 22:17Bookshelf doesn't force you to describe the schema of your tables.
  24. 22:48Bookshelf doesn't autogenerate tables.
  25. 23:07Bookshelf lets you drop down to the raw Knex interface for custom queries.
  26. 24:38Sequelize or Bookshelf?
  27. 25:18The popular module wins!
  28. 25:47What I learned: . For server-side modules, size is not as important as you think it is. . Dependencies have a technical and human cost, and you should consider both. • Well-maintained projects are almost always the better option.
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.