SlideShare a Scribd company logo
MEAN
Harendra Singh Bisht
mean stack Developer
Agenda
 What is MEAN Stack
 Why MEAN
 MEAN Architecture
 Node
 Express
 MongoDB
 Angular
 Yeoman
 How we are using
 Deploy
What’s MEAN Stack?
 MEAN Stack is a full-stack JavaScript solution that
helps you build fast, robust and maintainable
production web applications using MongoDB,
Express, AngularJS, and Node.js.
What’s a Dev Stack?
LAMP - Linux, Apache MySQL, PHP
.net - Windows, IIS, C#, MSSQL Server
Java - Tomcat, Java, JSP, Oracle
MongoDB is a NoSQL document-store database
framework built on Node.js which comes with a set of features for building
single-page, multi-page, and hybrid web apps.
JavaScript (MV*) Framework maintained by Google.
Executed by the V8- a JavaScript engine developed by Google which
is used in Chrome
Why MEAN Stack?
All of these components use JavaScript / JSON.
One language, same context Consistent
Scalability
Asynchronous
Who is using MEAN?
Mean ReCAP
Ryan Dahl
2009
Package Management
Node.js module package manager (NPM)
There’s a module for almost anything you can imagine
Simple to use
>npm init
>npm install –g module-name
>npm install module-name
>npm install
Blocking I/O
v/s
Non-Blocking I/O
Event Loop in Node
 JavaScript runtime contains a message queue
which stores a list of messages to be processed
and their associated callback functions.
 These messages are queued in response to
external events (such as a mouse being clicked
or receiving the response to an HTTP request)
given a callback function has been provided. If,
for example a user were to click a button and no
callback function was provided – no message
would have been enqueued...
Sync vs. Async
Hello World!
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello Worldn');
}).listen(8000, '127.0.0.1');
console.log('Server running at http://127.0.0.1:8000/');
>node app
Let’s talk about express!
>npm install express --save
Web application framework
(like Ruby on Rails, asp.net, Sinatra, django, and etc.)
Why use express.js?
Ability to use CSS Preprocessors like Sass/Less/Stylus Light weight/Fast
Better Code Structure with
Model View Controller (MVC)
Routing
Template flexibility (hogan, ejs, jade)
Model View Controller
Let’s talk about MongoDB!
MongoDB Strategic Advantage
Horizontally Scalable
-Sharding
Agile
Flexible
High Performance &
Strong Consistency
Application
Highly
Available
-Replica Sets
{ author: “eliot”,
date: new Date(),
text: “MongoDB”,
tags: [“database”,
“flexible”, “JSON”]}
Do More With Your Data
Rich
Queries
Find course
Find courses in basic category
Geospatial Use for Geo Location
Text Search
Find all the course having title
‘Test’
Aggregation Calculate the Course Rating
Map Reduce Calculate Content Likes
{
"_id": "55e009cefff4c4be328f555d",
"category": {
"_id": "3”,
"title": "Basics"
},
"contents": [
{
"title": "Content 1",
"_id": "55e009d9d1720d762cf2f343",
"questions": [
{
"description": "If you are happy and you know it",
"type": "single”,
"tips": "",
"_id": "55e00a2dfff4c4be328f555e",
"choices": [
{
"description": "Hand",
"isAnswer": false,
"_id": "55e00a2dfff4c4be328f5561"
}
]
}
],
"likes": 0,
}
],
"isPublished": true,
"description": "If you are happy and you know it",
"title": "Test Course"
}
MongoDB Pros
 Schema-less Flexible
 BSON
 Sharding & Scaling
 Map/Reduce
MongoDB Cons
 Data size
 Less Flexible
 Transactions
MongoDB Terms
Mongoose
Object Modeling for MongoDB
http://mongoosejs.com/
var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/test');
var Cat = mongoose.model('Cat', { name: String });
var kitty = new Cat({ name: 'Zildjian' });
kitty.save(function (err) {
if (err) // ...
console.log('meow');
});
Why is AngularJS?
Javascript Framework maintained by Google.
Model-View-Controller (MV*)
Makes development and testing easier
Teaches HTML new tricks!
How can Angular help?
Integrate in parts of your existing website
Single Page Applications (SPA)
Two Way Data-binding
 When the model gets updated, the UI (View) gets updated
 When UI gets updated, the changes are reflected back to the
