Mean Stack

2 2,054

It feels like just yesterday that everyone was raising eyebrows at MongoDB, Express.js, AngularJS and Node.js, and this was back when they were all doing great work in their own departments. Now the four of them have decided to team up and start conquering together and that’s not all, they managed to get a lot of help from their competitors at LAMP.

  • MEAN, which is short for
  • Mongo DB (database system)
  • Express (back-end web framework)
  • Angular.js (front-end framework)
  • Node.js (back-end runtime environment)

was a complete work of progress since the different elements in this power team came about at different times. Although they have done a lot together, everything ended up being bound by the glue that developers call js. What’s the big deal about MEAN anyway?

Inline Related Posts

You don’t really know how simple something is, until you have tried it out, likewise, it is the ease at which you can develop using this combination. The MEAN stack has a common structure that makes it an ideal stack to work with. MongoDB provides a more limber and accommodating layer for storing information. Node.js offers a better system for getting your server up and running, along with Express. js which adds some consistency with the general building of websites. If you are checking out the system through the client side, AngularJS gives you a neat way of adding interactive functions. js is a dynamic and versatile programming language that can be used for both the client side and server side of the application development. If you add all the components together, you receive a neat and coherent mechanism for moving information from the user to the server and vice versa.

Below we have mentioned six reasons why MEAN is the stack you should go with when you are working on your next project.

JS

  1. The whole nine yards of js

    The main reason for MEAN being one of the better contenders is that it uses a common language for both sides, the client side and server side. Everything being written in the same language makes the web development process a lot neater. You can thank the Node.js platform for bringing js implementation to the server side. Angular.js uses js for the front end, and the two of them makes it easier to reuse the same code for the Frontend and the Backend as well.

  2. Why is Mongo DB important?

    Mongo DB is one of the modern databases that comes equipped with automatic sharding and full cluster support from the moment you begin working with it. It is the ideal choice of the database when working with loads of data and large tables. If more fields are needed in MongoDB, they are a lot easier to handle since the entire table doesn’t need to be updated. Being a NoSQL and document model database, it is workable and malleable and can be used on different variations of applications. Since apps can be developed and tested quite easily, there are almost no reasons why MongoDB should not be the ideal candidate.

  3. What about Angular.js?

    Angular.js is the frontend js development framework usually used when working on one-page applications. If in need of adding interactive functions to the application along with AJAX driven components on the client side, while maintaining a clean working environment, Angular.js is your framework. Since Node.js is giving you a solution to your server side issues, js can be used on both the client and the server side. Using the same framework in both the places makes working on applications using the MEAN stack a whole lot of fun.

  4. Does Node.js simplify the server layer?

    Node.js is the js runtime environment which does a lot more than just being a web server. If you are using the MEAN stack for your application it would come with a server and this accounts for some smooth and uncomplicated deployment. Further, Node.js also works on LINUX, Windows and Mac OS X which makes the operating system quite independent.
    Working on a single thread, Node.js works through incoming HTTP requests. It gets help from non-blocking I/O calls to process multiple new incoming requests with ease. Unlike Apache or similar web servers, Node.js is a lot faster and can be scaled up easily while working on thousands of simultaneous connections.
    Furthermore, Node.js uses web sockets to allow data to be sent to the client without the client needing to request it first. This is one of the factors that makes Node.js the best choice when it comes to developing real-time web applications like chatting apps. Better still is the fact that it is a lot of support so users have nothing to worry about just yet.
    The statistics show that Node.js provides better performance among a ton of other qualities. The event driven architecture used by Node.js is a lot faster than the alternatives. In this day and age when people are measuring time in milliseconds, saving a few seconds in different sections of a mobile app can take you a long way. Node.js doesn’t just have this ability but also provides a Turin complete mechanism for reprogramming mobile apps.

  5. Why is there nothing other than JSON for miles?

    Almost everyone is fluent when it comes to JSON nowadays, AngularJS and MongoDB speak JSON, as do Node.js and Express.js. Data is very organized and works well without any formatting or rewriting. The general MEAN stack makes use of the JSON for data throughout the application which saves a lot of time when it comes to reformatting across the different layers.

  6. Is MEAN open source, cost effective and generally free?

    All technologies in MEAN are free and open sourced, so there is a lot of content out there regarding them. MEAN stack does provide a more modern viewpoint to web development. It also uses relatively recent SPAs (single-page applications), which would not need users to keep refreshing the pages that they are checking out. It should be mentioned that the LAMP stack technology was not written to work in tandem with each other.

