The Rise of MEAN for Application Development

Introduction

In this blog post I want to describe some of the benefits for web application development of the MEAN stack as compared to its older cousin, the LAMP stack.LAMP is comprised of four parts: LINUX as server vm, Apache for the web server, MySQL for the database, and PHP/Perl/Python as the language.MEAN is comprised of four parts as well: MongoDB, express.js, angular.js and node.js. This stack functions in a manner very similar to LAMP.

About The MEAN Stack

In the MEAN stack, node.js works as a server. However it has to run on Linux. This is based on the Google V8 engine. A lot of developers have started using node.js for the many benefits to performance and utility it provides for certain use cases. One of the major advantages is its non-blocking i/o which allows it to deliver millions of concurrent requests with ease. You will find a lot of great examples on the web that use node.js. One example is that when LinkedIn started using node.js for their mobile app they were able to reduce their server count by 90% from thirty to three and still deliver results that were 20% faster.Express.js is a node application framework. It is a popular node framework that makes it easy to create an MVC-like application on the server side. It provides the option to create routes and templates as well and supports multiple template languages including Jade.MongoDB has become indispensible to many software companies working with large data sets. It is a superb NoSQL database.Finally we have Angular.js. This is not a language as much as it is a framework to create SPAs in web application development. It plays a valuable part in the MEAN stack and can be considered an extension to HTML.

Benefits of MEAN

So why are app developers choosing to develop in MEAN rather than LAMP. Here are some of the reasons why MEAN shines:

  • Single language from top-to-bottomEverything in the MEAN stack is written in a single language: JavaScript. This makes development easy. Even MongoDB—the database layer—stores data in Binary JSON. This is similar to JSON and can be easily served by node.js. The same JSON can also be passed to Angular.js and manipulated for display data.
  • More efficient developersSince all the components are fundamentally JavaScript, a single developer is able to work both the frontend and the backend. Although different skills are undoubtebly invoked, and a high degree of competence is required, there is the benefit of added flexibility as the same developer can potentially update both sides. This is a great benefit to software development companies.
  • Flexibility in deploymentNode.js can be deployed on most modern platforms that are used to develop applications. Either Linux, Windows or Mac. Another good thing is that node.js NPM which means that is allows you to list your dependencies separately. Since the build only contains your compact code, the final deployment becomes much easier.
  • Enhanced performance in data retrievalSome studies show that node.js is far superior than other approaches for certain situations where there is not as much a requirement for CPU consuming tasks.
  • Effective API structureUsing this approach API structures are able to communicate between server and client. There will be no mix up of the server and client application code even though they are in the same language. The separation is really good in the MEAN stack, making it one of the reasons it is better than LAMP.

The bottom line is that the MEAN stack, when appropriate, allows you to have fewer servers and faster page loading. These add up to make a strategic difference to your business model.Some areas that the MEAN stack is being used to develop cloud applications are:

  • Realtime applications
  • Payment processing and e-commerce
  • Social media
  • Applications that have atomic CRUS operations on the backend

Some areas where the MEAN stack might not be the best choice are:

  • Applications which have high security requirements
  • Applications which have long running tasks or high CPU demands

Since JavaScript itself is becoming more and more popular these days, the MEAN stack with its many benefits has continued to rise in popularity. With companies like Google, Microsoft and others actively working to improve JavaScript, it is easy to imagine MEAN lasting for quite a while into the future. This makes it a good choice for those who are thinking of rewriting their application.Some of the more heated debates occurring in the programming community are questions like “will the rise of MEAN result in the death of LAMP?” Like all important questions, this one remains unanswered, especially given the shortcomings of MEAN mentioned earlier. Full featured client side applications may not suit every project and rewriting an entire application in another language for performance benefits is not going to make sense in every situation. What I will say is that the MEAN stack is experiencing great growth in the market in areas that it can provide better performance than others, and is entering the radar of even established enterprise companies for this reason.At Zymr we have begun to adopt the MEAN stack for suitable use cases. We are also actively developing an accelerator called ZUI that is going to be based on the BaaS model. We see this as a growth area that is going to be of increasing interest to the global technology community.Everything you need to know about outsourcing technology developmentAccess a special Introduction Package with everything you want to know about outsourcing your technology development. How should you evaluate a partner? What components of your solution that are suitable to be handed off to a partner? These answers and more below.

Conclusion

Let's Talk
Lets Talk

Our Latest Blogs

With Zymr you can