Hacker News new | ask | show | jobs
by vijayaggarwal 4379 days ago
Since there are a lot of components involved, let's consider them separately instead of discussing the bundle as a whole. This also helps as M-E-A-N are very independent by design and can be used independently. In fact, we are currently using AngularJS at frontend and PHP at backend.

MongoDB: is a NoSQL database designed for handling huge amounts of non-relational data. In comparison, MySQL excels at handling relational data but does not scale as well. If you need a lot of joins (relationships, user roles, etc.) then MySQL will be better and if you can benefit from the ability to keep arbitrary columns in your database tables without the need for running ALTER commands or other database hacks (CMS fits very well as most CMSs hack MySQL a lt to get the fleibility they need) then MongoDB will suit better.

ExpressJS: is akin to Django. While I am not experienced with ExpressJS, it seems more oriented towards single-page apps. Django has some good support for templating which comes in very handy for traditional websites. Single page apps don't fetch a lot of HTML from backend anyway, so this capability is not of much use.

AngularJS: has no direct counterpart in LAMP stack with Django. Angular is a frontend framework used for building single page apps. In fact, if you are building a single page app, you would want to use a frontend framework like Angular or Ember even if you use Python/Django/MySQL at backend. As mentioned earlier, we have recently built a single page web app with Angular at frontend and LAMP(PHP) at backend.

Node.js: is actually (to some extent) a counterpart of apache server and not python or django. nodejs is a performance oriented server with asynchronism at its core. While it is definitely desirable for high workload applications, it does take some getting used to. For example, even though you I was quite comfortable with AJAX at frontend, writing database queries in an asynchronous mode felt quite unnatural at first.

Overall, depending on the kind of application to develop and the kind of time luxury to learn new things, you may want to adopt MEAN partially if not fully. If constraints permit, spending some time with M/E/A/N should be intellectually and professionally rewarding.

1 comments

Really appreciate the breakdown. Its actually surprising me how little I educated myself on some of the components.

From what I know ExpressJS is more of a microframework that can be used piecemeal. Closer to Flask or Sinatra maybe? Or am I way off here? Do you typically use an ORM for the DB or is the expectation to query MongoDB directly?

Thanks! MongoDB and NodeJS are fairly big projects and take some experience to fully appreciate. Even Angular vs Ember is not a trivial decision and its better to have some experience with both. I agree with czbond's suggestion of starting with smaller projects. It will also reduce abandonware risk.

Again, I don't know much about Express though microframework seems to be the right term to me. Hopefully, other community members will shed some light on this. Regarding MongoDB, an ORM is technically not needed as mongo is not relational. In fact, mongo treates its records as first class JSON objects and therefore is very object-oriented natively.

I appreciate your helping to knock some sense into me. I should know better than to go diving headlong into building large client projects in bleeding edge technology, heh
Generally, if you're using MongoDB with a Node app, most people use http://mongoosejs.com as an ORM/ODM.