Mongoose: MongoDB Object-Document Mapper for NodeJS Apps

Mongoose Course: Master Object-Document Mapper for NodeJS and MongoDB
3.1 (28 ratings)
Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
500 students enrolled
Instructed by Azat Mardan Development / Databases
$50
Take This Course
  • Lectures 30
  • Length 3 hours
  • Skill Level Intermediate Level
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 1/2015 English

Course Description

Mongoose Course: Node and Mongo Explained

If you are seeing this page, then you are somewhat related to software engineering, and we all know that for people in tech learning a new technology is important. But we often procrastinate and defer it. And it’s not our fault, because in most cases there are just no good tutorials. This is especially true for new and emerging technologies like NodeJS.

NodeJS + NoSQL = <3

NodeJS (JavaScript on the server) is awesome, but some developers are confused about NoSQL when it comes to working in Node with MongoDB (NoSQL database). Do you need a better explanation of how to use Node.js with MongoDB? The most popular choice is the Mongoose library. Read on to find out why.

Why Mongoose is Your Friend

The danger of not using ORM (object-relational mapping) / ODM (object-document mapping) is that every time you make changes to the structure of the data, you have to modify the application code. In other words, if your application layer touches a database, then you’re in for a big trouble waiting to happen God forbid there are any changes to the database layer… and the chance of you having to make future changes in the software that you wrote is like 99.99%. :-( However, by using Mongoose you can mitigate this issue!

Also, you can make your application to have models, validations and at the same time organize code better with custom methods, and pre and post hooks. The additional benefit is that Mongoose methods are easier (and more fun) to use than native MongoDB driver ones.

Finally an Easy Way to Understand How to Use Node with MongoDB

Take a look at Mongoose’s extensive documentation at mongoosejs (dot) com (slash) docs. It’s fairly good, but who has time to read this documentation when you can use that time to write your own apps?! Also, reading online documentation and the library’s source code is boring. Many studies have shown that when something is boring, you learn it less effectively!

That’s why we’re working on a Mongoose course for you! This is the course on Mongoose you’ve been waiting for (as almost 200 backers of our “kickstarter” campaign proved).

What You’ll Be Able to Do

The Mongoose course has more than one hour of HD videos, and INSANE number of examples. After finishing lectures, answering quizzes and doing exercises outlined in the course, you’ll be able to do virtually anything with Node and MongoDB in a sane manner, using the industry’s best techniques and practices.

The course is ready and you can be access IMMEDIATELY… it’s time to take action to ensure you know the best way to use Node and MongoDB!

What are the requirements?

  • Install MongoDB

What am I going to get from this course?

  • Know different data types in the Mongoose Schema class
  • Store photo and other binary data in MongoDB with Mongoose
  • Use the populate method and Mongoose references
  • Create custom Methods and invoke them
  • Create pre and post Mongoose Hooks to better organize your business logic
  • Create custom Mongoose setters and getters methods for each field
  • Perform validation so your app is protected from malicious inputs
  • Create custom validation methods
  • Work with virtuals
  • Write static and instance custom Model methods
  • Create and use Mongoose Models
  • Find Mongoose plugins
  • Organize files with Express app
  • Bubble errors with the ok module
  • Use the Validate method
  • Use Enum data type
  • Know the difference between the update and save methods

What is the target audience?

  • Students who took Node Program course
  • JavaScript/Node developers who know MongoDB but not Mongoose

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Welcome
00:20
Instructions
Article
Section 1: Basics
Project Initialization
Preview
03:12
Schema, Model, and The Find Method
Preview
06:55
The Save Method
Preview
06:59
Schema Types, Its Properties and Validation
05:10
Required Property and Schema Validation
02:23
Additional Schema Types
05:20
Complex Schema With Nested Objects
05:37
Bubbling Errors With The Okay Module
05:22
The FindOne Method for Get and Put Requests
07:50
Enum Schema Property
03:48
Setters and Getters in Schema
05:47
Custom Field Validation and The Path Method
04:10
Summary and The Remove Method
12:41
Section 2: Advanced
Selecting Fields
01:43
Virtual Fields
03:11
Pre Save Hook
03:16
Pre Validate Hook
02:07
Post Save Hook
01:03
The Populate Method and References
07:28
Static and Instance Methods
05:06
Summary
02:54
Uploading and Storing Binary Data
05:54
Section 3: HackHall
HackHall Demo
01:41
Case Study: HackHall.com
06:58
Section 4: Bonus
MongoUI Demo
01:37
54 pages

This chapter is from Pro Express.js: Master Express.js—The Node.js Framework For Your Web Development which is available at proexpressjs (dot) com. It is a bonus content for Mongoose Course. It's for educational purposes only. Avoid sharing this document outside of this community.

Express.js Cheatsheet
Article
Oh My JS Ebook
Article

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Azat Mardan, Author of Apress books on Node&JS, Technology Fellow

Azat Mardan has over 12 years of experience in web, mobile and software development. With a Bachelor's Degree in Informatics and a Master of Science in Information Systems Technology degree, Azat possesses deep academic knowledge as well as extensive practical experience.

Currently, Azat works as Technology Fellow at Capital One Financial Corporation. Before that, Azat worked as a Team Lead / Senior Software Engineer at DocuSign, where his team rebuilds 50 million user product (DocuSign web app) using the tech stack of Nodejs, Expressjs, Backbonejs, CoffeeScript, Jade, Stylus and Redis.

Recently, he worked as an engineer at the curated social media news aggregator website, Storify dot com (acquired by LiveFyre) which is used by BBC, NBC, CNN, The White House and others. Storify runs everything on Nodejs unlike other companies. It's the maintainer of the open-source library jade-browser.

Before that, Azat worked as a CTO/co-founder at Gizmo — an enterprise cloud platform for mobile marketing campaigns, and has undertaken the prestigious 500 Startups business accelerator program.

Prior to this, Azat was developing he developed mission-critical applications for government agencies in Washington, DC, including the National Institutes of Health, the National Center for Biotechnology Information, and the Federal Deposit Insurance Corporation, as well as Lockheed Martin.

Azat is a frequent attendee at Bay Area tech meet-ups and hackathons (AngelHack hackathon '12 finalist with teamFashionMetric dot com).

In addition, Azat teaches technical classes at General Assembly, Hack Reactor, pariSOMA and Marakana (acquired by Twitter) to much acclaim.

In his spare time, he writes about technology on his blog: webapplog dot com which is number one in “expressjs tutorial" Google search results. Azat is also the author of Expressjs Guide, Rapid Prototyping with JS and Oh My JS; and the creator of open-source Nodejs projects, including ExpressWorks, mongoui and HackHall.

Ready to start learning?
Take This Course