SlideShare a Scribd company logo
MongoDB 2.6, Mongoose 4.0, and
Beyond
NodeJS and MongoDB meets ES6 and Browserify
Valeri Karpov
Software Engineer, MongoDB
www.thecodebarbarian.com
www.slideshare.net/vkarpov15
github.com/vkarpov15
@code_barbarian
*
Who Am I?
•CI/NodeJS Engineer at MongoDB
•Maintainer of mongoose ODM
•Former CTO, LevelUp
•MEAN stack apps: Ascot Project, Bookalokal
*
Talk Overview
•Exciting developments in JavaScript:
• ECMAScript 6 (Harmony) is coming
• Browserify is changing the way we use NodeJS
• Compiles NodeJS code into browser-friendly form
•Mongoose 4.0 (ETA September) + ES6 + Browserify
•Also highlight some new features in MongoDB 2.6
*
What is Mongoose?
•Elegant ODM for MongoDB and NodeJS
•ActiveRecord-like Models per MongoDB collection
•Syntactic sugar for queries: chaining, fluent syntax
• ex: .find().where('answer').equals(42)
•Join-like functionality via populate()
•Promises/A+ conformant promises
•Community authored (same author as socket.io)
*
Part I: ES6 Generators and mongoose
*
Generators in ECMAScript 6
•ES6 will include a yield keyword
•Write async code with less pyramid of doom
•NodeJS 0.11.x, use node --harmony
*
Using Generators in ECMAScript 6
•Still need library, such as Q or co
•Special syntax for a function that can yield:
• function*() {}
*
Attaining Harmony with Generators
•yield enables try/catch for async code
•Elegant replacement for async.parallel()
*
Using yield with mongoose
•MongoDB 2.6 text search (mongoose >= 3.8.9)
*
Batch save in mongoose
•Without yield:
*
Batch save in mongoose with yield
*
Part II: Mongoose in the Browser
*
Browserify-friendly Schemas
•The dream: same schema in browser and server
•Simplicity: one schema, one language, one
validation function
*
The Dream Made Real
*
The Dream Made Real, Part II
*
From Humble Beginnings
*
Browserify Schema Status
•Very very rough proof of concept, not alpha-ready
•Branch on Github
•Also supports ES6 generators :)
*
Review
•JavaScript has a very exciting future
•ES6 Generators make async code human-readable
•Browserify makes code sharing a reality
•Mongoose will take advantage of this tech
•My talk at 11:45: 1 hour to build a MEAN stack app
with mongoose and browserify
*
Thanks for Listening!
•Slides on:
• Twitter: @code_barbarian
• Slideshare: slideshare.net/vkarpov15
•Mongoose on Github

More Related Content

PPTX
Angular2.0@Shanghai0319
PPTX
The Saga of JavaScript and TypeScript: Part 1
PPTX
MEAN Stack
PPTX
Mean full stack development
PPTX
Introduction to mean stack
PPTX
Azure Bootcamp Louisville - Node js presentation
PDF
MongoDB Jump Start
PDF
Mean Stack - An Overview
Angular2.0@Shanghai0319
The Saga of JavaScript and TypeScript: Part 1
MEAN Stack
Mean full stack development
Introduction to mean stack
Azure Bootcamp Louisville - Node js presentation
MongoDB Jump Start
Mean Stack - An Overview

What's hot (20)

PDF
Building a Modern JavaScript Framework by James Milner
PPTX
Angular js introduction
PPT
Develop a Quick and Dirty Web interface to your database: for the DBA and oth...
PDF
TDD a REST API With Node.js and MongoDB
PDF
Future development stack ~ MeteorJS
PPTX
PDF
The MEAN Stack
PDF
MongoDB MEAN Stack Webinar October 7, 2015
DOCX
Javascript - Today's trending script
PDF
MEAN Stack WeNode Barcelona Workshop
PDF
VIE - Using RDFa to make content editable
PPTX
Basics to framework programming
PDF
Lessons in Open Source from the MongooseJS ODM
PPTX
A Gentle Introduction to Blazor
PPTX
.Net platform .Net core fundamentals
PDF
Node js (runtime environment + js library) platform
PDF
Conquering AngularJS Limitations
PDF
Introduction to the MEAN stack
PPTX
Agriya services
PDF
Modern web application devlopment workflow
Building a Modern JavaScript Framework by James Milner
Angular js introduction
Develop a Quick and Dirty Web interface to your database: for the DBA and oth...
TDD a REST API With Node.js and MongoDB
Future development stack ~ MeteorJS
The MEAN Stack
MongoDB MEAN Stack Webinar October 7, 2015
Javascript - Today's trending script
MEAN Stack WeNode Barcelona Workshop
VIE - Using RDFa to make content editable
Basics to framework programming
Lessons in Open Source from the MongooseJS ODM
A Gentle Introduction to Blazor
.Net platform .Net core fundamentals
Node js (runtime environment + js library) platform
Conquering AngularJS Limitations
Introduction to the MEAN stack
Agriya services
Modern web application devlopment workflow
Ad

