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)
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