![]() A number of benchmarks show that Node.js offers better performance, while doing much more.These days Node.js is often flat out faster than Apache.But it all seems a bit inefficient and confusing.Of course there are so many well-tested PHP libraries that convert the data easily.PHP already has the code to import MySQL data and make it easy to process.MySQL’s native format for answering queries is not reusable.GET, manipulate, present, POST, and store all with one format.JSON’s ubiquity through the MEAN stack makes working with external APIs that much easier.Which makes it simpler and saves time reformatting as it passes through each layer.MEAN uses the same JSON format for data everywhere.The data flows neatly among all the layers without rewriting or reformatting.Angular and MongoDB both speak JSON, as do Node.js and Express.Instead, it’s all JavaScript across the stack.Or a front-end and a back-end specialist. ![]() No need to look for a PHP expert and a JavaScript expert.Programming MEAN-based apps is significantly easier.If we write code for Node and decide it’s better placed in Angular.Leave behind the LAMP stack’s client/server schizophrenia.By going MEAN, we can enjoy that same JavaScript on the client and the server.less confusion and less chance of strange bugs created by weird interactions between multiple layers.No more different config files for everything.Less different documentations references.Rewrites URLs or constructs an odd mapping.Changes the logic used to answer queries.Changes how our app routes requests, with small js code and the rest is handled by Node.js.Node.js put this kind of pipework all in one place, all in one language, all in one pile of logic.Navigating the various layers of the LAMP stack can be difficult - shuffling through various config files with differing syntax.The server layer simplified with Node.js ⌘ Some database designers end up de-normalizing their data because the JOINs are too slow.Relational DBs have JOINs to save disk space, but they can be tricky and hard on RAM.Cheap disk space (multiple terabytes rather then megabytes).To compare, MySQL’s structure is confining (tables and their normalization requirements, etc).MongoDB's document structure is far more flexible (projects in flux and dealing with data which is tricky to constrain in table form).Modern database equipped with: automatic sharding, full cluster support, failover support and automatic replication.MEAN stack offers a compelling database layer in MongoDB, if our web app plans include embedding it in the cloud.The server layer simplified with Node.js.Angular provides a clean way of adding interactive functions and AJAX-driven rich components.Express helps standardize how we build our websites.Node.js provides a better nexus for running our server.MongoDB offers a more flexible, accommodating layer for storing data. ![]()
0 Comments
Leave a Reply. |