Skip to main content

MEAN Stack Basic

What is MEAN stack ?

  • Mean is an acronym made up of commonly used technologies for an all Javascript web stack.
  • The acronym “MEAN” stands for “MongoDB ,Express.js, AngularJS & Node.jsand represents a group of technologies which are known to open source well together.
  • The major advantage of MEAN stack with Node.js allows you to use Javascript with both side like front side and back end side respectively.
  • Most important factor is that stack contains technologies have their large community to help us.

Prerequisites

  • First assume that you have knowledge of programming and at least basic knowledge of JavaScript,AngularJS and EXpress.JS.
  • Before you start you need to install Node.js and MongoDB on your system.
  • Also you have the knowledge about basic application concept CRUD and REST.


Node JS Architecture

Some basic points and questions are in my mind when I have start to understand the Node Js architecture.

  • How Node JS works under-the-hood ?
  • What type of processing model it is following ?
  • How Node Js handle concurrent request ?
  • What is single threaded model & Event Loop ?


However without understanding Node JS Internals, we cannot design and develop Node JS Applications very well. So before starting developing Node JS Applications, first we will learn Node JS Platform internals.


  • Node JS Platform does not follow Request/Response Multi-Threaded Stateless Model. It follows Single Threaded with Event Loop Model.

  • Node JS Processing model mainly based on Javascript Event based model with Javascript callback mechanism.

  • The main heart of Node JS Processing model is “Event Loop”. If we understand this, then it is very easy to understand the Node JS Internals.




Single Threaded Event Loop Advantages

  1. Handling more and more concurrent client’s request is very easy.
  2. Even though our Node JS Application receives more and more Concurrent client requests, there is no need of creating more and more threads, because of Event loop.
  3. Node JS application uses less Threads so that it can utilize only less resources or memory
References

  1. How nodejs is handling the non-blocking IO even though it is single threaded?

  2. Node JS Architecture – Single Threaded Event Loop


Comments

Popular posts from this blog

What exactly means MVW design pattern ?

What is a MVW framework? The abbreviation stands for 'Model - View - Whatever'.  Well there are many different JavaScript frameworks available , all invented for the same purpose. They all try to separate the presentation logic from the business logic where JavaScript holds the model and logic, and html the presentation layer. Quick overview : You can change the model without changing the view and vice-versa Unit testing is easy These are the core benefits of using such a framework. By separating presentation and business logic changes to the code are easier to implement and take less time. Another benefit is that code can be reused from a controller thus saving more time. Angularjs makes the code also shorter in comparison to other frameworks, which improves code stability. Less code means minor potential for bugs. For several years +AngularJS was closer to MVC (or rather one of its client-side variants), but over time and thanks to many refactorings

File Upload & Download With ng-cordova File Transfer Plugin In Ionic Framework

Using the AngularJS extension set , ngCordova , with Ionic Framework and the Apache Cordova File Transfer plugin, you can easily upload files to a remote server and download files from a remote server. 1.Create the project ionic start Test blank cd Test ionic platform add android 2.Add Plugin org.apache.cordova.file-transfer https://github.com/apache/cordova-plugin-file-transfer This plugin allows you to upload and download files. This plugin defines global FileTransfer, FileUploadOptions Constructors. Although in the global scope, they are not available until after the deviceready event . Installation cordova plugin add cordova plugin add cordova-plugin-file-transfer     2.    org.apache.cordova.file             https://github.com/apache/cordova-plugin-file             This plugin implements a File API allowing read/write access to files residing on the    device.             Installation cordova plugin add cordova-pl

MEAN Stack Development with Vagrant

MEAN Stack Development with Vagrant Introduction Vagrant provides easy to configure, reproducible, and portable work environments built on top of industry-standard technology and controlled by a single consistent workflow to help maximize the productivity and flexibility of you and your team. To achieve its magic, Vagrant stands on the shoulders of giants. Machines are provisioned on top of VirtualBox , VMware, AWS, or any other provider . Then, industry-standard provisioning tools such as shell scripts, Chef, or Puppet, can be used to automatically install and configure software on the machine. Setup Virtualbox            You have to completely remove older VirtualBox versions before               installing VirtualBox-5.0 ! Display Allready Installed Packages sudo dpkg -l | grep virtualbox Uninstall VirtualBox sudo apt-get purge "^virtualbox-.*" Update the software repositories sudo apt-get update Clean up su