2013.12.12 MNUG - How streams help to raise Node.js performance
115 0 13115
Speakers: Golo Roden
users (amateurs, journeymen and hackers) based in Munich, Germany. http://www.mnug.de
For source code this way:
By anonymous 2017-09-20
You may use Node.js's
stream module for this. It's hard to answer your question within a few lines of code, but if you are really interested in how streams work, have a look at this video (this is me giving a talk about Node.js streams at the Node.js meetup in Munich, Germany).
Alternatively, you may use a generator function with
yield, but this as well is hard to explain from scratch in a few lines.
Anyway, streams and generator functions are the terms you should look for.
By anonymous 2017-09-20
First, learn the core concepts of Node.js:
Then, you're going to want to see what the community has to offer:
The gold standard for Node.js package management is NPM.
Finally, you're going to want to know what some of the more popular packages are for various tasks:
Useful Tools for Every Project:
- Underscore contains just about every core utility method you want.
- Lo-Dash is a clone of Underscore that aims to be faster, more customizable, and has quite a few functions that underscore doesn't have. Certain versions of it can be used as drop-in replacements of underscore.
- JSHint is a code-checking tools that'll save you loads of time finding stupid errors. Find a plugin for your text editor that will automatically run it on your code.
- Mocha is a popular test framework.
- Vows is a fantastic take on asynchronous testing, albeit somewhat stale.
- Expresso is a more traditional unit testing framework.
- node-unit is another relatively traditional unit testing framework.
- AVA is a new test runner with Babel built-in and runs tests concurrently.
- Express.js is by far the most popular framework.
- Koa is a new web framework designed by the team behind Express.js, which aims to be a smaller, more expressive, and more robust foundation for web applications and APIs.
- sails.js the most popular MVC framework for Node.js, and is based on express. It is designed to emulate the familiar MVC pattern of frameworks like Ruby on Rails, but with support for the requirements of modern apps: data-driven APIs with a scalable, service-oriented architecture.
- Meteor bundles together jQuery, Handlebars, Node.js, WebSocket, MongoDB, and DDP and promotes convention over configuration without being a Ruby on Rails clone.
- Tower (deprecated) is an abstraction of top of Express.js that aims to be a Ruby on Rails clone.
- Geddy is another take on web frameworks.
- RailwayJS is a Ruby on Rails inspired MVC web framework.
- Sleek.js is a simple web framework, built upon Express.js.
- Hapi is a configuration-centric framework with built-in support for input validation, caching, authentication, etc.
Danf is a full-stack OOP framework providing many features in order to produce a scalable, maintainable, testable and performant applications and allowing to code the same way on both the server (Node.js) and client (browser) sides.
Loopback.io is a powerful Node.js framework for creating APIs and easily connecting to backend data sources. It has a Angular.js SDK and provides SDKs for iOS and Android.
Web Framework Tools:
- Jade is the HAML/Slim of the Node.js world
- EJS is a more traditional templating language.
- Don't forget about Underscore's template method!
- Connect is the Rack or WSGI of the Node.js world.
- Request is a very popular HTTP request library.
- socket.io is handy for building WebSocket servers.
Command Line Interaction:
- minimist just command line argument parsing.
- Yargs is a powerful library for parsing command-line arguments.
- Commander.js is a complete solution for building single-use command-line applications.
- Vorpal.js is a framework for building mature, immersive command-line applications.
- Chalk makes your CLI output pretty.
Work with streams:
- mississipi everything you miss about streams.
- How streams help to raise Node.js performance
Popular Videos 6
Submit Your Video