Upgrade : Get Unstuck from the LAMP Stack to the MEAN Stack

Posted On // 13 comments

Upgrade : Get Unstuck from the LAMP Stack to the MEAN Stack

Understanding the role each technology plays in the stack is crucial when moving from LAMP to MEAN for web development. Whether you’re looking for consolidation of technologies or to leverage in-house JavaScript expertise, the MEAN stack can offer a lot to a flexible web development organization. The team here at BACK& wanted to try and help sort out the pros and cons of each stack. So below I’ll detail the MEAN stack, how it compares to the LAMP stack, and offer a few tips for optimizing your choices.

The Operating System

The first choice in any tech stack is the operating system. While the LAMP stack locked the operating system to a variant of Linux, the MEAN stack has no such restrictions. Linux is still a good choice for an app built on MEAN, but it is by no means the only option; any operating system that can run Node.js is a viable alternative.

The Web Server

In the MEAN stack, the web server – provided by Apache in LAMP – is provided by Node.js. This can improve the performance of the application, as Node.js is entirely non-blocking and event-based, allowing for true concurrency among requests. Node.js is lightweight and relatively new, however, which ultimately means that your organization will be largely on its own when it comes to non-standard extensions. While there is active plug-in development for Node.js, the technology is not as matured as Apache. This usually means that you need to write your own plug-ins to cover the areas where Node.js is missing functionality. Additionally, choosing Node.js locks all code on your web server into JavaScript. For new development this isn’t a major concern, but converting a back-end of significant complexity can be time-consuming.

The Data Store

The MEAN stack replaces LAMP’s use of MySQL (or another relational database) with MongoDB (or an equivalent non-relational database). For many web apps, this will be the most significant change. Translating the data in an existing SQL database requires a lot of forethought to eliminate redundant/unnecessary object attributes, and will likely require a custom software suite to accomplish. However, once this is done the database will be much faster for data retrieval.

The Code

MEAN makes use of Express.js and AngularJS to drive web page presentation and control flow, tasks covered by PHP or Python in the LAMP stack. Express.js serves as the controller layer, directing application flow and marshaling data for AngularJS, which handles data presentation. The primary benefits offered by these scripts are a simplified back-end architecture – for example, Express.js weighs in at only 1,143 lines of code – and a purely client-side presentation layer in AngularJS that can be easily embedded into any existing web application. Furthermore, usage of Express.js and AngularJSo n top of Node.js gives your technology stack the added benefit of being entirely in one language, meaning your front-end developers now have the ability to trace all the way down the stack without having to learn another programming language.

Additional Considerations

Probably the biggest choice to be faced when converting from LAMP to MEAN is the choice of data store. While the MEAN stack is designed to work with a non-relational database, there are plug-ins for Node.js that allow the stack to run off of a relational database just as easily. The front end handles everything in JSON, so the only true consideration is how the data is stored before it is retrieved, or the difference between Relational and Non-Relational databases.
Relational databases, with their support for highly complex structured queries, lend themselves well to performing complex calculations with data. Non-relational databases excel at managing operational data, such as a list of objects in a system. The lack of a schema allows for fluid object definitions that don’t require extensive code changes, and by removing the need for extensive and complicated queries the system can often operate more efficiently than a similar architecture build over a relational database.


Converting to the MEAN stack gives your development team a number of benefits, the three most significant being a single language from top to bottom, flexibility in deployment platform, and enhanced speed in data retrieval. However, the switch is not without trade-offs; any existing code will either need to be rewritten in JavaScript or integrated into the new stack in a non-obvious manner. Ultimately the choice to switch to a MEAN stack from LAMP will be based in your organization and the priorities for the project under development.
Courtesy of Blog.BackAnd


Nemco said...

Great informational resource as always!I really love the way of explaining this post.You are just outstanding...Keep posting more
website development company

Anonymous said...

Robotic Process Automation (RPA) is one of the most exciting developments in Business Process Management (BPM) in recent history. Some industry experts believe it may be even more transformational than cloud computing transformational than cloud Automationminds team. (RPA)Automationminds lets you program in (RPA),
Robotic Process Automation course

Unknown said...

As you have now understood the usage of ‘Record and Playback’ tool, the following are the different posts using which you can explore the functioning of ‘Selenium IDE’
selenium Training in chennai

Anonymous said...

SQream Technologies provides you with a state of the art software which combines modern GPU technology (Graphic Processing Units) with the best practices in today’s Big Data platforms, providing up to 100x faster insights from data.
python course

Unknown said...

Thanks For Your valuable posting, it was very informative...
full stack web developer

getha said...

Data science is a fast-moving field – if you’re pursuing a data science career, or even if you’re just interested in data-related topics, you need to invest time to keep up with the trends. Following a few top blogs is a great way to stay abreast of developments in data analysis, statistical software, data visualization, and more. These AUTOMATIONMINDS bloggers consistently offer great resources and tutorials, along with opportunities to connect with and learn from other leading data science professionals.
DATA SCIENCE training in chennai

Anika Digital Media said...

Excellent ! I am truly impressed that there is so much about this subject that has been revealed and you did it so nicely
Anika Digital Media
seo services in UK
web design development company in UK
graphic design
angularJs developer in london

Clipping Path Service said...

I'm appreciate your writing skill. Please keep on working hard. Thanks for sharing.
clipping path

Tony Chew said...

Mengingat pada sejarahnya permainan ini mulai dikenal di eropa dari abad ke 14. Dan hingga saat ini belum tercapai kesepakatan mengenai penyebaran permainan ini
bandar ceme terbaik
paito warna
bocoran sgp
data hk

Anika Tech Support said...

london website hosting
Anika Tech Support managed by a team of professionals utilising a combined 20+ years of experience in IT support and Managed IT services Focusing on Proactive support, continuity, growth and development. We are a forward thinking IT Company who support public and private sector using the latest tech as a driving force for our client’s Success.

unknow said...

I really enjoyed your blog Thanks for sharing such an informative post.

Indian Bookmarking list
Indian Bookmarking list
India Classified Submission List
Indian Classified List


Find your best fit 2019 with Fitbit's 2019, Family of fitness products that help you stay motivated and improve your health by tracking your activity,

exercise, food, weight and sleep.

Unknown said...

paito warna china
paito warna singapore
paito warna sydney
syair sydney
paito warna terlengkap
live hk 6d
live draw hk