nova mean - why the m in mean is a significant contributor to its success

25
Why the M in MEAN is a Significant Contributor to Its Success Presentation to NOVA Mean March 18, 2014 Jonathan M. Altman [email protected] | @async_io https://async.io / | https://github.com/jonathana Tuesday, March 18, 2014

Upload: asyncio

Post on 31-Aug-2014

1.093 views

Category:

Technology


0 download

DESCRIPTION

Talk given to NOVA Mean March 18, 2014

TRANSCRIPT

Page 1: NOVA MEAN - Why the M in MEAN is a Significant Contributor to Its Success

Why the M in MEAN is a Significant Contributor to Its Success

Presentation to NOVA Mean March 18, 2014Jonathan M. Altman

[email protected] | @async_iohttps://async.io/ | https://github.com/jonathana

Tuesday, March 18, 2014

Page 2: NOVA MEAN - Why the M in MEAN is a Significant Contributor to Its Success

Me

•Founder, Async IO and InTheBin

•node.dc co-organizer

•Semi-regular speaker

•https://github.com/jonathana

•http://www.slideshare.net/async_io

Tuesday, March 18, 2014

Page 3: NOVA MEAN - Why the M in MEAN is a Significant Contributor to Its Success

I Have Never Given This Presentation

Tuesday, March 18, 2014

Page 4: NOVA MEAN - Why the M in MEAN is a Significant Contributor to Its Success

4th Time Doing This Talk

•MongoDC 2011

•MongoDC 2012

•DevIgnition 2013

•NOVA Mean March, 2014

Tuesday, March 18, 2014

Page 5: NOVA MEAN - Why the M in MEAN is a Significant Contributor to Its Success

MongoDC 2011

•Node.js is cool

• It works well with Mongo

•Mongoose is available, but may not be buying you that much for the overhead

•Showed with expressjs

Tuesday, March 18, 2014

Page 6: NOVA MEAN - Why the M in MEAN is a Significant Contributor to Its Success

MongoDC 2012

•MongoDB and nodejs are a productive combo for building apps

•With Express

•Mongoose is an easy choice

•Everyauth is a great way to do authentication

•Starter skeleton app

Tuesday, March 18, 2014

Page 8: NOVA MEAN - Why the M in MEAN is a Significant Contributor to Its Success

DevIgnition 2013

•MEAN has “arrived”

•Covered a lot of why it is great, including the MongoDB part

•Did not get to show as much of the talk as I wanted, specifically code

Tuesday, March 18, 2014

Page 9: NOVA MEAN - Why the M in MEAN is a Significant Contributor to Its Success

So Why Is Mongo Significant?

Tuesday, March 18, 2014

Page 10: NOVA MEAN - Why the M in MEAN is a Significant Contributor to Its Success

The “M” in MEAN

•M - MongoDB

•E - ExpressJS

•A - AngularJS

•N - Node.js

JSON(BSON)-oriented noSQL database engine

Tuesday, March 18, 2014

Page 11: NOVA MEAN - Why the M in MEAN is a Significant Contributor to Its Success

M is for MongoDB

•noSQL data storage engine

•Scalable, adaptable

•Document store of JSON (BSON) data

•Fidelity: Angular, nodeJS, and MongoDB all “speak” JSON

Tuesday, March 18, 2014

Page 12: NOVA MEAN - Why the M in MEAN is a Significant Contributor to Its Success

M is for MongoDB

•MongoDB database contains collections (tables)

•Collections contain BSON documents (“rows”), but they are really documents

•Documents can nest other documents

•Documents in a collection can all have different BSON keys in them

Tuesday, March 18, 2014

Page 13: NOVA MEAN - Why the M in MEAN is a Significant Contributor to Its Success

M is for MongoDB[user@host ~]$ mongoMongoDB shell version: 2.2.0connecting to: test> use campaignswitched to db campaign> db.campaignusers.find({email: "[email protected]"}){ "fullName" : "Jonathan", "email" : "[email protected]", "_id" : ObjectId("50a40e11ea84d53c42000005"), "addMarketing" : true, "__v" : 0 }

Tuesday, March 18, 2014

Page 14: NOVA MEAN - Why the M in MEAN is a Significant Contributor to Its Success

M Is Also For Mongoose

•Object Data Mapper (ODM) for MongoDB

•Costs some of the flexibility of the MongoDB document store

•Start by using it

Tuesday, March 18, 2014

Page 15: NOVA MEAN - Why the M in MEAN is a Significant Contributor to Its Success

Put It Together and... MEAN it!

•Yeoman provides a great set of tools to get started

•There are also a bunch of seed repositories on github to use. Google “MEAN github seed”

•Consider https://github.com/DaftMonk/generator-angular-fullstack

•Wire in MongoDB

Tuesday, March 18, 2014

Page 16: NOVA MEAN - Why the M in MEAN is a Significant Contributor to Its Success

Tuesday, March 18, 2014

Page 17: NOVA MEAN - Why the M in MEAN is a Significant Contributor to Its Success

Tuesday, March 18, 2014

Page 18: NOVA MEAN - Why the M in MEAN is a Significant Contributor to Its Success

Example MEAN Site #1

Tuesday, March 18, 2014

Page 19: NOVA MEAN - Why the M in MEAN is a Significant Contributor to Its Success

Tuesday, March 18, 2014

Page 20: NOVA MEAN - Why the M in MEAN is a Significant Contributor to Its Success

Resources - MongoDB, Angular• MongoDB Inc. post referencing MEAN: http://blog.mongodb.org/post/49262866911/the-mean-stack-

mongodb-expressjs-angularjs-and

• MongoDB: http://www.mongodb.org/ and the company behind MongoDB is at http://http://www.mongodb.com/

• BSON: http://bsonspec.org/

• Mongoose: http://mongoosejs.com/

• AngularJS: http://angularjs.org/ and their tutorial at http://docs.angularjs.org/tutorial is highly recommended

• Slides from a talk at AngularDC on “Angular from Scratch”: http://www.slideshare.net/xmlilley/angular-from-scratch

Tuesday, March 18, 2014

Page 21: NOVA MEAN - Why the M in MEAN is a Significant Contributor to Its Success

Resources - nodeJS, HTML5• nodeJS: http://nodejs.org/

• npm (node package manager): https://npmjs.org/

• ExpressJS: http://expressjs.com/

• Good resource on technologies in HTML5: http://www.html5rocks.com/en/

Tuesday, March 18, 2014

Page 22: NOVA MEAN - Why the M in MEAN is a Significant Contributor to Its Success

Resources - Bootstrap, Yeoman• Twitter bootstrap: http://getbootstrap.com/

• Yeoman: http://yeoman.io/

• Bower: http://bower.io/

• Grunt: http://gruntjs.com/

• Sass: http://sass-lang.com/

• Compass: http://compass-style.org/

Tuesday, March 18, 2014

Page 23: NOVA MEAN - Why the M in MEAN is a Significant Contributor to Its Success

Resources - DC Area Meetups• nodeDC: http://www.meetup.com/node-dc/

• mongoDC: http://www.meetup.com/Washington-DC-MongoDB-Users-Group/

• AngularJS: http://www.meetup.com/AngularJS-DC/

• NOVA MEAN: http://www.meetup.com/NOVA-MEAN/

Tuesday, March 18, 2014

Page 24: NOVA MEAN - Why the M in MEAN is a Significant Contributor to Its Success

Thank you. Questions?

Tuesday, March 18, 2014

Page 25: NOVA MEAN - Why the M in MEAN is a Significant Contributor to Its Success

Tuesday, March 18, 2014