Live data from Hacker News

Mern: Build JavaScript apps using React and Redux

mern.io

21–30 of 141 posts

Re: Mern: Build JavaScript apps using React and Redux

#21

Your demo needs fixing, it's open to XSS and that has been tried and tested, as expected for this crowd. :)

MERN scaffolded apps depend on Mongoose. I wrote a plugin that maybe could fix that, its called mongoose-sanitizer: https://www.npmjs.com/package/mongoose-sanitizer

Re: Mern: Build JavaScript apps using React and Redux

#23
post #5

The page keeps mentioning 'isomorphic apps' but I have no idea what those are. From googling, they appear to be JS code that can run client and server-side? Not what I would have guessed!

An isomorphic app is basically a Single Page Application (think Angular / React / Ember application) with the special ability to be rendered server side. The interest vs a simple SPA is that on the first page load, instead of loading just javascript, and having to wait for XHR request and JavaScript rendering to draw the data, you get the page properly rendered in the first place. But when you navigate to go to a different page, you use javascript to repopulate the data. It's the best of both world for the users. But for the developers it usually means extra work.

Re: Mern: Build JavaScript apps using React and Redux

#24
post #5

The page keeps mentioning 'isomorphic apps' but I have no idea what those are. From googling, they appear to be JS code that can run client and server-side? Not what I would have guessed!

It's one of those instances where developers went looking for a word that perfectly articulates what it's doing, but is so esoteric as to be useless.

> being of identical or similar form, shape, or structure

I call it fronty-backy-samey-samey and everyone knows what I'm talking about.

Re: Mern: Build JavaScript apps using React and Redux

#25

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.

It's not that you don't have migrations, it's that you move that logic to your application code. I personally find that to be a terrible trade-off. People make the same arguments in favor of mutable data structures: you benefit initially from having everything mutable, but then you start writing code to compensate for the flexible nature of it and suddenly you have a whole new set of issues.

Re: Mern: Build JavaScript apps using React and Redux

#27
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.

It's nice with zero configuration. Especially the no password by default thing. Why bother with limiting your database with host access and passwords ;)

Re: Mern: Build JavaScript apps using React and Redux

#28

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.

Except people have bad tendency to not throw out prototypes and are unwilling to do the work to deal with bad decisions from the prototype time...

Re: Mern: Build JavaScript apps using React and Redux

#29
post #5

The page keeps mentioning 'isomorphic apps' but I have no idea what those are. From googling, they appear to be JS code that can run client and server-side? Not what I would have guessed!

It's one of those instances where developers went looking for a word that perfectly articulates what it's doing, but is so esoteric as to be useless. > being of identical or similar form, shape, or structure I call it fronty-backy-samey-samey and everyone knows what I'm talking about.

It's not really esoteric... it just kind of has the wrong connotations, because it's used rigorously in mathematics, and here it just means "portable between different JavaScript runtimes," pretty much.

To me the word makes me imagine a web application that can parse its own rendered HTML and get back the application state. Which sounds kind of interesting...

Re: Mern: Build JavaScript apps using React and Redux

#30
FWIW 'isomorphic javascript' was pretty much supplanted by 'universal javascript' last year per this medium post [1]. You might consider changing the copy.

Edit: At the very least Dan Abramov (Redux creator) is ok with universal [2]

[1] https://medium.com/@mjackson/universal-javascript-4761051b7a...

[2] https://github.com/gaearon/react-redux-universal-hot-example

Post reply on HN