92 points · by c-oreills · 13y ago · 81 comments
Postrgesql with no-sql extensions ( for when you may need flexibility), typed python or typescript or dart( or any language with optionnal typing) on the server, and typescripted js lib on the frontend I'd call it the Optional Typing Stack ( but ots isn't nearly as good as "mean" i must say).
Which really sums up the advantage of MongoDB to me - JSON is a more natural fit for domain objects than SQL tables.
And those are just the built-in ones, not counting PostGIS and other ones that you can define: http://www.postgresql.org/docs/9.1/static/extend-type-system...
This is not what the GP was talking about. You are adding in another client library to hopefully enforce the rules in that specific (nodejs) client.
So you still have everything structured but not have to worry about annoying migrations.
Do you write bug free code 100% of the time? I'm pretty good, but I definitely don't. And when there are bugs in my code, I'm grateful for a RDBMS with enforced referential integrity.
I've also had to work on projects where the initial codebase was scrapped all together. When that's happened I've found having the data in clearly defined columns and relationships immensely useful.
And like many are doing these days I do all my joins in my app so that I have the flexibility of moving objects into more appropriate storage mediums e.g. Redis or Solr without major refactoring.
I am not dismissing the benefits of having business rules in the database only that they aren't always necessary.
That said, this is a very awesome stack to use for hackathons and short projects or prototypes.
Trying to repeat the trick by coming up with another cool acronym is not a good idea.
The problem with the LAMP stack is the idea that one stack is suitable for just about any purpose. So you get developers trying to build hugely complicated algorithms with 'if' and 'for' loops in PHP and turning MySQL into an object store with ORM.
Better to use the right tool for the job, rather than the one all the cool kids are using today, or the one with the best sounding name.
Will the MEAN stack stand the test of time? How many forgotten JS libraries litter the timeline of web development?
For browser side packages, sure, there's churn. But that's true of any web stack, and at the pace browsers develop, it's worthwhile revisiting those library choices more than once a year anyway.
20 765 downloads in the last day 127 921 downloads in the last week 489 285 downloads in the last month
Since it's essentially Sinatra for Node.js, I don't think it's too big of a stretch to say that it will be a part of the stack for some time.
I would say longer than Angular, as browser-side packages seem to have more churn on the basis of adoption of newer browser features.
The lead in seriously harms the technical credibility of the rest of the entry.
Author of the post here. Thanks for the excellent discussion, this is a very interesting read. Let me make a few comments re: some of the more interesting points I've read.
1) I love Redis, but in my book, if you're already using MongoDB, its more of a tool for reducing latencies once you're looking to scale. If I'm just looking to prototype I'll probably use one or the other, but not both. I love the MEANR / MEANER acronym though, but I can't support the EJS decision, I'm all about Jade =)
2) AngularJS not good for hackathons? Sounds like a subject for another post. Granted it may be that I'm just extremely biased towards Angular, I was an intern with the Google team that developed it in '08 and I've been using it since v0.9.9. However, I find Angular's slick two-way data-binding to be completely indispensable for building a prototype. There are two primary reasons for this, first I find the paradigm of writing Javascript which explicitly references the DOM to be brittle, and second it makes life easier for my designer because he never has to worry about breaking the frontend Javascript.
3) I agree that Javascript is a rapidly developing language and many of the tools that I use may well be obsolete within a few years. However, I think that I benefit from using the tools that I believe are best in the meantime, and when better tools are released, then we'll change along with them.
Thanks again for the commentary, I really appreciate it. I'll be coming out with a few more posts in the near future, please be on the lookout =)
But I don't see the point of using an ORM with MongoDB... not saying ORMs are bad, I just don't think they have much to offer when there is no SQL to abstract and when you're doing everything in JSON anyway (in this stack). If I'm missing something, happy to be enlightened.
As someone who spends each day switching between Erlang, Ruby, Javascript and sometimes C (with various infrastructure components also requiring bits of Java or Go) I find a the idea of a one-language stack sort of mindblowing (though I've always sort of fantasized about connecting my Erlang servers directly to an Erlang VM running in the browser over the distribution protocol.)
Would you mind expanding on those "huge benefits", as you've actually experienced them? I've only ever really seen people describing theoretical benefits they imagine they might see if they did this, but nothing from anyone who has.
I am definitely curious about other languages, but I don't have the inclination to spend the time to learn them well enough to build something I would put on the internet. At least not when I can put together a pretty performant / scalable app with a modicum of effort using this stack.
These things may not be of much significance to a seasoned polyglot dev, but for someone who only really knows JS and is an infrastructure guy by trade, it makes a big difference :)
MongoDB + Flask + Angular + Python
MongoDB + Play + Angular + ScalaThe meteor guys have implemented this logic in a package called minimongo: http://bit.ly/YmS3Y1
you could also use clojurescript serverside using node.js. this is what LightTable does iirc http://www.chris-granger.com/lighttable/
There's a CMS, for starters.