2. AGENDA
• Introduction to MEAN
• What is MEAN Stack?
• Why MEAN?
• Architecture of MEAN Stack
• What is MongoDB?
• What is ExpressJS?
• What is AngularJS?
• What is NodeJS?
• Benefits of Mean Stack Website Development
• Conclusion
3. Introduction to MEAN
• MEAN was coined by Valeri Karpov,
a MongoDB developer in 2013.
• MEAN is an acronym for Mongo DB, Express JS,
Angular JS and Node. Js.
MongoDB – the database
ExpressJS – the web framework
AngularJS – the front-end framework
NodeJS – the web server
4. What is MEAN Stack?
• MEAN is a collection of JavaScript-based
technologies
• MEAN is a full-stack development toolkit
• It is used to develop fast and robust web
application
• MEAN represents a major shift in architecture
from relational databases to NoSQL and from
server-side
• JSON is the primary format to exchange data
5. Why MEAN?
• Single language is used throughout the application
• Helps avoid unnecessary ground work and keep our
application organized
• Comes with a very powerful suite of testing tool
• Create a simple open source solution that is used to
build robust and maintainable solution
• Helps in rapid development of applications
• From client to server to database, MEAN is full stack
JavaScript
7. MongoDB
• Has been around since 2007
• A simple and scalable document based NoSQL
database
• Use JSON-style documents with dynamic schemas
• Mongoose provides “Elegant MongoDB object
modeling for node.js”
• It provides a balance between the speed of pure
document databases and the power of relational
databases
8. Why NoSQL?
• Non-relational or distributed database system.
• Dynamic schema
• Horizontally scalable
• Unstructured query language
• Best suited for hierarchical data storage
• Examples: MongoDB, BigTable, Redis,
Cassandra, Hbase, Neo4j, CouchDB
9. SQL Schema Statements
• CREATE TABLE people
( user_id NOT NULL
AUTO_INCREMENT,
Varchar(30), age Number,
status char(1), PRIMARY KEY
(user_id) )
• ALTER TABLE people ADD
join_date DATETIME
• ALTER TABLE people DROP
COLUMN join_date
• DROP TABLE people
MongoDB Schema Statements
• db.createCollection("people")
db.people.insertOne(
{ user_id: "abc123",
age: 55, status: "A" } )
• db.people.updateMany ( {
$set: { join_date: new Date() } }
)
• db.people.updateMany( { }, {
$unset: { "join_date": "" } } )
• db.people.drop()
10. Sample code
Consider the representation of a person in XML and it's JSON
• XML:
<person>
<first-name>John</first-name>
<last-name>Carter</last-name>
</person>
• JSON:
{
"firstname":"John",
"lastname":"Carter“
}
11. Features of MongoDB
• Fast, Iterative Development
• Flexible Data Model
• JSON everywhere
• Lightweight
• Scalable architecture
• No more SQL statements
• Replication and high availability
12. AngularJS
• It was created in 2009 and develop client side
application
• Uses Google’s open-source V8 JavaScript
engine at its core
• It is a Single Page Applications (SPA)
• Directives are integrated in HTML directly
• Built highly interactive, responsive and
dynamic web application
15. Features of AngularJS
• Great for Frontend development
SPA
Mobile Apps
• Great Browser support (> IE8)
• Easily Testable components
• Less load on the server
• Directives, which extend HTML attributes.
16. NodeJS
• Developed by Ryan Dahl in 2009
• Node.js is a server-side platform built on
Chrome's JavaScript runtime for easily
building scalable network applications.
• Uses event-driven, callback function, non-
blocking I/O model
• NPM- node ecosystem
• Single threaded-no deadlock
19. Features of NodeJS
• Speed and efficient
• Built on the top of chrome’s engine
• Can easily handle 10k concurrency connections
• Fast development cycles
• Unified database queries
• Perfect for real time applications
• No buffering
• Appropriate for android device
21. ExpressJS
• Express was first released in 2009
• Most popular framework for Node.js
• Minimal, flexible and extensible web
application framework
• Building single and multi-page, and hybrid
web applications.
23. Features of ExpressJS
• Allows and responds to HTTP requests
• Defines routes
• Makes usage of Node JS even easier
• Easy implement of REST API
• Dynamic rendering of HTML pages
• Helper functions for Web Applications
• Using Templating Engines
24. Summing it up..
• M is for MongoDB
• E is for ExpressJs
• A is for AngularJS
• N is for NodeJS
• Each piece serves a different purpose.
• MongoDB is the database engine, NodeJS is the
web server and server-side API, ExpressJS is the
routing engine, and AngularJS is the front-end UI
framework.
25. Why MEAN?
• But here's where it gets cool. MongoDB stores
its data in JSON, NodeJS is JavaScript, and
AngularJS is JavaScript;
• this means that there is literally no translation
is required between how the data is stored
and how it's manipulated.
• This also means there is literally only 1
language for the entire stack: JavaScript.
26. MEAN Vs Others
• The server-side technology is very heavy and
relies on web servers. Even the lightest server-
side technology, ASP.NET is still heavier than
NodeJS.
• To get into a platform like Visual Studio, you need
to invest as much as $13K.
• The typical .NET stack is not homogeneous in
nature. The data alone, and the transitions it
must go through from database engine, to data
model, to view model, to JSON, and back again
requires lot of translations.
27. Benefits Of MEAN Stack
• Fully an open source and free web standards
• Supports the MVC (Model View Controller)
architecture.
• Not just startups, big players are also moving to
Node.js: Wal-Mart, PayPal, Yahoo, Netflix,
Uber, LinkedIn.
34. Conclusion
• MEAN is a full stack, based on JavaScript, web
application framework.
• If you require a fast, easy, simple way to create a
modern, responsive, dynamic web site then
MEAN would be a great solution.