model
Deep Linking
Deep linking allows AngularJS to get back to the state it was
depending on the URL
Using the “back” button is okay!
Hyperlinks won’t break things
Angular Terms - $scope
The scope is responsible for detecting changes to
the model and provides the execution for
expressions.
Also represents the application model.
Angular Terms - Directives
A directive is a behavior or DOM transformation which is triggered by
the presence of a custom attribute, element name, or class name.
 ng-app
 ng-bind
 ng-model
 ng-class
 ng-if
 ng-show/ng-hide
 ng-style
 ng-view
 ng-switch
 ng-repeat
 ng-init
 ng-*
Angular Terms - Filters
Format and transform data. example: make text
uppercase
How to make angular
routes?
 Include angular-route.js library
 Inject ‘ngRoute’ to app module
 Inject ‘$routeProvider’ to your app as a config
 define your routes!
app.config(['$routeProvider',
function( $routeProvider ) {
$routeProvider.when('/', {
templateUrl: 'homepage.html',
controller: 'HomeController’
});
} ]);
Yeoman
Generator for Yeoman to quickly create MEAN
applications
Comes with Grunt, Bower.
What’s Grunt?
A JavaScript-based task runner to perform repetitive tasks. Grunt
helps us run the web server and compile CSS/JS.
 Unit testing
 JS linting
 Concatenating/minifying
 Image optimization
 Replace scripts in html files
 SASS
What’s Bower?
 Package manager for anything you need to
build your frontend
 Bower install <package> -- save
Bower manages front-end packages and tracks
them in bower.js file
MEAN Stack Frameworks
Deploy
Mean PPT

More Related Content

PPTX
Introduction to mean stack
Praveen Gubbala
 
PPT
Get MEAN! Node.js and the MEAN stack
Nicholas McClay
 
PPTX
MEAN stack
Iryney Baran
 
PDF
LAMP is so yesterday, MEAN is so tomorrow! :)
Sascha Sambale
 
PDF
NodeSummit - MEAN Stack
Valeri Karpov
 
PDF
Introduction to the MEAN stack
Yoann Gotthilf
 
PPTX
Angular js introduction
Praveen Gubbala
 
PPTX
Mern stack developement
kalyankumar836878
 
Introduction to mean stack
Praveen Gubbala
 
Get MEAN! Node.js and the MEAN stack
Nicholas McClay
 
MEAN stack
Iryney Baran
 
LAMP is so yesterday, MEAN is so tomorrow! :)
Sascha Sambale
 
NodeSummit - MEAN Stack
Valeri Karpov
 
Introduction to the MEAN stack
Yoann Gotthilf
 
Angular js introduction
Praveen Gubbala
 
Mern stack developement
kalyankumar836878
 

What's hot (20)

PDF
Mean Stack - An Overview
Naveen Pete
 
PPTX
Rapid Application Development with MEAN Stack
Avinash Kaza
 
PDF
The MEAN Stack
Md. Ziaul Haq
 
PPTX
You know what iMEAN? Using MEAN stack for application dev on Informix
Keshav Murthy
 
PPTX
MongoDB Days Silicon Valley: Building Applications with the MEAN Stack
MongoDB
 
PPTX
Building your first MEAN application
FITC
 
PDF
MEAN Stack
Krishnaprasad k
 
PPTX
Starting from Scratch with the MEAN Stack
MongoDB
 
PPTX
Web Applications Development with MEAN Stack
Shailendra Chauhan
 
PPTX
MEAN Stack
Dotitude
 
PDF
The MEAN stack - SoCalCodeCamp - june 29th 2014
Simona Clapan
 
PPTX
Mean full stack development
Scott Lee
 
PPTX
FULL stack -> MEAN stack
Ashok Raj
 
PPTX
Kick start your journey as mern stack developer
ShrutiPanjwani1
 
PDF
MongoDB and the MEAN Stack
MongoDB
 
PDF
Beginning MEAN Stack
Rob Davarnia
 
PPT
The MEAN Stack: MongoDB, ExpressJS, AngularJS and Node.js
MongoDB
 
