SlideShare a Scribd company logo
MY REFERENCES
Angularjs Benefits Over Javascript
Angular js benefits over
javascript...........
1. Magical Two-Way data binding.
2. Routing Support.
3.Structure front end code.
4.Templating with HTML.
5. Teach HTML new syntax with directives.
6.Embeddable, testable, and injectable.
7. Powered by Google and an active community.
The angular team built a plugin for the
Google chrome browser called Batarang that
Advantages of AngularJS
• AngularJS provides capability to create Single
Page Application in a very clean and
maintainable way.
• AngularJS provides data binding capability to
HTML thus giving user a rich and responsive
experience
• AngularJS code is unit testable.
• AngularJS uses dependency injection and
make use of separation of concerns.
AngularJS provides reusable components.
With AngularJS, developer write less code
and get more functionality.
In AngularJS, views are pure html pages, and
controllers written in javascript do the
business processing.
On top of everything, AngularJS applications
can run on all major browsers and smart
phones including Android and iOS based
phones/tablets.
Disadvantages of AngulaJS
• Not Secure : Being JavaScript only
framework, application written in
AngularJS are not safe. Server side
authentication and authorization is must
to keep an application secure.
• Not degradable: If your application user
disables Javascript then user will just see
the basic page and nothing more.
Angular JS Factory, Service and Provider
• Factory
• A factory is a simple function which allows you
to add some logic before creating the object.
It returns the created object.
• Syntax
app.factory('serviceName',function(){
return serviceObj;
})
Creating service using factory method
<script>
//creating module
var app = angular.module('app', []);
//define a factory using factory() function
app.factory('MyFactory', function () {
var serviceObj = {};
serviceObj.function1 = function () {
//TO DO:
};
serviceObj.function2 = function () {
//TO DO:
};
return serviceObj;
});
</script>
When to use
It is just a collection of functions like a class. Hence, it
can be instantiated in different controllers when you are
using it with constructor function.
Service
A service is a constructor function which creates the
object using new keyword. You can add properties and
functions to a service object by using this keyword.
Unlike factory, it doesn’t return anything.
Syntax
app.service('serviceName',function(){
})
Creating service using service method
1.<script>
2.//creating module
3.var app = angular.module('app', []);
4.
5.//define a service using service() function
6.app.service('MyService', function () {
7.this.function1 = function () {
8.//TO DO:
9.};
10.
11.this.function2 = function () {
12.//TO DO:
13.};
14.});
15.</script>
When to use
It is a singleton object. Use it when you need to share a single object
across the application. For example, authenticated user details.
Provider
A provider is used to create a configurable service object.
It returns value by using $get() function.
Syntax
//creating a service
app.provider('serviceName',function(){
});
//configuring the service
app.config(function(serviceNameProvider){
});
Creating service using provider method
<script>
//define a provider using provider() function
app.provider('configurableService', function () {
var name = '';
this.setName = function (newName) {
name = newName;
};
this.$get = function () {
return name;
};
});
//configuring provider using config() function
app.config(function (configurableService) {
configurableService.setName('www.dotnet-tricks.com');
});
</script>
When to use
When you need to provide module-wise configuration for your service
object before making it available.
AngularJS : Factory, Service and Provider with
example
<html>
<head>
<title>AngularJS Service Factory and Providers</title>
<script src="lib/angular.js"></script>
</head>
<body>
<div class="container" style="padding-top:20px;">
<div ng-app="myApp" ng-controller="myController">
<p>From Service: </p>
<p>From Factory: </p>
<p>From Provider: </p>
</div>
</div>
<script>
//defining module
var app = angular.module('myApp', []);
//defining service
app.service('myService', function () {
this.name = '';
this.setName = function (newName) {
this.name = newName;
return this.name;
};
});
//defining factory
app.factory('myFactory', function () {
var serviceObj = {};
serviceObj.name = '';
serviceObj.setName = function (newName) {
serviceObj.name = newName;
};
return serviceObj;
});
//defining provider
app.provider('configurable', function () {
var privateName = '';
this.setName = function (newName) {
privateName = newName;
};
this.$get = function () {
return {
name: privateName
};
};
});
//configuring provider
app.config(function (configurableProvider) {
configurableProvider.setName("Saksham Chauhan");
});
//defining controller
app.controller('myController', function ($scope,
myService, myFactory, configurable) {
$scope.serviceName =
myService.setName("Saksham Chauhan");
myFactory.setName("Saksham Chauhan");
$scope.factoryName = myFactory.name;
$scope.providerName = configurable.name;
});
</script>
</body>
</html>
How it works...
SaaS
Software as a service (or SaaS) is a way of delivering
applications over the Internet—as a service. Instead of
installing and maintaining software, you simply access it via
the Internet, freeing yourself from complex software and
hardware management.
SaaS applications are sometimes called Web-based
software, on-demand software, or hosted software.
Whatever the name, SaaS applications run on a SaaS
provider’s servers. The provider manages access to the
application, including security, availability, and
performance.
SAAS: THE PAYOFF
SaaS customers have no hardware or software to buy,
install, maintain, or update. Access to applications is easy:
You just need an Internet connection.
SaaS Characteristics
A good way to understand the SaaS model is by thinking of
a bank, which protects the privacy of each customer while
providing service that is reliable and secure—on a massive
scale. A bank’s customers all use the same financial systems
and technology without worrying about anyone accessing
their personal information without authorization.
A “bank” meets the key characteristics of the SaaS model:
MULTITENANT ARCHITECTURE
A multitenant architecture, in which all users and applications
share a single, common infrastructure and code base that is
centrally maintained. Because SaaS vendor clients are all on the
same infrastructure and code base, vendors can innovate more
quickly and save the valuable development time previously spent
on maintaining numerous versions of outdated code.
EASY CUSTOMIZATION
The ability for each user to easily customize applications to fit
their business processes without affecting the common
infrastructure. Because of the way SaaS is architected, these
customizations are unique to each company or user and are
always preserved through upgrades. That means SaaS providers
can make upgrades more often, with less customer risk and much
lower adoption cost.
BETTER ACCESS
Improved access to data from any networked device while making
it easier to manage privileges, monitor data use, and ensure
everyone sees the same information at the same time.
SAAS HARNESSES THE CONSUMER WEB
Anyone familiar with Amazon.com or My Yahoo! will be familiar
with the Web interface of typical SaaS applications. With the SaaS
model, you can customize with point-and-click ease, making the
weeks or months it takes to update traditional business software
seem hopelessly old fashioned.
SAAS TRENDS
Organizations are now developing SaaS integration platforms (or
SIPs) for building additional SaaS applications. The consulting firm
Saugatuck Technology calls this the “third wave” in software
adoption: when SaaS moves beyond standalone software
functionality to become a platform for mission-critical
applications.
Node.js
What is Nodejs?
• Node.js is a server side scripting platform
just like php, python or ruby.
• Php depends on Apache or nginx web
servers for handling http request and
response, on the other hand Node.js has
its own http server library allowing us to
have more control on the web server.
Definition of Node
• Node.js is built on Chrome’s JavaScript
runtime V8 for developing fast, scalable
network applications. Node.js uses an
event-driven, non-blocking I/O model
that makes it lightweight and efficient,
perfect for data-intensive real-time
applications that run across distributed
devices.
Advantages of node.js
• Node.js uses java script and it is easy to learn.
• Node.js runs on v8 Engine (a javascript
interpreter: chrome uses it) which is very fast.
• We can build highly scalable web applications
using node.js
• We can develop chat based applications, online
games, API’s and many more.
• Supports interaction with all major databases.
• Node.js has 1000’s of third-party free modules.
Companies depending on node.js
• ebay, Microsoft, Yahoo!,
StrongLoop, OmniTI, Storify, local
response, nodejitsu, Linkedin, Iris
Couch, backbeam, recruitics,
Transloadit, Uber, Voxer,when-to-
manage, Jaleoo, Cloud9 IDE,
NODE the FIRM etc..
Basic terminology
• Asynchronous– Asynchronous means an event
which is happening independently of other
events. The main advantage of the asynchronous
approach is scalability.
•
Npm – Stands for node package manager. This
will help us install the latest modules directly
from the servers instead of checking for the latest
version, downloading and copying to the
appropriate directory. It also has other uses.
Express– Express is a highly recommended web application
framework for node.js. It takes care of the low level services for
us.
Module– A module is a independent, reusable piece of code. you
can download them and use them directly in your project. ex:
express, http, https etc are some of the modules for node.js.
REPL-Read-Eval-Print-Loop provides a way to interact with
javascript it can be used for debugging, testing. To try repl go to
terminal(cmd prompt) and type node and try ex:
console.log(“learn nodejs”);
Mongoose– Mongoose is a MongoDB object modeling tool for
node.js. It becomes easy to interact with mongodb database
server using Mongoose module.
Db-mysql– It is a node.js module to interact with mysql database.
Advantages of Node.js
• Open Source
• Node.js is open source, so it’s free to use and
no need to pay for license. There are also
many open source modules supported by
Node.js.
• JavaScript as Programming Language
• It uses JavaScript as a programming language
for both front-end and back-end which
increase programmer productivity and code
reusability.
• Scalable
• You can scale your Node.js application by using
two ways – Horizontal Scaling and Vertical
Scaling, which helps you to improve your
application performance.
– In Horizontal scaling you can add more nodes to your
existing system.
– In Vertical scaling you can add more resources to a
single node.
• Better Performance
• It provides better performance, since Node.js I/O
operations are non-blocking. Also, it uses V8
JavaScript engine to execute JavaScript code. V8
engine compiles the JS code directly into machine
code which make it fast.
• Caching Support
• Node.js supports caching of modules. Hence, when a
Node.js modules is requested first time, it is cached
into the application memory. So next calls for loading
the same module may not cause the module code to
be executed again.
• Lightweight and Extensible
• Node.js is based on JavaScript which can be executed
on client side as well as server side. Also, it supports
exchange of data using JSON which is easily
consumed by JavaScript. This makes it light weight as
compared to other frameworks.
• Node.js is open source. Hence you can extend it as
per your need.
• REST API Support
• Using Node.js you can also develop RESTful services API easily.
• Unit Testing
• It supports unit testing out of box. You can use any JS unit
testing frameworks like Jasmin to test your Node.js code.
• Server Development
• Node.js has some built-in API which help you to create
different types of Server like HTTP Server, DNS Server, TCP
Server etc.
• Community Support
• Node.js has a wide community of developers around the
world. They are active in development of new modules or
packages to support different types of applications
development.
Limitations of Node.js
• It doesn’t support multi-threaded
programming.
• It doesn’t support very high computational
intensive tasks. When it executes long running
task, it will queue all the incoming requests to
wait for execution, since it follows JavaScript
event loop which is single threaded.
• Node good for executing synchronous and
CPU intensive tasks.
MongoDB
• MongoDB is a cross-platform,
document oriented database that
provides, high performance, high
availability, and easy scalability.
MongoDB works on concept of
collection and document.
Advantages of MongoDB over RDBMS
• Schema less : MongoDB is document
database in which one collection holds
different different documents. Number
of fields, content and size of the
document can be differ from one
document to another.
• Structure of a single object is clear
• No complex joins
• Deep query-ability. MongoDB supports dynamic
queries on documents using a document-based
query language that's nearly as powerful as SQL
• Tuning
• Ease of scale-out: MongoDB is easy to scale
• Conversion / mapping of application objects to
database objects not needed
• Uses internal memory for storing the (windowed)
working set, enabling faster access of data
Why should use MongoDB?
• Document Oriented Storage : Data is stored in
the form of JSON style documents
• Index on any attribute
• Replication & High Availability
• Auto-Sharding
• Rich Queries
• Fast In-Place Updates
• Professional Support By MongoDB
Disadvantages of MDB
• Data size in MongoDB is typically higher due to e.g.
each document has field names stored it
• less flexibity with querying (e.g. no JOINs)
• no support for transactions - certain atomic
operations are supported, at a single document level
• at the moment Map/Reduce (e.g. to do
aggregations/data analysis) is OK, but not blisteringly
fast. So if that's required, something like Hadoop may
need to be added into the mix
• less up to date information available/fast evolving
product
• MEAN stack stands for
• MongoDB as a Database
• Express as the Web Framework
• AngularJS as a frontend framework and
• js as the server platform.
• There are various Advantages of using Mean
Stack:
• You are free to use Mongo DB
• Its cost effective
• You will get benefited by using MongoDB
• MEAN stack uses JSON
• Node.js simplifies the server layer and is super-
fast
JAVASCRIPT Advantages
• Javascript is executed on the client side
This means that the code is executed on the user's processor
instead of the web server thus saving bandwidth and strain on
the web server.
• Javascript is a relatively easy language
The Javascript language is relatively easy to learn and
comprises of syntax that is close to English. It uses the DOM
model that provides plenty of prewritten functionality to the
various objects on pages making it a breeze to develop a
script to solve a custom purpose.
• Javascript is relatively fast to the end user
As the code is executed on the user's computer, results and
processing is completed almost instantly depending on the
task (tasks in javascript on web pages are usually simple so as
to prevent being a memory hog) as it does not need to be
processed in the site's web server and sent back to the user
consuming local as well as server bandwidth.
• Extended functionality to web pages
Third party add-ons like Greasemonkey enable Javascript
developers to write snippets of Javascript which can execute
on desired web pages to extend its functionality. If you use a
website and require a certain feature to be included, you can
write it yourself and use an add-on like Greasemonkey to
implement it on the web page.
Disadvantages
• Security Issues
Javascript snippets, once appended onto web pages execute
on client servers immediately and therefore can also be used
to exploit the user's system. While a certain restriction is set
by modern web standards on browsers, malicious code can
still be executed complying with the restrictions set.
• Javascript rendering varies
Different layout engines may render Javascript differently
resulting in inconsistency in terms of functionality and
interface. While the latest versions of javascript and rendering
have been geared towards a universal standard, certain
variations still exist. Website Usability Consultants all over
the world make a living on these differences, but it enrages
thousands of developers on a daily basis.
Express.js
• Express is a fast, unopinionated
minimalist web framework for Node.js" -
official web site: Expressjs.com
• Express.js is a web application framework
for Node.js. It provides various features
that make web application development
fast and easy which otherwise takes
more time using only Node.js.
• Express.js is based on the Node.js middleware
module called connect which in turn uses http
module. So, any middleware which is based
on connect will also work with Express.js.
Advantages of Express
• Makes Node.js web application development fast and easy.
• Easy to configure and customize.
• Allows you to define routes of your application based on HTTP
methods and URLs.
• Includes various middleware modules which you can use to
perform additional tasks on request and response.
• Easy to integrate with different template engines like Jade,
Vash, EJS etc.
• Allows you to define an error handling middleware.
• Easy to serve static files and resources of your application.
• Allows you to create REST API server.
• Easy to connect with databases such as MongoDB, Redis,
MySQL
Express.js Web Application:
• Express.js provides an easy way to create web
server and render HTML pages for different
HTTP requests by configuring routes for your
application.
• Configure Routes:
Use app object to define different routes of
your application. The app object includes
get(), post(), put() and delete() methods to
define routes for HTTP GET, POST, PUT and
DELETE requests respectively.
Body Parser:
• To handle HTTP POST request in
Express.js version 4 and above, you need
to install middleware module
called body-parser. The middleware was
a part of Express.js earlier but now you
have to install it separately.
• This body-parser module parses the
JSON, buffer, string and url encoded data
submitted using HTTP POST request.
Gulp Vs Grunt
• The biggest advantage of using gulp is that it focuses
on code whereas grunt relies on configuration.
Personally, I have always been a fan of code over
configuration.
• Gulp is a streaming build system. It utilises Node.js
streams and usually executes faster than grunt.
• In reality, gulp plugins are just Node.js streaming
modules that have nothing to do with gulp (except
the name, of course).
• Gulp plugins follow the unix principle : Try to do one
thing well.
• If you are a beginner, you will probably pick up gulp
faster than grunt because of code over configuration.
•Grunt focuses on configuration, while Gulp focuses on
code
•Grunt was built around a set of built-in, and commonly
used tasks, while Gulp came around with the idea of
enforcing nothing, but how community-developed micro-
tasks should connect to each other.
Similarities between Grunt and Gulp
Grunt and Gulp can automate tedious,
human-error-prone build processes
such as:
•code minification.
•code-quality analysis
•image optimization
•vendor-prefixing
•unit-testing
Differences between Grunt and Gulp
• The way you configure your tasks. Grunt
is configuration-based. Gulp is stream-based.
• The way they run your tasks. Grunt runs the
processes you want to execute in a sequential
manner. Gulp tries to run them
with maximum concurrency, meaning it will
try to execute processes in parallel if possible.

