MongoDB is the database component behind the stack. It utilises a NoSQL philosophy instead storing data in a document orientated manner by utilising JSON like documents with dynamic schemas. The system is utilised by large technology companies such as Craigslist, eBay and Foursquare as backend software and is extremely scalable. This method of implementation also allows the database system to the flexible and extremely powerful supporting features such as dynamic queries, secondary indexes, dynamic updates and aggregation. Therefore, MongoDB is an excellent choice for database management due to its power, flexibility and ease of use all integrated within the MEAN system.
Express.js is a lightweight framework providing support for web applications in the MEAN stack. It provides numerous robust features for creating both single and multi-paged web applications and is inspired by the popular Ruby framework, Sinatra. This means that the core features are relatively minimal with extensive ability for tweaking through plugins. By providing an extensive base for web application development, Express.js will save you time and money throughout the development process combined with its ease of deployment and use.
Getting started with MEAN is very simple, especially if your web server or development environment utilises a Linux environment. Just run the following commands from the terminal like you would install any other software.
- $ sudo npm install -g mean-cli
- $ mean init yourNewApp
Voila, you have downloaded, installed and created a new project in MEAN entitled “yourNewApp”. You can now utilise this new environment and all of the tools and functionality that come with it in your next major development or just play around.
Another option to get MEAN is to clone the Git repository if you are that way inclined. Simply use the following command.
- $ git clone https://github.com/linnovate/mean.git
After installation navigate to the folder in which you installed MEAN and issue the grunt command. This command will start a server listening on port 3000. Navigating in the browser to http://localhost:3000 will direct you to your new MEAN stack server and you should be presented with simple page if all goes well.
You will now be able to use MEAN once it has successfully installed. All the components are installed automatically if following one of the two methods above and the environment is completely set up for development. MEAN is now used by thousands of developers and its popularity is growing exponentially. It provides a unique, comprehensive package for designers and developers to produce quality web applications that are cross-platform, scalable and very complex while also simple and small apps to be produced quickly and easily if need be. It is this diversity that makes the architecture so popular and it will only continue to grow. So if you aren’t using MEAN you should examine everything this package has to offer and see if it matches your needs as it may make your development experience more efficient and developer friendly than what you are currently using.