PPTX
Building Modern Web Apps with MEAN Stack
Suresh Patidar
 
PPTX
MEAN Stack
RoshanTak1
 
Mean Stack - An Overview
Naveen Pete
 
Rapid Application Development with MEAN Stack
Avinash Kaza
 
The MEAN Stack
Md. Ziaul Haq
 
You know what iMEAN? Using MEAN stack for application dev on Informix
Keshav Murthy
 
MongoDB Days Silicon Valley: Building Applications with the MEAN Stack
MongoDB
 
Building your first MEAN application
FITC
 
MEAN Stack
Krishnaprasad k
 
Starting from Scratch with the MEAN Stack
MongoDB
 
Web Applications Development with MEAN Stack
Shailendra Chauhan
 
MEAN Stack
Dotitude
 
The MEAN stack - SoCalCodeCamp - june 29th 2014
Simona Clapan
 
Mean full stack development
Scott Lee
 
FULL stack -> MEAN stack
Ashok Raj
 
Kick start your journey as mern stack developer
ShrutiPanjwani1
 
MongoDB and the MEAN Stack
MongoDB
 
Beginning MEAN Stack
Rob Davarnia
 
The MEAN Stack: MongoDB, ExpressJS, AngularJS and Node.js
MongoDB
 
Building Modern Web Apps with MEAN Stack
Suresh Patidar
 
MEAN Stack
RoshanTak1
 
Ad

Viewers also liked (8)

PDF
Future development stack ~ MeteorJS
Victor Stan
 
PDF
The MEAN stack
Nattaya Mairittha
 
PPTX
Introduction to Web Technology Stacks
Prakarsh -
 
PPTX
Development Stacks Are Irrelevant
Kurt Collins
 
PPT
Introduction to MongoDB
Ravi Teja
 
PDF
Introduction to Development for the Internet
Mike Crabb
 
PDF
Montreal Girl Geeks: Building the Modern Web
Rachel Andrew
 
PPTX
What I Carry: 10 Tools for Success
Jonathon Colman
 
Future development stack ~ MeteorJS
Victor Stan
 
The MEAN stack
Nattaya Mairittha
 
Introduction to Web Technology Stacks
Prakarsh -
 
Development Stacks Are Irrelevant
Kurt Collins
 
Introduction to MongoDB
Ravi Teja
 
Introduction to Development for the Internet
Mike Crabb
 
Montreal Girl Geeks: Building the Modern Web
Rachel Andrew
 
What I Carry: 10 Tools for Success
Jonathon Colman
 
Ad

Similar to Mean PPT (20)

PDF
MEAN Stack
Krishnaprasad k
 
PDF
Meanstack Introduction by Kishore Chandra
Kishore Chandra
 
PPTX
mearn-stackjdksjdsfjdkofkdokodkojdj.pptx
aravym456
 
PPTX
Mean stack
RavikantGautam8
 
PDF
Mean Stack
Shravan Vishwakarma
 
PPTX
MEAN Stack - Introduction & Advantages - Why should you switch to MEAN stack ...
Hariharan Ganesan
 
PPTX
mearn-stack-new_ccvbhbhvgvgcdszsxdxfcf.pptx
aravym456
 
PPTX
What is Mean Stack Development ?
Balajihope
 
PPTX
Meanstack overview
Adthasid Sabmake
 
PDF
What is mean stack?
Rishabh Saxena
 
PPTX
MEAN Stack Tutorial by jeetendra mandal
jeetendra mandal
 
PPTX
MEAN.js Workshop
Michael Haberman
 
PPTX
Overview of MEAN Stack development
CETPA
 
PDF
Web Development with AngularJS, NodeJS and ExpressJS
João Rocha da Silva
 
PPT
Node js
Chirag Parmar
 
PDF
What is the MEAN Stack? Why is this becoming more popular for modern web app ...
Soluzione IT Services
 
PPTX
MEAN (DevFM)
Fabian Vilers
 
PDF
Top MEAN Stack Interview Questions in 2023
Instaily Academy
 
PPTX
Introduction to MEAN Stack What it is and How it Works.pptx
QuickwayInfoSystems3
 
MEAN Stack
Krishnaprasad k
 
Meanstack Introduction by Kishore Chandra
Kishore Chandra
 