Which stack should you choose when developing your project?

If you actually handle some thorough research about the contenders, there are multiple pros and cons for working with any stack over another. You will also find that newer stacks are gaining importance and popularity over the older ones, but overall, that would depend on the type of project. If you are looking ahead and feel you will be in the position to vertically scale your website, or the team handling your development is very good and well versed with what they do, these would be situations that would be able to guide your stack. Let’s go through the different functions of what a stack does, and the components of one that might work well for your project as compared to another. There might be a few other aspects to consider when making this informed decision.

QA

What to consider when choosing a software stack?

The most important thing that you should remember is to look to the future since the software stack is not a short term decision you are making. We have added a detailed list of questions that you should ask yourself before getting this done.

Do you have an MVP and how large do you see it getting?

An MVP, minimum viable product, is the basic yet most important set of deliverables that you would need to get in place to complete working on your site. You have to make sure that you are working with the highest returns on your investment against the lowest risk. No matter what rules and restrictions you have for your site or product, going through your MVP is a good place to start when you are coming up with your stack.

How high do you intend to scale?

If you look ahead, you would see how high your project is going to get, and you have to take account of this. A good, solid, sturdy stack from the beginning usually guarantee a sturdy foundation to be built upon. If you see some major or minor growth over the horizon, pick a stack that can account for this without falling apart.

Do you feel speed will play a crucial role?

If you are looking for speed, Node.js should be seen as one of the major contenders and can work well when scaling up as well. That’s not all, being written in js, it is fast and global, which is one of the reasons why LinkedIn uses it, after making the jump from the Ruby platform. What about finding the right database? The information that you intend to collect with this project and the way that you gather this information would be the deciding factors when it comes to picking the right database to be added to your stack.

How big a deal should you make about the pricing?

When it comes to pricing, it is always something you cannot just put your finger on. It would depend on the timeline, the quality of work that you are looking for and so many more factors. You should make sure you have considered, the licenses and software that you might use, the cost of the developers, the timelines, the cost of getting developers to learn new languages, and the maintenance costs are all pieces of the same puzzle.

LAMP

One of the first stacks that started making waves among developers is the LAMP stack. If you go through the details of this stack it comprises all free and open source software components and they seem to gel well with each other if you are looking for dynamic websites and similar applications. This stack comprises of Linux operating system, Apache web server, MySQL database, PHP application software. If required, PHP can be switched with Python or Perl.

QA

What are the upsides of using LAMP?

The stack is flexible and easily customizable. It is very easy to work with and using the languages and software that comprises it, it is very easy to develop as well. Security is a higher priority. The most important fact though is being open sourced, there is a lot of support and multiple communities working with it. Lastly, since the database uses SQL, it can go organize a whole lot of structured data.

What are the variations of using the LAMP structure?

WAMP (Windows/Apache/MySQL/PHP) This stack operates on a windows platform. An alternative from the

WAMP is the WIMP which works exactly the same but has an IIS server instead.

LAPP (Linux/Apache/PostgreSQL/PHP) A slight database variation using PostgreSQL which has been optimized for projects that are much larger, on the enterprise level MAMP (Mac OS X/Apache/MySQL/PHP):

Using a minor variation of the operating system used on a Mac OS X, this stack is supported on Windows as well as the Apple Mac.

XAMPP (Linux, Mac OS X, Windows/Apache/ MySQL/PHP, PERL):

A stack that comes with its own cross-platform FTP server, capable of running on Linux, windows, and Mac operating system.

MEAN

MEAN, the more recent stack has come about as a challenge to the rather competitive LAMP stack that was widely used in the past. Like its predecessor, this stack is fully powered by js as well, making it the best upgrade from the alternative. It is also a good choice for most of the companies out there who are already loaded with js developers, allowing companies to save money and time working on client side code. The MEAN stack is made up of a MongoDB database, JSON powered NoSQL database that provides a lot more flexibility than the previous relational SQL databases, AngularJS frontend framework, Express.js, a web framework for Node.js, Base platform of the Node.js runtime.

QA

What are the upsides of using MEAN?

MEAN works well with the MVC pattern, especially when using their NoSQL’s native JSON to transfer their data. They manage to get this done thanks to Node.js and it’s js module library which is open sourced. Using the flexibility of Angular.JS it creates beautiful mobile friendly applications and these can be added to the JS testing framework with almost no effort. If businesses are looking to scale this is the stack that they should stick with, especially since it has a uniformity of language across the application.