More Related Content

What's hot

AngularJS
AngularJSAngularJS
Kalp Corporate Angular Js Tutorials
Kalp Corporate Angular Js TutorialsKalp Corporate Angular Js Tutorials
Kalp Corporate Angular Js Tutorials
Kalp Corporate
 
A gently introduction to AngularJS
A gently introduction to AngularJSA gently introduction to AngularJS
A gently introduction to AngularJS
Gregor Woiwode
 
What's new in Angular 2?
What's new in Angular 2?What's new in Angular 2?
What's new in Angular 2?
Alfred Jett Grandeza
 
Adding User Management to Node.js
Adding User Management to Node.jsAdding User Management to Node.js
Adding User Management to Node.js
Dev_Events
 
Angular js
Angular jsAngular js
Angular Seminar-js
Angular Seminar-jsAngular Seminar-js
Angular Seminar-js
Mindfire Solutions
 
Angular from Scratch
Angular from ScratchAngular from Scratch
Angular from Scratch
Christian Lilley
 
AngularJS Project Setup step-by- step guide - RapidValue Solutions
AngularJS Project Setup step-by- step guide - RapidValue SolutionsAngularJS Project Setup step-by- step guide - RapidValue Solutions
AngularJS Project Setup step-by- step guide - RapidValue Solutions
RapidValue
 
