When Stratostar approached E-gineering to provide their next-generation solution for tracking high-altitude balloons, near real-time graphing, and Twitter integration, we decided to get MEAN… MEAN.JS that is. (Okay, I admit that was bad, but it got your attention, right?)
What is MEAN.JS?
MEAN.JS is one of the most popular open-source projects which provides a full-stack JavaScript solution. MEAN.JS is composed of the following major components:
Advantages of MEAN.JS
One Language
In a traditional web application using Java for example, you will need to combine Java for your business logic, SQL for your database queries, and JavaScript for your front-end manipulation. In some larger organizations, this requires different teams, sometimes working in silos, to build the same application.
Using the MEAN stack, you only need to use one language – JavaScript. Need a query to see how many users are in the system? Use JavaScript. Need to manage the security on your REST API? Use JavaScript. Need to manipulate the DOM? Yep, still JavaScript.
This is a key factor in the next advantage…
Faster Development Cycles
Using one language for the entire stack can speed development time. In addition, MongoDB’s “schemaless”-ness allows for changes to be made to your database without having to write scripts to massage the data in the event of a larger change.
Performance
MEAN.JS is a high-performance stack. Each of the four main components that make up the stack have some pretty impressive performance measures, but the most notable of these is Node.js.
The high performance of Node.js has been written about quite a bit. Joyent’s GitHub Wiki shows a growing list of Node.js adopters that includes some heavy hitters. Companies like Wal-Mart, PayPal, and Netflix use Node.js as well.
One of the main reasons for this is because Node.js is fast – very fast. In 2013, a PayPal blog post revealed some testing that they had conducted using Node.js and a Java application. The Node.js app “Doubled the requests per second vs. the Java application” and delivered a “35% decrease in the average response time for the same page.”
[Slightly more techy note: Node.js is non-blocking. Utilizing an event-loop and callbacks, it doesn’t have to wait for I/O operations, like database reads, to complete before moving on to other tasks making it fast and efficient. I can write more on this later, if there is interest.]
Community
Finally, there’s a very large developer community using and supporting MEAN.JS. The platform is constantly improving and changing. More and more packages are being added to the platform which make the job of the developer easier.
Should Our Project Use MEAN?
While MEAN.JS offers some really obvious advantages, some of these can be viewed as a double-edged sword. For example, using JavaScript for the full stack is great, but knowing how to manipulate the view in the browser using JavaScript doesn’t necessarily mean that you can write clean and efficient code on the server side.
Likewise, having a large community constantly creating and updating modules that make up the MEAN stack can be a great thing if you’re in the open-source world, but this seemingly constant change is difficult to standardize and stabilize in an Enterprise environment.
We recommended MEAN.JS to Stratostar only after analyzing their requirements and making a determination that this would be a good solution for their needs. If you have a project and are considering a full-stack JavaScript solution, contact us and let us work with you to determine if MEAN.JS is a viable solution for your particular needs.