mearn-stackjdksjdsfjdkofkdokodkojdj.pptx
aravym456
 
Mean stack
RavikantGautam8
 
MEAN Stack - Introduction & Advantages - Why should you switch to MEAN stack ...
Hariharan Ganesan
 
mearn-stack-new_ccvbhbhvgvgcdszsxdxfcf.pptx
aravym456
 
What is Mean Stack Development ?
Balajihope
 
Meanstack overview
Adthasid Sabmake
 
What is mean stack?
Rishabh Saxena
 
MEAN Stack Tutorial by jeetendra mandal
jeetendra mandal
 
MEAN.js Workshop
Michael Haberman
 
Overview of MEAN Stack development
CETPA
 
Web Development with AngularJS, NodeJS and ExpressJS
João Rocha da Silva
 
Node js
Chirag Parmar
 
What is the MEAN Stack? Why is this becoming more popular for modern web app ...
Soluzione IT Services
 
MEAN (DevFM)
Fabian Vilers
 
Top MEAN Stack Interview Questions in 2023
Instaily Academy
 
Introduction to MEAN Stack What it is and How it Works.pptx
QuickwayInfoSystems3
 

Mean PPT

  • 2. Agenda  What is MEAN Stack  Why MEAN  MEAN Architecture  Node  Express  MongoDB  Angular  Yeoman  How we are using  Deploy
  • 3. What’s MEAN Stack?  MEAN Stack is a full-stack JavaScript solution that helps you build fast, robust and maintainable production web applications using MongoDB, Express, AngularJS, and Node.js.
  • 4. What’s a Dev Stack? LAMP - Linux, Apache MySQL, PHP .net - Windows, IIS, C#, MSSQL Server Java - Tomcat, Java, JSP, Oracle
  • 5. MongoDB is a NoSQL document-store database framework built on Node.js which comes with a set of features for building single-page, multi-page, and hybrid web apps. JavaScript (MV*) Framework maintained by Google. Executed by the V8- a JavaScript engine developed by Google which is used in Chrome
  • 6. Why MEAN Stack? All of these components use JavaScript / JSON. One language, same context Consistent Scalability Asynchronous
  • 7. Who is using MEAN?
  • 10. Package Management Node.js module package manager (NPM) There’s a module for almost anything you can imagine Simple to use >npm init >npm install –g module-name >npm install module-name >npm install
  • 12. Event Loop in Node  JavaScript runtime contains a message queue which stores a list of messages to be processed and their associated callback functions.  These messages are queued in response to external events (such as a mouse being clicked or receiving the response to an HTTP request) given a callback function has been provided. If, for example a user were to click a button and no callback function was provided – no message would have been enqueued...
  • 14. Hello World! var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello Worldn'); }).listen(8000, '127.0.0.1'); console.log('Server running at http://127.0.0.1:8000/'); >node app
  • 15. Let’s talk about express! >npm install express --save Web application framework (like Ruby on Rails, asp.net, Sinatra, django, and etc.)
  • 16. Why use express.js? Ability to use CSS Preprocessors like Sass/Less/Stylus Light weight/Fast Better Code Structure with Model View Controller (MVC) Routing Template flexibility (hogan, ejs, jade)
  • 18. Let’s talk about MongoDB!
  • 19. MongoDB Strategic Advantage Horizontally Scalable -Sharding Agile Flexible High Performance & Strong Consistency Application Highly Available -Replica Sets { author: “eliot”, date: new Date(), text: “MongoDB”, tags: [“database”, “flexible”, “JSON”]}
  • 20. Do More With Your Data Rich Queries Find course Find courses in basic category Geospatial Use for Geo Location Text Search Find all the course having title ‘Test’ Aggregation Calculate the Course Rating Map Reduce Calculate Content Likes { "_id": "55e009cefff4c4be328f555d", "category": { "_id": "3”, "title": "Basics" }, "contents": [ { "title": "Content 1", "_id": "55e009d9d1720d762cf2f343", "questions": [ { "description": "If you are happy and you know it", "type": "single”, "tips": "", "_id": "55e00a2dfff4c4be328f555e", "choices": [ { "description": "Hand", "isAnswer": false, "_id": "55e00a2dfff4c4be328f5561" } ] } ], "likes": 0, } ], "isPublished": true, "description": "If you are happy and you know it", "title": "Test Course" }
  • 21. MongoDB Pros  Schema-less Flexible  BSON  Sharding & Scaling  Map/Reduce
  • 22. MongoDB Cons  Data size  Less Flexible  Transactions
  • 24. Mongoose Object Modeling for MongoDB http://mongoosejs.com/ var mongoose = require('mongoose'); mongoose.connect('mongodb://localhost/test'); var Cat = mongoose.model('Cat', { name: String }); var kitty = new Cat({ name: 'Zildjian' }); kitty.save(function (err) { if (err) // ... console.log('meow'); });
  • 25. Why is AngularJS? Javascript Framework maintained by Google. Model-View-Controller (MV*) Makes development and testing easier Teaches HTML new tricks!
  • 26. How can Angular help? Integrate in parts of your existing website Single Page Applications (SPA)
  • 27. Two Way Data-binding  When the model gets updated, the UI (View) gets updated  When UI gets updated, the changes are reflected back to the model
  • 28. Deep Linking Deep linking allows AngularJS to get back to the state it was depending on the URL Using the “back” button is okay! Hyperlinks won’t break things
  • 29. Angular Terms - $scope The scope is responsible for detecting changes to the model and provides the execution for expressions. Also represents the application model.
  • 30. Angular Terms - Directives A directive is a behavior or DOM transformation which is triggered by the presence of a custom attribute, element name, or class name.  ng-app  ng-bind  ng-model  ng-class  ng-if  ng-show/ng-hide  ng-style  ng-view  ng-switch  ng-repeat  ng-init  ng-*
  • 31. Angular Terms - Filters Format and transform data. example: make text uppercase
  • 32. How to make angular routes?  Include angular-route.js library  Inject ‘ngRoute’ to app module  Inject ‘$routeProvider’ to your app as a config  define your routes! app.config(['$routeProvider', function( $routeProvider ) { $routeProvider.when('/', { templateUrl: 'homepage.html', controller: 'HomeController’ }); } ]);
  • 33. Yeoman Generator for Yeoman to quickly create MEAN applications Comes with Grunt, Bower.
  • 34. What’s Grunt? A JavaScript-based task runner to perform repetitive tasks. Grunt helps us run the web server and compile CSS/JS.  Unit testing  JS linting  Concatenating/minifying  Image optimization  Replace scripts in html files  SASS
  • 35. What’s Bower?  Package manager for anything you need to build your frontend  Bower install <package> -- save Bower manages front-end packages and tracks them in bower.js file

Editor's Notes

  • #12: How it works under-the-hood is pretty interesting. Compared to traditional web-serving techniques where each connection (request) spawns a new thread, taking up system RAM and eventually maxing-out at the amount of RAM available, Node.js operates on a single-thread, using non-blocking I/O calls, allowing it to support tens of thousands of concurrent connections There is, of course, the question of sharing a single thread between all clients requests, and it is a potential pitfall of writing Node.js applications. Firstly, heavy computation could choke up Node’s single thread and cause problems for all clients (more on this later) as incoming requests would be blocked until said computation was completed. Secondly, developers need to be really careful not to allow an exception bubbling up to the core (topmost) Node.js event loop, which will cause the Node.js instance to terminate (effectively crashing the program).
  • #15: var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World\n'); }).listen(8000, '127.0.0.1'); console.log('Server running at http://127.0.0.1:8000/');
  • #16: Express is a minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications.
  • #17: var express = require('express'); var app = express(); app.get('/', function(req, res){ res.send('hello world'); }); app.listen(8001); console.info("Server started at 8001 port");
  • #22: BSON is a binary representation of JSON documents. JSON everywhere! Sharding is the process of storing data records across multiple machines and approach to meeting the demands of data growth Processing and generating large data sets with a parallel, distributed algorithm on a cluster.

  • #23: Typically higher data size because of the repeated field names stored Less flexibility for querying (no joins!!) No support for transactions. Some atomic operations are supported.
  • #25: Mongoose provides a straight-forward, schema-based solution to model your application data. It includes built-in type casting, validation, query building, business logic hooks and more, out of the box.