AngularJS for Beginners
AngularJS for BeginnersAngularJS for Beginners
AngularJS for Beginners
Edureka!
 
Full Angular 7 Firebase Authentication System
Full Angular 7 Firebase Authentication SystemFull Angular 7 Firebase Authentication System
Full Angular 7 Firebase Authentication System
Digamber Singh
 
Building fast and performant apps
Building fast and performant appsBuilding fast and performant apps
Building fast and performant apps
Rahul Yadav
 
Introduction to React for Frontend Developers
Introduction to React for Frontend DevelopersIntroduction to React for Frontend Developers
Introduction to React for Frontend Developers
Sergio Nakamura
 
Introduction to Vaadin
Introduction to VaadinIntroduction to Vaadin
Introduction to Vaadin
Jeroen Benats
 
Introduction to Vaadin
Introduction to VaadinIntroduction to Vaadin
Introduction to Vaadin
netomi
 
Introduction to Angular JS
Introduction to Angular JSIntroduction to Angular JS
Introduction to Angular JS
Santhosh Kumar Srinivasan
 
Angular.js interview questions
Angular.js interview questionsAngular.js interview questions
Angular.js interview questions
codeandyou forums
 
RESTful services and OAUTH protocol in IoT
RESTful services and OAUTH protocol in IoTRESTful services and OAUTH protocol in IoT
RESTful services and OAUTH protocol in IoT
Yakov Fain
 