Since it makes use of js while working on both the frontend and the backend, developers who spend their time on the client side of the application can understand the code used at the server side with almost no effort. Further, if they make use of a NoSQL database they would make upon time spent handling SQL, since they would have more flexibility with the way that the information is structured, finally increasing the productivity of the team over the long haul.

What are the variations of using MEAN?

If you don’t want to go with the MEAN framework, there is always the MEEN framework which is basically the same MEAN stack with the exception of AngularJS, which has been substituted with Ember.js.

The upsides of being MEAN

There are a bunch of reasons why MEAN is the better bet when it comes to picking the right stack for your application. It should be mentioned though that a large part of the equation would depend on the type of project you are working on. Here are a few points why it works well.

  • Completely open source and uses js (+ JSON and HTML) along with Web standards
  • Has a large group of people using it, so there is a lot of support
  • Using the same language all through this stack makes it consistent and well structured
  • js (web language)
  • JSON (web data format)
  • There’s no communication with the database
  • Standard models from the front-end to the back-end and vice versa
  • Uses js which is a much better framework than jQuery
  • Provides complete front end development right from the beginning

The downsides of using LAMP in this day and age

There is a lot to say about the pros and the cons of using LAMP and why it was a better idea before MEAN came around, but here we have mentioned why it is no longer the smartest idea in the market

  • There are better and faster alternatives to a web server than Apache
  • Writing readable, reusable and quick PHP code can be quite challenging
  • Front-end works well with other languages over the backend
  • There are just too many conversions from one from XML to PHP to HTML and so on
  • It does not have a separate server side and client side development mechanism

Now to take the two contenders and compare them to each other to find out once and for all which one works better.

We all know that web stacks like most technology is not constant and has developed and evolved over decades, thanks to new backend languages and improvements in technology. There are a lot of different components when comparing a web stack from operating system to server software, to the database and finally to the backend language. Let’s break down two of the most popular stacks relying on two completely different components and find out which one is ideal to

  1. The MEAN stack has its hands on Angular which is a relatively popular frontend framework. There is no specific framework requirement in a LAMP stack but developers are allowed to use their own depending on the app being built.
  2. When it comes to the operating system, the LAMP stack uses a version of LINUX, which has always been the best choice for a server environment, no matter which stack is being used. MEAN works using the same OS.
  3. The server operating system is the OS of the computer but has nothing to do with the web server operating system. For the web server operating system, developers would have to use Apache or Nginx.
  4. Apache is one of the most stable choices out there making it the frontrunner in the LAMP stack as well. MEAN gets their fix from the Node.js server which comes along with the other Node alternatives that they make use of. Being relatively new in the market although it has a lot of users out there, it still hasn’t made it as big as Apache yet.
  5. A Node server would need a js backend (without extensions). Apache works with most backend languages, along with a bunch of free extensions if ever needed. Unfortunately, Apache cannot support Node as yet. We can be hopeful and look to the future.
  6. When picking the right stack, the largest difference that you would find would be in the database management. LAMP makes use of MySQL for relational data storage, but MEAN works a little differently using MongoDB which is a non-relational database. Non-relational databases are a lot faster and are a lot better equipped for scaling when the site or application traffic increases.
  7. PHP is not only limited to MySQL, it can make use of MongoDB along with the other runners out there, like PostgresSQL or SQLite. Most of the PHP developers have worked with and know MySQL which is why it is so popular and the front runner in its own right.
  8. Finally, the programming languages used in the backend would make the biggest difference to finalize the stack to be working with. LAMP mainly works on PHP which includes WordPress or the Laravel framework. MEAN on the other hand works on Express / NodeJS for the backend with Angular for the front.
  9. As mentioned earlier, MEAN stack is a lot faster and easier to scale up when needed, but it takes a good amount of time and server background know-how to understand the system. Since LAMP has been around for a lot longer than the competition, it has been pushed and tested to breaking point. They have a most secure infrastructure and the best support out there.
  10. Overall, MEAN is a full stack js framework and since it is fairly new there is a steep learning curve when it comes to getting everything up and running. Although being new and upcoming, it is the go-to choice for most new startups willing to take risks and work harder when it comes to their app development. LAMP is more of an old school, ‘know what you are doing’ kind of stack. LAMP uses js on the front end and PHP at the back. It is made for people who are looking to have a functional website up and running, without too many hassles along the way
You might also like
Comments
Loading...