Viewers also liked (9)

PDF
MongoDB Israel June Meetup
PDF
MongoDB Miami Meetup 1/26/15: Introduction to WiredTiger
PDF
MEAN Stack Workshop at Node Philly, 4/9/14
PDF
AngularJS Meetup 11/19/13 - AngularJS for MongoDB Continuous Integration
PDF
JS-IL: Getting MEAN in 1 Hour
PDF
Mongo db in 3 minutes BoilerMake
PDF
MongoDB: Queries and Aggregation Framework with NBA Game Data
PDF
NodeSummit - MEAN Stack
PDF
Nimrod: MongoDB Shell in NodeJS (JSConfUY 2015)
MongoDB Israel June Meetup
MongoDB Miami Meetup 1/26/15: Introduction to WiredTiger
MEAN Stack Workshop at Node Philly, 4/9/14
AngularJS Meetup 11/19/13 - AngularJS for MongoDB Continuous Integration
JS-IL: Getting MEAN in 1 Hour
Mongo db in 3 minutes BoilerMake
MongoDB: Queries and Aggregation Framework with NBA Game Data
NodeSummit - MEAN Stack
Nimrod: MongoDB Shell in NodeJS (JSConfUY 2015)
Ad

Similar to JS-IL Keynote: MongoDB 2.6, Mongoose 4.0, and Beyond (20)

PPTX
ECMAScript 6 and the Node Driver
PDF
Mongoose: MongoDB object modelling for Node.js
PDF
MongoDB- Crud Operation
PDF
Webinar: Was ist neu in MongoDB 2.4
PDF
Whats new in mongoDB 2.4 at Copenhagen user group 2013-06-19
PPTX
Whats new in MongoDB 24
PPTX
Introduction-to-MongoDB with mongoose and Node
PDF
What's new in MongoDB 2.6 at India event by company
DOCX
Mongoose getting started-Mongo Db with Node js
PPTX
Webinar: Building Your First App in Node.js
PPTX
Webinar: Building Your First App in Node.js
PPTX
What's new in MongoDB 2.6
PDF
MongoDB and Node.js
PDF
Developing and Testing a MongoDB and Node.js REST API
PDF
MongoDB 2.6 is great but what about 2.8?
PDF
Building Your First MongoDB Application
PDF
Introduction to MongoDB
PPTX
MongoDB_Sharan_Prakash_Babu
PPTX
What's New In MongoDB 3.6
PPTX
Using MongoDB with the .Net Framework
ECMAScript 6 and the Node Driver
Mongoose: MongoDB object modelling for Node.js
MongoDB- Crud Operation
Webinar: Was ist neu in MongoDB 2.4
Whats new in mongoDB 2.4 at Copenhagen user group 2013-06-19
Whats new in MongoDB 24
Introduction-to-MongoDB with mongoose and Node
What's new in MongoDB 2.6 at India event by company
Mongoose getting started-Mongo Db with Node js
Webinar: Building Your First App in Node.js
Webinar: Building Your First App in Node.js
What's new in MongoDB 2.6
MongoDB and Node.js
Developing and Testing a MongoDB and Node.js REST API
MongoDB 2.6 is great but what about 2.8?
Building Your First MongoDB Application
Introduction to MongoDB
MongoDB_Sharan_Prakash_Babu
What's New In MongoDB 3.6
Using MongoDB with the .Net Framework

More from Valeri Karpov (10)