Introduction to single page application with angular js
Introduction to single page application with angular jsIntroduction to single page application with angular js
Introduction to single page application with angular js
Mindfire Solutions
 
125 고성능 web view-deview 2013 발표 자료_공유용
125 고성능 web view-deview 2013 발표 자료_공유용125 고성능 web view-deview 2013 발표 자료_공유용
125 고성능 web view-deview 2013 발표 자료_공유용
NAVER D2
 

What's hot (20)

AngularJS
AngularJSAngularJS
AngularJS
 
Kalp Corporate Angular Js Tutorials
Kalp Corporate Angular Js TutorialsKalp Corporate Angular Js Tutorials
Kalp Corporate Angular Js Tutorials
 
A gently introduction to AngularJS
A gently introduction to AngularJSA gently introduction to AngularJS
A gently introduction to AngularJS
 
What's new in Angular 2?
What's new in Angular 2?What's new in Angular 2?
What's new in Angular 2?
 
Adding User Management to Node.js
Adding User Management to Node.jsAdding User Management to Node.js
Adding User Management to Node.js
 
Angular js
Angular jsAngular js
Angular js
 
Angular Seminar-js
Angular Seminar-jsAngular Seminar-js
Angular Seminar-js
 
Angular from Scratch
Angular from ScratchAngular from Scratch
Angular from Scratch
 
AngularJS Project Setup step-by- step guide - RapidValue Solutions
AngularJS Project Setup step-by- step guide - RapidValue SolutionsAngularJS Project Setup step-by- step guide - RapidValue Solutions
AngularJS Project Setup step-by- step guide - RapidValue Solutions
 
AngularJS for Beginners
AngularJS for BeginnersAngularJS for Beginners
AngularJS for Beginners
 
Full Angular 7 Firebase Authentication System
Full Angular 7 Firebase Authentication SystemFull Angular 7 Firebase Authentication System
Full Angular 7 Firebase Authentication System
 
Building fast and performant apps
Building fast and performant appsBuilding fast and performant apps
Building fast and performant apps
 
Introduction to React for Frontend Developers
Introduction to React for Frontend DevelopersIntroduction to React for Frontend Developers
Introduction to React for Frontend Developers
 
Introduction to Vaadin
Introduction to VaadinIntroduction to Vaadin
Introduction to Vaadin
 
Introduction to Vaadin
Introduction to VaadinIntroduction to Vaadin
Introduction to Vaadin
 
Introduction to Angular JS
Introduction to Angular JSIntroduction to Angular JS
Introduction to Angular JS
 
Angular.js interview questions
Angular.js interview questionsAngular.js interview questions
Angular.js interview questions
 
RESTful services and OAUTH protocol in IoT
RESTful services and OAUTH protocol in IoTRESTful services and OAUTH protocol in IoT
RESTful services and OAUTH protocol in IoT
 
Introduction to single page application with angular js
Introduction to single page application with angular jsIntroduction to single page application with angular js
Introduction to single page application with angular js
 
125 고성능 web view-deview 2013 발표 자료_공유용
125 고성능 web view-deview 2013 발표 자료_공유용125 고성능 web view-deview 2013 발표 자료_공유용
125 고성능 web view-deview 2013 발표 자료_공유용
 

Similar to Mean stack Magics

AngularJS Basics
AngularJS BasicsAngularJS Basics
AngularJS Basics
Ravi Mone
 
Angular Project Report
 Angular Project Report Angular Project Report
Angular Project Report
Kodexhub
 
