Live data from Hacker News

Mern: Build JavaScript apps using React and Redux

mern.io

91–100 of 141 posts

Re: Mern: Build JavaScript apps using React and Redux

#91
post #11

Earlier quoted context omitted.

MongoDB plays very well with the rest of the javascript based stack, which mean development and testing is simpler. For many use cases the development time is the real cost, and the database itself is simple enough that what it is running on does not really matter much. Most people are not building Big Data systems.

Why not rethinkdb or couchdb then ? Mongo is not the only Javascript friendly document oriented database.

Mongo isn't even "Javascript-friendly". It just accepts JSON for queries, that's all. JSON is approximately as related to Javascript as Javascript is related to Java.

Re: Mern: Build JavaScript apps using React and Redux

#92
post #12

Earlier quoted context omitted.

Mongo is often quick to get people started and simple to work with. No migrations, or joins, etc. etc. It's not for every project, but quite nice for prototyping.

Not only prototyping. If the final product will have a moderate amount of users generating a moderate amount of data, there is really no drawbacks with mongoDB. The real cost is development time.

There are many drawbacks when using MongoDB, especially in the development time department: http://cryto.net/~joepie91/blog/2015/07/19/why-you-should-ne...

It's a completely fallacious argument. Using MongoDB doesn't save you time, it just shifts the effort towards a later point, where it will require several times as much effort to fix shit, which may not even succeed and you may end up with corrupted data.

It's really not worth it.

Re: Mern: Build JavaScript apps using React and Redux

#93

This was a really bad time to post this framework, the disillusionment for javascript is at an all time high right now. That being said why Mongodb? NoSql are advantageous for write speeds, which as far as I know isn't particularly important for new applications. I understand that you want "javascript everywhere" but is that really worth the cost of losing the speedy and convenient join statements? I think postgres m…

Web Assembly will dissolve that monopoly, not sure when though.

Re: Mern: Build JavaScript apps using React and Redux

#94

Why MongoDB?

Mongo is often quick to get people started and simple to work with. No migrations, or joins, etc. etc. It's not for every project, but quite nice for prototyping.

Migrations don't actually take more time than defining the schema implicitly in your application, and you don't even need to think about joins at all if it's only going to be a prototype.

MongoDB is far from "simple to work with". This is 100% marketing bullshit (along with dubious claims like it being "fast" when it never has been), trotted out by MongoDB's marketing department. Let's not forget that it has always been a commercial project.

EDIT: And to clarify, relational databases and document stores are not interchangeable. You need to pick the one that reflects your data model most accurately.

Usually that's going to be "relational", sometimes it will be "documents" - but even if it is, there are better options than MongoDB.

Re: Mern: Build JavaScript apps using React and Redux

#95
post #49

FRAMEWORK (shitty tragedy in one act) Dramatis Personae PROGRAMMER, programmer HIPSTER, hipster * * * ACT I Small room. There are a table with paper stacks, opened "Perrier" bottle, two huge monitors and a programmer sitting behind. Programmer reads papers, looks on first monitor, then on second and typing something. From time to time he says "damn idiots". Number of "damn idiots" is divided equally between papers, f…

It illustrates "Chekhov's bottle" very well:

"Remove everything that has no relevance to the story. If you say in the first chapter that there is a bottle of Perrier on the table, in the second or third chapter it absolutely must land on a hipster's head. If it's not going to be smashed, it shouldn't be sitting there."

And perhaps the moral of the play is yet another variant of Chekhov's gun, but this one would be "Chekhov's framework"!

Re: Mern: Build JavaScript apps using React and Redux

#96

Earlier quoted context omitted.

Why not rethinkdb or couchdb then ? Mongo is not the only Javascript friendly document oriented database.

Mongo isn't even "Javascript-friendly". It just accepts JSON for queries, that's all. JSON is approximately as related to Javascript as Javascript is related to Java.

Its shell accepts JavaScript commands IIRC. Not sure if that's enough to call it JS Friendly though.

Re: Mern: Build JavaScript apps using React and Redux

#97
post #90

This was a really bad time to post this framework, the disillusionment for javascript is at an all time high right now. That being said why Mongodb? NoSql are advantageous for write speeds, which as far as I know isn't particularly important for new applications. I understand that you want "javascript everywhere" but is that really worth the cost of losing the speedy and convenient join statements? I think postgres m…

Glad I am not the only one. I do not understand why most JS frameworks use a NoSQL store. Even from their FAQ. "You can always replace Mongo with another DB like RethinkDB, CouchDB or something else you like. :)" What about SQL??!?!

Most of the "nodejs generation" would take simple queries + aggregates (https://docs.mongodb.org/manual/aggregation/) + some flavor of map-reduce (https://docs.mongodb.org/manual/core/map-reduce/) over SQL anytime. Mostly because you only need the first for 90% of the cases, and for the rest, SQL is "brain hurting" and hard to optimize anyway. I also happen to agree that SQL should be finally killed and buried (and invent a more "in code" and closer to mathematical language notation for when you really need to do relational algebra, something like a "relational GraphQL maybe"), though most of the colleagues of my age would prefer to bury me for expressing this opinion :)

Re: Mern: Build JavaScript apps using React and Redux

#99
post #19

Why MongoDB?

I use MongoDB because I can instantly save down a JavaScript object and later retrieve it in the same state. I don't have to worry about anything else. No configuration, nothing. That's all I need but if there are better options I'm all ears.

You're not "saving down a JavaScript object", as MongoDB does not speak JavaScript. What you're doing is passing an object to your database driver, which then converts it to JSON, and sends it to MongoDB.

JSON is an entirely separate language from JavaScript, and it can be used from just about any language. This "convert a native object into the query format" thing is also literally what almost every database driver in almost every language does.

This has precisely zero to do with either MongoDB or JavaScript.

Re: Mern: Build JavaScript apps using React and Redux

#100
post #90

This was a really bad time to post this framework, the disillusionment for javascript is at an all time high right now. That being said why Mongodb? NoSql are advantageous for write speeds, which as far as I know isn't particularly important for new applications. I understand that you want "javascript everywhere" but is that really worth the cost of losing the speedy and convenient join statements? I think postgres m…

Glad I am not the only one. I do not understand why most JS frameworks use a NoSQL store. Even from their FAQ. "You can always replace Mongo with another DB like RethinkDB, CouchDB or something else you like. :)" What about SQL??!?!

2 theories:

(1) Node sprung up at the exact same time that NoSQL was in it's "fad" phase (which had much to do with fighting the now-mostly-solved scaling challenges of the SQL databases of the time). Both caught on with people who liked trying the hot new thing in 2010.

(2) There's definitely a bit more impedance mismatch when you're working with a SQL database from JS. If what you're trying to do is persist a blob of JSON, a NoSQL object/document store works at that level, whereas a SQL database requires thought and planning.

This is not to say that I prefer NoSQL, or that these are reasons why someone starting something now should choose NoSQL, but they do jump out to me as why backend JS dev has been a bit more NoSQL-happy over the years.

Post reply on HN