PDF
A Practical Introduction to GeoJSON
PDF
A Practical Introduction to Functions-as-a-Service
PDF
A Gentle Introduction to Functions-as-a-Service
PDF
Introducing Async/Await
PDF
TAO and the Essence of Modern JavaScript
PDF
Mastering Async/Await in JavaScript
PDF
React, Redux, and Archetype
PDF
MEAN Stack NYC Meetup 20150717: TDD Your AngularJS + Ionic Directives With jQ...
PDF
MongoDB API Talk @ HackPrinceton
PDF
MEAN Stack - Google Developers Live 10/03/2013
A Practical Introduction to GeoJSON
A Practical Introduction to Functions-as-a-Service
A Gentle Introduction to Functions-as-a-Service
Introducing Async/Await
TAO and the Essence of Modern JavaScript
Mastering Async/Await in JavaScript
React, Redux, and Archetype
MEAN Stack NYC Meetup 20150717: TDD Your AngularJS + Ionic Directives With jQ...
MongoDB API Talk @ HackPrinceton
MEAN Stack - Google Developers Live 10/03/2013

Recently uploaded (20)

PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
cuic standard and advanced reporting.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Approach and Philosophy of On baking technology
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Electronic commerce courselecture one. Pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
KodekX | Application Modernization Development
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
Chapter 3 Spatial Domain Image Processing.pdf
cuic standard and advanced reporting.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Understanding_Digital_Forensics_Presentation.pptx
Approach and Philosophy of On baking technology
NewMind AI Weekly Chronicles - August'25 Week I
“AI and Expert System Decision Support & Business Intelligence Systems”
Network Security Unit 5.pdf for BCA BBA.
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Spectral efficient network and resource selection model in 5G networks
20250228 LYD VKU AI Blended-Learning.pptx
The AUB Centre for AI in Media Proposal.docx
MYSQL Presentation for SQL database connectivity
Electronic commerce courselecture one. Pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Unlocking AI with Model Context Protocol (MCP)
KodekX | Application Modernization Development
Per capita expenditure prediction using model stacking based on satellite ima...

JS-IL Keynote: MongoDB 2.6, Mongoose 4.0, and Beyond

  • 1. MongoDB 2.6, Mongoose 4.0, and Beyond NodeJS and MongoDB meets ES6 and Browserify Valeri Karpov Software Engineer, MongoDB www.thecodebarbarian.com www.slideshare.net/vkarpov15 github.com/vkarpov15 @code_barbarian
  • 2. * Who Am I? •CI/NodeJS Engineer at MongoDB •Maintainer of mongoose ODM •Former CTO, LevelUp •MEAN stack apps: Ascot Project, Bookalokal
  • 3. * Talk Overview •Exciting developments in JavaScript: • ECMAScript 6 (Harmony) is coming • Browserify is changing the way we use NodeJS • Compiles NodeJS code into browser-friendly form •Mongoose 4.0 (ETA September) + ES6 + Browserify •Also highlight some new features in MongoDB 2.6
  • 4. * What is Mongoose? •Elegant ODM for MongoDB and NodeJS •ActiveRecord-like Models per MongoDB collection •Syntactic sugar for queries: chaining, fluent syntax • ex: .find().where('answer').equals(42) •Join-like functionality via populate() •Promises/A+ conformant promises •Community authored (same author as socket.io)
  • 5. * Part I: ES6 Generators and mongoose
  • 6. * Generators in ECMAScript 6 •ES6 will include a yield keyword •Write async code with less pyramid of doom •NodeJS 0.11.x, use node --harmony
  • 7. * Using Generators in ECMAScript 6 •Still need library, such as Q or co •Special syntax for a function that can yield: • function*() {}
  • 8. * Attaining Harmony with Generators •yield enables try/catch for async code •Elegant replacement for async.parallel()
  • 9. * Using yield with mongoose •MongoDB 2.6 text search (mongoose >= 3.8.9)
  • 10. * Batch save in mongoose •Without yield:
  • 11. * Batch save in mongoose with yield
  • 12. * Part II: Mongoose in the Browser
  • 13. * Browserify-friendly Schemas •The dream: same schema in browser and server •Simplicity: one schema, one language, one validation function
  • 15. * The Dream Made Real, Part II
  • 17. * Browserify Schema Status •Very very rough proof of concept, not alpha-ready •Branch on Github •Also supports ES6 generators :)
  • 18. * Review •JavaScript has a very exciting future •ES6 Generators make async code human-readable •Browserify makes code sharing a reality •Mongoose will take advantage of this tech •My talk at 11:45: 1 hour to build a MEAN stack app with mongoose and browserify
  • 19. * Thanks for Listening! •Slides on: • Twitter: @code_barbarian • Slideshare: slideshare.net/vkarpov15 •Mongoose on Github