Modern webtechnologies
Modern webtechnologiesModern webtechnologies
Modern webtechnologies
Besjan Xhika
 
WJAX 2012 - Web Apps With AngularJS
WJAX 2012 - Web Apps With AngularJSWJAX 2012 - Web Apps With AngularJS
WJAX 2012 - Web Apps With AngularJS
Philipp Burgmer
 
Easy integration of Bluemix services with your applications
Easy integration of Bluemix services with your applicationsEasy integration of Bluemix services with your applications
Easy integration of Bluemix services with your applications
Jack-Junjie Cai
 
ASP.NEt MVC and Angular What a couple
ASP.NEt MVC and Angular What a coupleASP.NEt MVC and Angular What a couple
ASP.NEt MVC and Angular What a couple
Alexandre Marreiros
 
The Happy Path: Migration Strategies for Node.js
The Happy Path: Migration Strategies for Node.jsThe Happy Path: Migration Strategies for Node.js
The Happy Path: Migration Strategies for Node.js
Nicholas Jansma
 
Java script framework
Java script frameworkJava script framework
Java script framework
Debajani Mohanty
 
quantum_leap_angularjs_tools_redefining_development_in_2023.pptx
quantum_leap_angularjs_tools_redefining_development_in_2023.pptxquantum_leap_angularjs_tools_redefining_development_in_2023.pptx
quantum_leap_angularjs_tools_redefining_development_in_2023.pptx
sarah david
 
Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014
Lou Sacco
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
Yoann Gotthilf
 
AngularJS: Overview & Key Features
AngularJS: Overview & Key FeaturesAngularJS: Overview & Key Features
AngularJS: Overview & Key Features
Mohamad Al Asmar
 
ASP .Net Core SPA Templates
ASP .Net Core SPA TemplatesASP .Net Core SPA Templates
ASP .Net Core SPA Templates
Eamonn Boyle
 
AngularJs
AngularJsAngularJs
AngularJs
Abdhesh Kumar
 
Angularjs 131211063348-phpapp01
Angularjs 131211063348-phpapp01Angularjs 131211063348-phpapp01
Angularjs 131211063348-phpapp01
Arunangsu Sahu
 
Internship-Report-VitulChauhan-18132023-IT_CRUD-OPERATION.pdf
Internship-Report-VitulChauhan-18132023-IT_CRUD-OPERATION.pdfInternship-Report-VitulChauhan-18132023-IT_CRUD-OPERATION.pdf
Internship-Report-VitulChauhan-18132023-IT_CRUD-OPERATION.pdf
VitulChauhan
 
Chinnasamy Manickam
Chinnasamy ManickamChinnasamy Manickam
Chinnasamy Manickam
Chinnasamy Manickam
 
Angular workshop - Full Development Guide
Angular workshop - Full Development GuideAngular workshop - Full Development Guide
Angular workshop - Full Development Guide
Nitin Giri
 
Introduction to Angular Js
Introduction to Angular JsIntroduction to Angular Js
Introduction to Angular Js
Professional Guru
 
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud EnvironmentsTools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
VMware Tanzu
 

Similar to Mean stack Magics (20)

AngularJS Basics
AngularJS BasicsAngularJS Basics
AngularJS Basics
 
Angular Project Report
 Angular Project Report Angular Project Report
Angular Project Report
 
Modern webtechnologies
Modern webtechnologiesModern webtechnologies
Modern webtechnologies
 
WJAX 2012 - Web Apps With AngularJS
WJAX 2012 - Web Apps With AngularJSWJAX 2012 - Web Apps With AngularJS
WJAX 2012 - Web Apps With AngularJS
 
Easy integration of Bluemix services with your applications
Easy integration of Bluemix services with your applicationsEasy integration of Bluemix services with your applications
Easy integration of Bluemix services with your applications
 
ASP.NEt MVC and Angular What a couple
ASP.NEt MVC and Angular What a coupleASP.NEt MVC and Angular What a couple
ASP.NEt MVC and Angular What a couple
 
The Happy Path: Migration Strategies for Node.js
The Happy Path: Migration Strategies for Node.jsThe Happy Path: Migration Strategies for Node.js
The Happy Path: Migration Strategies for Node.js
 
Java script framework
Java script frameworkJava script framework
Java script framework
 
quantum_leap_angularjs_tools_redefining_development_in_2023.pptx
quantum_leap_angularjs_tools_redefining_development_in_2023.pptxquantum_leap_angularjs_tools_redefining_development_in_2023.pptx
quantum_leap_angularjs_tools_redefining_development_in_2023.pptx
 
Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
AngularJS: Overview & Key Features
AngularJS: Overview & Key FeaturesAngularJS: Overview & Key Features
AngularJS: Overview & Key Features
 
ASP .Net Core SPA Templates
ASP .Net Core SPA TemplatesASP .Net Core SPA Templates
ASP .Net Core SPA Templates
 
AngularJs
AngularJsAngularJs
AngularJs
 
Angularjs 131211063348-phpapp01
Angularjs 131211063348-phpapp01Angularjs 131211063348-phpapp01
Angularjs 131211063348-phpapp01
 
Internship-Report-VitulChauhan-18132023-IT_CRUD-OPERATION.pdf
Internship-Report-VitulChauhan-18132023-IT_CRUD-OPERATION.pdfInternship-Report-VitulChauhan-18132023-IT_CRUD-OPERATION.pdf
Internship-Report-VitulChauhan-18132023-IT_CRUD-OPERATION.pdf
 
Chinnasamy Manickam
Chinnasamy ManickamChinnasamy Manickam
Chinnasamy Manickam
 
Angular workshop - Full Development Guide
Angular workshop - Full Development GuideAngular workshop - Full Development Guide
Angular workshop - Full Development Guide
 
Introduction to Angular Js
Introduction to Angular JsIntroduction to Angular Js
Introduction to Angular Js
 
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud EnvironmentsTools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
 

