All Projects → substack → Jingjs 2013 Slides

substack / Jingjs 2013 Slides

slides from my jingjs 2013 talk

Programming Languages

javascript
184084 projects - #8 most used programming language

the wizard of moduletopia

substack presents

wizard of modules

tornado

shoes_found

shoes_taken

shoes

frameworks

framework stuck

organization

npm

browserify

database leveldb

find home

courage

courage

wizard

anyone can publish

robot publsh

dorothy publish

scarecrow publish

lion publish

whatever

anarchy

forgiveness

what is modularity

"Do one thing well."

"Compose larger units out of smaller, independent units of functionality."

dorothy

we've got to find the module city

a culture of modularity

how to foster a culture of modularity:

  • have really good module system
  • externalize early, often
  • all modules are useful on their own
  • easy to test

If you are building an application and get stuck, it probably means that one or more modules to do the hard parts don't exist yet. Figure out which modules need to exist and then go make them!

getting modularity right

  • qualified imports
  • tiny core functionality

case study in modularity: leveldb

geospatial indexes

instead of relying on the database vendor to give us we can use a module that somebody has written that just does 1 thing

we could have also written the same module ourselves and then published the result

finding modules

  • npm search SEARCH TERMS...
  • ask on irc.freenode.net/#node.js! ask your friends!
  • open up the npm packages for each result that looks promising
  • skim the readme for code snippets
  • ignore modules without code in the repos

publish!

npm init     # create a package.json
npm useradd  # create an npm account
npm publish  # publish your package!
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].