The document discusses building applications with the MEAN stack. It introduces the speakers and their experience. It then discusses using MongoDB, Express, AngularJS and Node.js together. It provides an example of how a submission flows through the full stack, from a user filling out a form to it being saved to the database. It also discusses customizing applications with plugins, modular development, and building software as a service applications.
37. 37
What we’ll cover
• Using MongoDB in our project
– NodeJS and MongooseJS
• Life of a submission: See the whole stack
• Custom Mongoose Plugin:
– ElMongoose: Mongoose >> Elastic Search
40. 40
MongoDB vs Relational DB: Viewing a single
submission would have required pulling data from 6 tables if we
had use a relational DB:
- Submissions for
each app have
different form fields
- To make up for
lack of flexibility
this becomes a
complex schema
41. 41
MongoDB vs. Relational DB
With mongo we can store our submissions in a single collection
- All data for a
submission resides in
one document
- This fits with the way
we use submissions
in our app.
46. 46
Life of a Submission
User fills out a form
• Angular has a data model
called $scope
• Each form field is bound
to a key in the object
stored at
$scope.submission
47. 47
Life of a Submission
User Submits the form
• Left: submission json
generated by the form in the
previous slide
• Below: Angular POSTs
submission json to
/submitForm
$scope.submission
hostedController.js
48. 48
Life of a Submission
User Submits the form
• Left: submission json
generated by the form in the
previous slide
• Below: Angular POSTs
submission json to
/submitForm
$scope.submission
hostedController.js
49. 49
Life of a Submission
Request is received by ExpressJS
• Express is listening at port 3000 for all requests
• It’s easy to define routes in express
50. 50
Submission is saved to Mongo
• Left: the json object has not
changed
• Below: submission saved to
Mongo through the Mongoose
Model Sub
Life of a Submission
req.body
85. 85
MORE OPPORTUNITIES!!!
careers.washingtonpost.com
@wpcareers
● We’re in a unique environment in our team.
● What we are working has visibility.
● We could re-invent ourselves with any challenge.
● If you proved it could work, we could use it.
● Ownership of projects from end to end.
● No Red Tape
● Our work is more fulfilling.