Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
MEAN StackSuren Rodrigo
Associate Technical Architect
The partner of choice for ISV's
What do we need
> NodeJS
> Mongo DB
> Git
> Heroku Toolbelt for windows
(https://toolbelt.heroku.com/windows)
The partner of choice for ISV's
What are technology ā€œStacksā€
> Collection of programing languages, tools, frameworks or
technologies that complement each other organized in a
way to enable developers to do their job.
> Ex: LAMP = Linux Apache MySQL PHP
The partner of choice for ISV's
Quiz 1
> What is the output of the following code
var isEqual = function(x,y)
{
return x==y;
};
console.log(isEqual("1",1));
ANSWER: true
The partner of choice for ISV's
Quiz 2
> What is the output of the following code
var addValue = function(x,y)
{
return
x+y;
};
console.log(addValue (1,1));
ANSWER: undefined
The partner of choice for ISV's
> What Is MEAN Stack?
> Why MEAN Stack?
> Demo Walkthrough (How easy it is to do MEAN things)
> What do I need to know to get started?
> Performance of MEAN Stack
> Productivity Tools
> Whatā€™s Bad in MEAN Stack
The partner of choice for ISV's
What is MEAN Stack?
"MEAN is a full stack JavaScript platform for modern web
applicationsā€œ - Mean.io
DatabaseBackend (Server)Front End (Client)
The partner of choice for ISV's
What is MEAN Stack?
> JavaScript is used in all tiers.
> JSON is the primary format to exchange data.
DatabaseBackend (Server)Front End (Client)
JavaScriptJavaScript JavaScriptJavaScript
JSONJSON JSONJSON
JSON (BSON)JSON (BSON)
The partner of choice for ISV's
Web Landscape has changed dramatically
> Customers want fast web sites/fast response times
> No page reloads (thatā€™s soā€¦ 2010)
> Enterprises want to go virtual
> One box + Several virtual images => Shared Hardware
> System with minimal memory footprint/overhead needed
> As many concurrent requests as possible
> Only load resources when needed (conditional loading)
> Most of the data must come from a slim REST-API
> Mobile/Responsive UIs
> Automated build for backend AND frontend
> Including check for coding conventions, testing,ā€¦
> Integration in companyā€™s continues integration platform (For JS see Grunt or Gulp)
We Need A Technology Stack that can enable these demands.
The partner of choice for ISV's
Why MEAN Stack?
ā€¢ 100% free
ā€¢ 100% Open Source
ā€¢ 100% Java Script (+JSON and HTML)
ā€¢ 100% Web Standards
ā€¢ Huge community
ā€¢ Consistent Models from the backend to the
frontend and back
ā€¢ Use a uniform language throughout your
stack
ā€¢ JavaScript (the language of the web)
ā€¢ JSON (the data format of the web)
ā€¢ Use JavaScript with a great framework
(compared to jQuery)
ā€¢ Allows to start with the complete frontend
development first
ā€¢ Very low memory footprint/overhead
The partner of choice for ISV's
Mongo DB (M)
> NoSQL DBMS
> SQL is not used to manipulate data, i.e. DML is not SQL
> Data manipulation is done via JavaScript
> Document Oriented
> Data is not organized into tables, rows and columns
> Data is organized into "collections" and "documents"
> "collection" is a rough map to a table and a "document" is a
rough map to a row.
The partner of choice for ISV's
Mongo DB (M)
> Documents are stored as BSON (Binary JSON)
> documents" are structured as BSON, BSON is nothing but
binary JSON
> Support Horizontal scaling i.e. splitting data between
multiple databases (Sharding)
> Mongo DB has Auto-Sharding
The partner of choice for ISV's
Mongo DB (M): Relational Vs NoSQL
The partner of choice for ISV's
Time to Mongoā€¦
The partner of choice for ISV's
Node JS (N)
> Platform built on Chrome's JavaScript runtime (V8)
> So, Very Fast ļŠ
> You can program the server side using JavaScript!!!
> Asynchronous, Event Driven and None Blocking
> Node never wait, Events are handled using callbacks
> Single Threaded
> Excellent support for concurrent requests because of the
none blocking nature
The partner of choice for ISV's
Time for Nodeā€¦
The partner of choice for ISV's
Angular (A)
> Powerful JavaScript based development framework to
create RICH Internet Application(RIA).
> Clean client side MVC pattern implementation. Support
other patterns such as MVVM too.
> Cross-browser compliant. AngularJS automatically handles
JavaScript code suitable for each browser
> Open source, completely free
The partner of choice for ISV's
Angular and JQuery
jQuery, you apply JavaScript to manipulate the DOM, but
in Angular you declare what the DOM should look like
ahead of time
Angular and JQuery Complement Each Other. So, You can
Use Both in your Applications.
The partner of choice for ISV's
Angular (A)
> Angular Applications are defined
as modules
> Modules can use other modules
The partner of choice for ISV's
Introduction to Cloud Computing : With AWS
ā€œBlueā€ color slides are not mine.
Credits:
http://www.slideshare.net/AmazonWebServices/introduction-
to-amazon-web-services-7708257
The partner of choice for ISV's
The partner of choice for ISV's
The partner of choice for ISV's
The partner of choice for ISV's
The partner of choice for ISV's
The partner of choice for ISV's
The partner of choice for ISV's
The partner of choice for ISV's
Lunch?
The partner of choice for ISV's
Deploying our App to Cloud : Heroku
> Platform-as-a-Service (PaaS)
> Platform as a service (PaaS) is a category of cloud
computing services that provides a platform allowing
customers to develop, run and manage Web applications
without the complexity of building and maintaining the
infrastructure typically associated with developing and
launching an app.
> Quick Setup and Deployment
The partner of choice for ISV's
Deploying App to cloud: Heroku
> Go to http://www.heroku.com
> Register and Login
> Navigate to ā€œmeanapp_final_herokuā€ folder
> Create a git repo by entering ā€œgit initā€
> Add and commit everything to repo
> git add ā€“A
> git commit ā€“m ā€œfirst commitā€
The partner of choice for ISV's
Deploying App to cloud: Heroku
> Type ā€œheroku loginā€ and provide the credentials when asked
> Issue ā€œheroku createā€ to create the heroku application
> Issue ā€œgit remote ā€“vā€ to view the remote repositories, confirm
heroku remote is listed.
> Issue ā€œgit push heroku masterā€ to commit everything and
deploy the app
> Issue ā€œheroku ps:scale web=1ā€ to ensure at least 1 app
instance is running
> Issue ā€œheroku openā€ to open the deployed app
The partner of choice for ISV's
Where do I begin? How to get started?
Learn Basics
on HTTP
and Web
Learn MVC
pattern in
Web
application
development
Learn about
JavaScript
(Most
Important
Step)
Learn
Angular JS
Learn Node
JS with
Express and
other
important
modules.
Learn
Mongo DB
Learn about
productivity
tools
The partner of choice for ISV's
MEAN Stack Performance
> Very Subjective matter
> MEAN Stack performance mainly depends on Node JS
performance since itā€™s where all the heavy processing is
done.
> Node JS is written in C++/C and have proven to be one of
the fastest.
> Some research show Node JS to be 20% faster than JAVA
EE.
The partner of choice for ISV's
Some of the Productivity Tools
> NPM (Well this is hardly optional) ā€“ Node Package
Manager
> Grunt/Gulp ā€“ Build Tools for JS
> Yeoman ā€“ Project Scaffolding Tool
> Bower ā€“ Client side package management
If you are thinking about any serious MEAN
development (or JS development for that
matter) you need to look into these.
The partner of choice for ISV's
Whatā€™s Bad in MEAN Stack
> For those who donā€™t like JavaScript ā€“ itā€™s going to be killing you!
> There are still no general JS coding guidelines
> SPAs need a new way of thinking(!)
> The browser is your platform!
> MongoDB is not as robust as an SQL server
> This security is what they sacrifice to gain speed
> You need to take care of rollbacks yourself (2-Phase-Commit)
> ACID => Possible ā€“ but part of the driver/client application
> Itā€™s hard to find specialists that are no hipsters
> and have the big picture/architecture for enterprise solutions in mind
> Once youā€™ve created the first site with this technology, itā€™s hard to go
back to the old approach
the partner of choice for ISV's

More Related Content

MEAN Stack

  • 1. MEAN StackSuren Rodrigo Associate Technical Architect
  • 2. The partner of choice for ISV's What do we need > NodeJS > Mongo DB > Git > Heroku Toolbelt for windows (https://toolbelt.heroku.com/windows)
  • 3. The partner of choice for ISV's What are technology ā€œStacksā€ > Collection of programing languages, tools, frameworks or technologies that complement each other organized in a way to enable developers to do their job. > Ex: LAMP = Linux Apache MySQL PHP
  • 4. The partner of choice for ISV's Quiz 1 > What is the output of the following code var isEqual = function(x,y) { return x==y; }; console.log(isEqual("1",1)); ANSWER: true
  • 5. The partner of choice for ISV's Quiz 2 > What is the output of the following code var addValue = function(x,y) { return x+y; }; console.log(addValue (1,1)); ANSWER: undefined
  • 6. The partner of choice for ISV's > What Is MEAN Stack? > Why MEAN Stack? > Demo Walkthrough (How easy it is to do MEAN things) > What do I need to know to get started? > Performance of MEAN Stack > Productivity Tools > Whatā€™s Bad in MEAN Stack
  • 7. The partner of choice for ISV's What is MEAN Stack? "MEAN is a full stack JavaScript platform for modern web applicationsā€œ - Mean.io DatabaseBackend (Server)Front End (Client)
  • 8. The partner of choice for ISV's What is MEAN Stack? > JavaScript is used in all tiers. > JSON is the primary format to exchange data. DatabaseBackend (Server)Front End (Client) JavaScriptJavaScript JavaScriptJavaScript JSONJSON JSONJSON JSON (BSON)JSON (BSON)
  • 9. The partner of choice for ISV's Web Landscape has changed dramatically > Customers want fast web sites/fast response times > No page reloads (thatā€™s soā€¦ 2010) > Enterprises want to go virtual > One box + Several virtual images => Shared Hardware > System with minimal memory footprint/overhead needed > As many concurrent requests as possible > Only load resources when needed (conditional loading) > Most of the data must come from a slim REST-API > Mobile/Responsive UIs > Automated build for backend AND frontend > Including check for coding conventions, testing,ā€¦ > Integration in companyā€™s continues integration platform (For JS see Grunt or Gulp) We Need A Technology Stack that can enable these demands.
  • 10. The partner of choice for ISV's Why MEAN Stack? ā€¢ 100% free ā€¢ 100% Open Source ā€¢ 100% Java Script (+JSON and HTML) ā€¢ 100% Web Standards ā€¢ Huge community ā€¢ Consistent Models from the backend to the frontend and back ā€¢ Use a uniform language throughout your stack ā€¢ JavaScript (the language of the web) ā€¢ JSON (the data format of the web) ā€¢ Use JavaScript with a great framework (compared to jQuery) ā€¢ Allows to start with the complete frontend development first ā€¢ Very low memory footprint/overhead
  • 11. The partner of choice for ISV's Mongo DB (M) > NoSQL DBMS > SQL is not used to manipulate data, i.e. DML is not SQL > Data manipulation is done via JavaScript > Document Oriented > Data is not organized into tables, rows and columns > Data is organized into "collections" and "documents" > "collection" is a rough map to a table and a "document" is a rough map to a row.
  • 12. The partner of choice for ISV's Mongo DB (M) > Documents are stored as BSON (Binary JSON) > documents" are structured as BSON, BSON is nothing but binary JSON > Support Horizontal scaling i.e. splitting data between multiple databases (Sharding) > Mongo DB has Auto-Sharding
  • 13. The partner of choice for ISV's Mongo DB (M): Relational Vs NoSQL
  • 14. The partner of choice for ISV's Time to Mongoā€¦
  • 15. The partner of choice for ISV's Node JS (N) > Platform built on Chrome's JavaScript runtime (V8) > So, Very Fast ļŠ > You can program the server side using JavaScript!!! > Asynchronous, Event Driven and None Blocking > Node never wait, Events are handled using callbacks > Single Threaded > Excellent support for concurrent requests because of the none blocking nature
  • 16. The partner of choice for ISV's Time for Nodeā€¦
  • 17. The partner of choice for ISV's Angular (A) > Powerful JavaScript based development framework to create RICH Internet Application(RIA). > Clean client side MVC pattern implementation. Support other patterns such as MVVM too. > Cross-browser compliant. AngularJS automatically handles JavaScript code suitable for each browser > Open source, completely free
  • 18. The partner of choice for ISV's Angular and JQuery jQuery, you apply JavaScript to manipulate the DOM, but in Angular you declare what the DOM should look like ahead of time Angular and JQuery Complement Each Other. So, You can Use Both in your Applications.
  • 19. The partner of choice for ISV's Angular (A) > Angular Applications are defined as modules > Modules can use other modules
  • 20. The partner of choice for ISV's Introduction to Cloud Computing : With AWS ā€œBlueā€ color slides are not mine. Credits: http://www.slideshare.net/AmazonWebServices/introduction- to-amazon-web-services-7708257
  • 21. The partner of choice for ISV's
  • 22. The partner of choice for ISV's
  • 23. The partner of choice for ISV's
  • 24. The partner of choice for ISV's
  • 25. The partner of choice for ISV's
  • 26. The partner of choice for ISV's
  • 27. The partner of choice for ISV's
  • 28. The partner of choice for ISV's Lunch?
  • 29. The partner of choice for ISV's Deploying our App to Cloud : Heroku > Platform-as-a-Service (PaaS) > Platform as a service (PaaS) is a category of cloud computing services that provides a platform allowing customers to develop, run and manage Web applications without the complexity of building and maintaining the infrastructure typically associated with developing and launching an app. > Quick Setup and Deployment
  • 30. The partner of choice for ISV's Deploying App to cloud: Heroku > Go to http://www.heroku.com > Register and Login > Navigate to ā€œmeanapp_final_herokuā€ folder > Create a git repo by entering ā€œgit initā€ > Add and commit everything to repo > git add ā€“A > git commit ā€“m ā€œfirst commitā€
  • 31. The partner of choice for ISV's Deploying App to cloud: Heroku > Type ā€œheroku loginā€ and provide the credentials when asked > Issue ā€œheroku createā€ to create the heroku application > Issue ā€œgit remote ā€“vā€ to view the remote repositories, confirm heroku remote is listed. > Issue ā€œgit push heroku masterā€ to commit everything and deploy the app > Issue ā€œheroku ps:scale web=1ā€ to ensure at least 1 app instance is running > Issue ā€œheroku openā€ to open the deployed app
  • 32. The partner of choice for ISV's Where do I begin? How to get started? Learn Basics on HTTP and Web Learn MVC pattern in Web application development Learn about JavaScript (Most Important Step) Learn Angular JS Learn Node JS with Express and other important modules. Learn Mongo DB Learn about productivity tools
  • 33. The partner of choice for ISV's MEAN Stack Performance > Very Subjective matter > MEAN Stack performance mainly depends on Node JS performance since itā€™s where all the heavy processing is done. > Node JS is written in C++/C and have proven to be one of the fastest. > Some research show Node JS to be 20% faster than JAVA EE.
  • 34. The partner of choice for ISV's Some of the Productivity Tools > NPM (Well this is hardly optional) ā€“ Node Package Manager > Grunt/Gulp ā€“ Build Tools for JS > Yeoman ā€“ Project Scaffolding Tool > Bower ā€“ Client side package management If you are thinking about any serious MEAN development (or JS development for that matter) you need to look into these.
  • 35. The partner of choice for ISV's Whatā€™s Bad in MEAN Stack > For those who donā€™t like JavaScript ā€“ itā€™s going to be killing you! > There are still no general JS coding guidelines > SPAs need a new way of thinking(!) > The browser is your platform! > MongoDB is not as robust as an SQL server > This security is what they sacrifice to gain speed > You need to take care of rollbacks yourself (2-Phase-Commit) > ACID => Possible ā€“ but part of the driver/client application > Itā€™s hard to find specialists that are no hipsters > and have the big picture/architecture for enterprise solutions in mind > Once youā€™ve created the first site with this technology, itā€™s hard to go back to the old approach
  • 36. the partner of choice for ISV's

Editor's Notes

  1. LUNCH BREAK AFTER THIS.