NoSQL databases does not MEAN anything

There is so much hype around the MEAN stack, it can be hard to ignore. @lewiswalsh

True. And oh gosh, I hate this abbreviation! Think about a small developer, all he knows is some PHP and a bit of jQuery to write his website. One morning, on twitter, he reads that everybody is talking about MEAN. First thing he’s going to ask is: what does it mean? (yeah crap joke)

# MEAN

MEAN - A Modern Stack: MongoDB, ExpressJS, AngularJS, NodeJS.

Obviously, if he has any interests in new technologies, he nows what those are but he’ll think that everyone of them are going to work only together. Wrong!

# Node.js

Ok, Node is great to build a web application in a few days and I like it. It is popular, but it’s not the best tool in every case.

# Angular.js

Angular is my new prefered frontend tool but I’ve played with Backbone and Embed before, so should you! It also has a major side-effect beeing the bad SEO support (or you can cache rendered pages but it’s a headic).

# Express.js

Why Express? There are many of other web servers, some are build on top of Express (koa, kraken) other’s are not (hapi.js) and the list goes on. They are quite popular and may be even more powerfull than Express. My point here is not that you shouldn’t use Express (also not because it has been sold to strongloop) but you should consider and take a look at other frameworks that might better fit your needs!

# Mongodb

That’s too much. Why the heck would we use MongoDB to handle a new-gen application? Database is an important part of your application design and it should be chosen with care! If I stick to the newbie example, he’d have probably seen that MongoDB is NoSQL and that it’s great (and also popular)! So why wouldn’t he use it and drop his old relational database? What does even mean “NoSQL”?

# Some NoSQL culture

NoSQL does mean (to me) “this system does not use any SQL language”. That’s it. Does it mean that they are all document related? No. When we look at a list like this one (nosql-database.org) we understand that there are many different database systems that are not using any SQL (note that I don’t fully agree with the definition on the top of the page).

Those are the most popular (or interesting) categories:

As you can see, a lot of different systems exists and you should not just use MongoDB because it’s popular. Think about how your datas can be represented, try some databases (and connectors) and do not kill your old relational model just because it’s not popular anymore. Why will you change to an new unknown technology if your old one still works great?

# MongoDB…

# …is not easy to use out-of-the-box

For example, if you want to create a easy-to-use blog platform like Ghost will you use mongodb? No. Because mongodb isn’t that easy to set up compared to SQLLite that just stores things in files. It’ll be less painful for your future users to get their blog online.

# …is without SQL and I don’t like SQL

So? It’s also a Document Oriented database that might not fit to your datas models. Oh and, ORM (Object Relational Mapper) are there if you want to use models instead of writing pure SQL. Ghost for example is using bookshelf but the most popular is Doctrine (note it also has a MongoDB ORM).

# …to be continued