Recently uploaded

CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
rpskprasana
 
Recycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part IIRecycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part II
Aditya Rajan Patra
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
bijceesjournal
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball playEric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
enizeyimana36
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
Yasser Mahgoub
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
NazakatAliKhoso2
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
KrishnaveniKrishnara1
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
mahammadsalmanmech
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
wisnuprabawa3
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
sachin chaurasia
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
nooriasukmaningtyas
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
University of Maribor
 
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEMTIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
HODECEDSIET
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have oneISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
Las Vegas Warehouse
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Christina Lin
 

Recently uploaded (20)

CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
 
Recycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part IIRecycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part II
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball playEric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
 
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEMTIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
TIME DIVISION MULTIPLEXING TECHNIQUE FOR COMMUNICATION SYSTEM
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have oneISPM 15 Heat Treated Wood Stamps and why your shipping must have one
ISPM 15 Heat Treated Wood Stamps and why your shipping must have one
 
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming PipelinesHarnessing WebAssembly for Real-time Stateless Streaming Pipelines
Harnessing WebAssembly for Real-time Stateless Streaming Pipelines
 

Mean stack Magics

  • 3. Angular js benefits over javascript........... 1. Magical Two-Way data binding. 2. Routing Support. 3.Structure front end code. 4.Templating with HTML. 5. Teach HTML new syntax with directives. 6.Embeddable, testable, and injectable. 7. Powered by Google and an active community. The angular team built a plugin for the Google chrome browser called Batarang that
  • 4. Advantages of AngularJS • AngularJS provides capability to create Single Page Application in a very clean and maintainable way. • AngularJS provides data binding capability to HTML thus giving user a rich and responsive experience • AngularJS code is unit testable. • AngularJS uses dependency injection and make use of separation of concerns.
  • 5. AngularJS provides reusable components. With AngularJS, developer write less code and get more functionality. In AngularJS, views are pure html pages, and controllers written in javascript do the business processing. On top of everything, AngularJS applications can run on all major browsers and smart phones including Android and iOS based phones/tablets.
  • 6. Disadvantages of AngulaJS • Not Secure : Being JavaScript only framework, application written in AngularJS are not safe. Server side authentication and authorization is must to keep an application secure. • Not degradable: If your application user disables Javascript then user will just see the basic page and nothing more.
  • 7. Angular JS Factory, Service and Provider • Factory • A factory is a simple function which allows you to add some logic before creating the object. It returns the created object. • Syntax app.factory('serviceName',function(){ return serviceObj; })
  • 8. Creating service using factory method <script> //creating module var app = angular.module('app', []); //define a factory using factory() function app.factory('MyFactory', function () { var serviceObj = {}; serviceObj.function1 = function () { //TO DO: }; serviceObj.function2 = function () { //TO DO: }; return serviceObj; }); </script>
  • 9. When to use It is just a collection of functions like a class. Hence, it can be instantiated in different controllers when you are using it with constructor function. Service A service is a constructor function which creates the object using new keyword. You can add properties and functions to a service object by using this keyword. Unlike factory, it doesn’t return anything. Syntax app.service('serviceName',function(){ })
  • 10. Creating service using service method 1.<script> 2.//creating module 3.var app = angular.module('app', []); 4. 5.//define a service using service() function 6.app.service('MyService', function () { 7.this.function1 = function () { 8.//TO DO: 9.}; 10. 11.this.function2 = function () { 12.//TO DO: 13.}; 14.}); 15.</script> When to use It is a singleton object. Use it when you need to share a single object across the application. For example, authenticated user details.
  • 11. Provider A provider is used to create a configurable service object. It returns value by using $get() function. Syntax //creating a service app.provider('serviceName',function(){ }); //configuring the service app.config(function(serviceNameProvider){ });
  • 12. Creating service using provider method <script> //define a provider using provider() function app.provider('configurableService', function () { var name = ''; this.setName = function (newName) { name = newName; }; this.$get = function () { return name; }; }); //configuring provider using config() function app.config(function (configurableService) { configurableService.setName('www.dotnet-tricks.com'); }); </script>
  • 13. When to use When you need to provide module-wise configuration for your service object before making it available. AngularJS : Factory, Service and Provider with example <html> <head> <title>AngularJS Service Factory and Providers</title> <script src="lib/angular.js"></script> </head> <body> <div class="container" style="padding-top:20px;"> <div ng-app="myApp" ng-controller="myController"> <p>From Service: </p> <p>From Factory: </p> <p>From Provider: </p> </div> </div> <script> //defining module var app = angular.module('myApp', []);
  • 14. //defining service app.service('myService', function () { this.name = ''; this.setName = function (newName) { this.name = newName; return this.name; }; }); //defining factory app.factory('myFactory', function () { var serviceObj = {}; serviceObj.name = ''; serviceObj.setName = function (newName) { serviceObj.name = newName; }; return serviceObj; });
  • 15. //defining provider app.provider('configurable', function () { var privateName = ''; this.setName = function (newName) { privateName = newName; }; this.$get = function () { return { name: privateName }; }; }); //configuring provider app.config(function (configurableProvider) { configurableProvider.setName("Saksham Chauhan"); });
  • 16. //defining controller app.controller('myController', function ($scope, myService, myFactory, configurable) { $scope.serviceName = myService.setName("Saksham Chauhan"); myFactory.setName("Saksham Chauhan"); $scope.factoryName = myFactory.name; $scope.providerName = configurable.name; }); </script> </body> </html>
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41. SaaS
  • 42. Software as a service (or SaaS) is a way of delivering applications over the Internet—as a service. Instead of installing and maintaining software, you simply access it via the Internet, freeing yourself from complex software and hardware management. SaaS applications are sometimes called Web-based software, on-demand software, or hosted software. Whatever the name, SaaS applications run on a SaaS provider’s servers. The provider manages access to the application, including security, availability, and performance.
  • 43. SAAS: THE PAYOFF SaaS customers have no hardware or software to buy, install, maintain, or update. Access to applications is easy: You just need an Internet connection. SaaS Characteristics A good way to understand the SaaS model is by thinking of a bank, which protects the privacy of each customer while providing service that is reliable and secure—on a massive scale. A bank’s customers all use the same financial systems and technology without worrying about anyone accessing their personal information without authorization.
  • 44. A “bank” meets the key characteristics of the SaaS model: MULTITENANT ARCHITECTURE A multitenant architecture, in which all users and applications share a single, common infrastructure and code base that is centrally maintained. Because SaaS vendor clients are all on the same infrastructure and code base, vendors can innovate more quickly and save the valuable development time previously spent on maintaining numerous versions of outdated code. EASY CUSTOMIZATION The ability for each user to easily customize applications to fit their business processes without affecting the common infrastructure. Because of the way SaaS is architected, these customizations are unique to each company or user and are always preserved through upgrades. That means SaaS providers can make upgrades more often, with less customer risk and much lower adoption cost.
  • 45. BETTER ACCESS Improved access to data from any networked device while making it easier to manage privileges, monitor data use, and ensure everyone sees the same information at the same time. SAAS HARNESSES THE CONSUMER WEB Anyone familiar with Amazon.com or My Yahoo! will be familiar with the Web interface of typical SaaS applications. With the SaaS model, you can customize with point-and-click ease, making the weeks or months it takes to update traditional business software seem hopelessly old fashioned. SAAS TRENDS Organizations are now developing SaaS integration platforms (or SIPs) for building additional SaaS applications. The consulting firm Saugatuck Technology calls this the “third wave” in software adoption: when SaaS moves beyond standalone software functionality to become a platform for mission-critical applications.
  • 47. What is Nodejs? • Node.js is a server side scripting platform just like php, python or ruby. • Php depends on Apache or nginx web servers for handling http request and response, on the other hand Node.js has its own http server library allowing us to have more control on the web server.
  • 48. Definition of Node • Node.js is built on Chrome’s JavaScript runtime V8 for developing fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.
  • 49. Advantages of node.js • Node.js uses java script and it is easy to learn. • Node.js runs on v8 Engine (a javascript interpreter: chrome uses it) which is very fast. • We can build highly scalable web applications using node.js • We can develop chat based applications, online games, API’s and many more. • Supports interaction with all major databases. • Node.js has 1000’s of third-party free modules.
  • 50. Companies depending on node.js • ebay, Microsoft, Yahoo!, StrongLoop, OmniTI, Storify, local response, nodejitsu, Linkedin, Iris Couch, backbeam, recruitics, Transloadit, Uber, Voxer,when-to- manage, Jaleoo, Cloud9 IDE, NODE the FIRM etc..
  • 51. Basic terminology • Asynchronous– Asynchronous means an event which is happening independently of other events. The main advantage of the asynchronous approach is scalability. • Npm – Stands for node package manager. This will help us install the latest modules directly from the servers instead of checking for the latest version, downloading and copying to the appropriate directory. It also has other uses.
  • 52. Express– Express is a highly recommended web application framework for node.js. It takes care of the low level services for us. Module– A module is a independent, reusable piece of code. you can download them and use them directly in your project. ex: express, http, https etc are some of the modules for node.js. REPL-Read-Eval-Print-Loop provides a way to interact with javascript it can be used for debugging, testing. To try repl go to terminal(cmd prompt) and type node and try ex: console.log(“learn nodejs”); Mongoose– Mongoose is a MongoDB object modeling tool for node.js. It becomes easy to interact with mongodb database server using Mongoose module. Db-mysql– It is a node.js module to interact with mysql database.
  • 53. Advantages of Node.js • Open Source • Node.js is open source, so it’s free to use and no need to pay for license. There are also many open source modules supported by Node.js. • JavaScript as Programming Language • It uses JavaScript as a programming language for both front-end and back-end which increase programmer productivity and code reusability.
  • 54. • Scalable • You can scale your Node.js application by using two ways – Horizontal Scaling and Vertical Scaling, which helps you to improve your application performance. – In Horizontal scaling you can add more nodes to your existing system. – In Vertical scaling you can add more resources to a single node. • Better Performance • It provides better performance, since Node.js I/O operations are non-blocking. Also, it uses V8 JavaScript engine to execute JavaScript code. V8 engine compiles the JS code directly into machine code which make it fast.
  • 55. • Caching Support • Node.js supports caching of modules. Hence, when a Node.js modules is requested first time, it is cached into the application memory. So next calls for loading the same module may not cause the module code to be executed again. • Lightweight and Extensible • Node.js is based on JavaScript which can be executed on client side as well as server side. Also, it supports exchange of data using JSON which is easily consumed by JavaScript. This makes it light weight as compared to other frameworks. • Node.js is open source. Hence you can extend it as per your need.
  • 56. • REST API Support • Using Node.js you can also develop RESTful services API easily. • Unit Testing • It supports unit testing out of box. You can use any JS unit testing frameworks like Jasmin to test your Node.js code. • Server Development • Node.js has some built-in API which help you to create different types of Server like HTTP Server, DNS Server, TCP Server etc. • Community Support • Node.js has a wide community of developers around the world. They are active in development of new modules or packages to support different types of applications development.
  • 57. Limitations of Node.js • It doesn’t support multi-threaded programming. • It doesn’t support very high computational intensive tasks. When it executes long running task, it will queue all the incoming requests to wait for execution, since it follows JavaScript event loop which is single threaded. • Node good for executing synchronous and CPU intensive tasks.
  • 58. MongoDB • MongoDB is a cross-platform, document oriented database that provides, high performance, high availability, and easy scalability. MongoDB works on concept of collection and document.
  • 59. Advantages of MongoDB over RDBMS • Schema less : MongoDB is document database in which one collection holds different different documents. Number of fields, content and size of the document can be differ from one document to another. • Structure of a single object is clear • No complex joins
  • 60. • Deep query-ability. MongoDB supports dynamic queries on documents using a document-based query language that's nearly as powerful as SQL • Tuning • Ease of scale-out: MongoDB is easy to scale • Conversion / mapping of application objects to database objects not needed • Uses internal memory for storing the (windowed) working set, enabling faster access of data
  • 61. Why should use MongoDB? • Document Oriented Storage : Data is stored in the form of JSON style documents • Index on any attribute • Replication & High Availability • Auto-Sharding • Rich Queries • Fast In-Place Updates • Professional Support By MongoDB
  • 62. Disadvantages of MDB • Data size in MongoDB is typically higher due to e.g. each document has field names stored it • less flexibity with querying (e.g. no JOINs) • no support for transactions - certain atomic operations are supported, at a single document level • at the moment Map/Reduce (e.g. to do aggregations/data analysis) is OK, but not blisteringly fast. So if that's required, something like Hadoop may need to be added into the mix • less up to date information available/fast evolving product
  • 63.
  • 64.
  • 65. • MEAN stack stands for • MongoDB as a Database • Express as the Web Framework • AngularJS as a frontend framework and • js as the server platform. • There are various Advantages of using Mean Stack: • You are free to use Mongo DB • Its cost effective • You will get benefited by using MongoDB • MEAN stack uses JSON • Node.js simplifies the server layer and is super- fast
  • 66. JAVASCRIPT Advantages • Javascript is executed on the client side This means that the code is executed on the user's processor instead of the web server thus saving bandwidth and strain on the web server. • Javascript is a relatively easy language The Javascript language is relatively easy to learn and comprises of syntax that is close to English. It uses the DOM model that provides plenty of prewritten functionality to the various objects on pages making it a breeze to develop a script to solve a custom purpose.
  • 67. • Javascript is relatively fast to the end user As the code is executed on the user's computer, results and processing is completed almost instantly depending on the task (tasks in javascript on web pages are usually simple so as to prevent being a memory hog) as it does not need to be processed in the site's web server and sent back to the user consuming local as well as server bandwidth. • Extended functionality to web pages Third party add-ons like Greasemonkey enable Javascript developers to write snippets of Javascript which can execute on desired web pages to extend its functionality. If you use a website and require a certain feature to be included, you can write it yourself and use an add-on like Greasemonkey to implement it on the web page.
  • 68. Disadvantages • Security Issues Javascript snippets, once appended onto web pages execute on client servers immediately and therefore can also be used to exploit the user's system. While a certain restriction is set by modern web standards on browsers, malicious code can still be executed complying with the restrictions set. • Javascript rendering varies Different layout engines may render Javascript differently resulting in inconsistency in terms of functionality and interface. While the latest versions of javascript and rendering have been geared towards a universal standard, certain variations still exist. Website Usability Consultants all over the world make a living on these differences, but it enrages thousands of developers on a daily basis.
  • 69. Express.js • Express is a fast, unopinionated minimalist web framework for Node.js" - official web site: Expressjs.com • Express.js is a web application framework for Node.js. It provides various features that make web application development fast and easy which otherwise takes more time using only Node.js.
  • 70. • Express.js is based on the Node.js middleware module called connect which in turn uses http module. So, any middleware which is based on connect will also work with Express.js.
  • 71. Advantages of Express • Makes Node.js web application development fast and easy. • Easy to configure and customize. • Allows you to define routes of your application based on HTTP methods and URLs. • Includes various middleware modules which you can use to perform additional tasks on request and response. • Easy to integrate with different template engines like Jade, Vash, EJS etc. • Allows you to define an error handling middleware. • Easy to serve static files and resources of your application. • Allows you to create REST API server. • Easy to connect with databases such as MongoDB, Redis, MySQL
  • 72. Express.js Web Application: • Express.js provides an easy way to create web server and render HTML pages for different HTTP requests by configuring routes for your application. • Configure Routes: Use app object to define different routes of your application. The app object includes get(), post(), put() and delete() methods to define routes for HTTP GET, POST, PUT and DELETE requests respectively.
  • 73. Body Parser: • To handle HTTP POST request in Express.js version 4 and above, you need to install middleware module called body-parser. The middleware was a part of Express.js earlier but now you have to install it separately. • This body-parser module parses the JSON, buffer, string and url encoded data submitted using HTTP POST request.
  • 74. Gulp Vs Grunt • The biggest advantage of using gulp is that it focuses on code whereas grunt relies on configuration. Personally, I have always been a fan of code over configuration. • Gulp is a streaming build system. It utilises Node.js streams and usually executes faster than grunt. • In reality, gulp plugins are just Node.js streaming modules that have nothing to do with gulp (except the name, of course). • Gulp plugins follow the unix principle : Try to do one thing well. • If you are a beginner, you will probably pick up gulp faster than grunt because of code over configuration.
  • 75. •Grunt focuses on configuration, while Gulp focuses on code •Grunt was built around a set of built-in, and commonly used tasks, while Gulp came around with the idea of enforcing nothing, but how community-developed micro- tasks should connect to each other.
  • 76. Similarities between Grunt and Gulp Grunt and Gulp can automate tedious, human-error-prone build processes such as: •code minification. •code-quality analysis •image optimization •vendor-prefixing •unit-testing
  • 77. Differences between Grunt and Gulp • The way you configure your tasks. Grunt is configuration-based. Gulp is stream-based. • The way they run your tasks. Grunt runs the processes you want to execute in a sequential manner. Gulp tries to run them with maximum concurrency, meaning it will try to execute processes in parallel if possible.