Live data from Hacker News

Create a character voting app using React, Node.js, MongoDB and Socket.io

sahatyalkabov.com

21–30 of 59 posts

Re: Create a character voting app using React, Node.js, MongoDB and Socket.io

#21
"I have yet to find any React boilerplate project with an easy to understand webpack.config.js file."

I actually think that a simple Webpack configuration for a React project is pretty easy to understand (thanks to Babel). Here is one that I use in one of my projects [1]. Adding Less support is like one additional entry.

[1]: https://github.com/renke/perpetually/blob/master/webpack.con...

Re: Create a character voting app using React, Node.js, MongoDB and Socket.io

#22
Great tutorial showing how many components work together in node/mongo/react.

It also absolutely blows my mind. This just feels wrong. 17 separate packages, some providing really basic stuff like serving favicons and parsing POST requests that must be a part of bigger framework. Each package is of different quality, testing strategy, and depends on a different developer who's completely free to abandon his project tomorrow or introduce some backwards-incompatible change. This trend as a whole looks unreliable, like a wobbly house of cards near a working fan.

Re: Create a character voting app using React, Node.js, MongoDB and Socket.io

#23
post #18
post #10

Earlier quoted context omitted.

What are you talking about? I've never seen a 2k lines todomvc.

Here's my unscientific LOC count results (that I did in 5 minutes). I've removed node_modules and bower_components from the items in: https://github.com/tastejs/todomvc/examples I've also deleted "polymer" and "emberjs_require" since they didn't have any files in them and messes up the `wc -l` $ for x in *; do echo $x; wc -l `find $x/ -name '*js*' -type f | egrep -v 'test|lib|public|vendor|.bundle.js|.cache.js'`; ech…

[deleted]

Re: Create a character voting app using React, Node.js, MongoDB and Socket.io

#25
post #17
post #12

Impressive and awesome. This is perfect to catch up on using build tools. I focus on core programming concepts in my own work, and at work most of that stuff is automated to just a few commands, so I appreciate the gulp.js part of your tutorial most. Thanks for the great work.

I can't claim to be a Gulp expert, but it's always shocking to me how tools like Gulp and Grunt become so pervasive without strong tutorials. I ignored Grunt for years, always implementing my own hackneyed systems in Python, until I eventually discovered this tutorial[1], which at least got me a good introductory "this is how you use this thing that everybody else already knows how to use, dummy" lesson. [1] - http:/…

Thanks for the resource!

Yeah they did kind of just sneak up about a year ago it seems. I remember getting into the field two years ago I didn't hear about them. I suspect the tipping point was the full migration to front-end frameworks instead of just plain JS/jQuery.

Re: Create a character voting app using React, Node.js, MongoDB and Socket.io

#26
post #6
post #4

Why is modern webdev this hard? Even the todo-mvcs are all ~500 to 1000+ lines.

It's the future. http://blog.circleci.com/its-the-future/

Funny stuff, but it makes me want to just put my hands over my eyes and say "let a Dev ops guy handle it!"

Re: Create a character voting app using React, Node.js, MongoDB and Socket.io

#27
post #18
post #10

Earlier quoted context omitted.

What are you talking about? I've never seen a 2k lines todomvc.

Here's my unscientific LOC count results (that I did in 5 minutes). I've removed node_modules and bower_components from the items in: https://github.com/tastejs/todomvc/examples I've also deleted "polymer" and "emberjs_require" since they didn't have any files in them and messes up the `wc -l` $ for x in *; do echo $x; wc -l `find $x/ -name '*js*' -type f | egrep -v 'test|lib|public|vendor|.bundle.js|.cache.js'`; ech…

You included all the spec / unit test files, and in some instances you included the framework.

Re: Create a character voting app using React, Node.js, MongoDB and Socket.io

#28
I've been curious about React for awhile now, but every time I step in to play around with it, I get really turned off by the syntax.

This is a react render function mentioned in the tutorial (gist with all code here[0]):

  render() {
   let delta = this.props.delta ? (
      0 ? 'text-success' : 'text-danger'}>
       {this.props.delta}
     
   ) : null;
 
   return (
     
       {delta}
       {this.props.title}
     
   );
  }
This is approximately that same function written in ERB and Rails syntax.

  
     @delta > 0 ? 'text-success' : 'text-danger' ) do %>
      
    
  
On just a pure typing basis, the ERB would take half as long to type as the react version. Even writing that same function in backbone templates (which I use frequently) would take less text, and be easier to read. Maybe I haven't given react and other js frameworks enough of a chance, but to a person that hasn't learned them, that render function above is a huge deterrent.

[0] https://gist.github.com/alexggordon/820020aab934bf192b81

Re: Create a character voting app using React, Node.js, MongoDB and Socket.io

#29
post #25
post #17

Earlier quoted context omitted.

I can't claim to be a Gulp expert, but it's always shocking to me how tools like Gulp and Grunt become so pervasive without strong tutorials. I ignored Grunt for years, always implementing my own hackneyed systems in Python, until I eventually discovered this tutorial[1], which at least got me a good introductory "this is how you use this thing that everybody else already knows how to use, dummy" lesson. [1] - http:/…

Thanks for the resource! Yeah they did kind of just sneak up about a year ago it seems. I remember getting into the field two years ago I didn't hear about them. I suspect the tipping point was the full migration to front-end frameworks instead of just plain JS/jQuery.

I think Grunt had been around for awhile. That video is December 2013ish, and I remember trying and failing more than a couple of times to integrate it into my workflow. According to whois, gruntjs.com was first registered in April 2012.

Now, to be fair to Grunt, my workflow is usually Python or Go on the backend, and I just wanted something to manage my front-end assets, so it was never a necessity for me, but knowing there's something that does what I want it to do, while being unable to make it do the thing that it does is quite frustrating.

Re: Create a character voting app using React, Node.js, MongoDB and Socket.io

#30
post #18

Earlier quoted context omitted.

Here's my unscientific LOC count results (that I did in 5 minutes). I've removed node_modules and bower_components from the items in: https://github.com/tastejs/todomvc/examples I've also deleted "polymer" and "emberjs_require" since they didn't have any files in them and messes up the `wc -l` $ for x in *; do echo $x; wc -l `find $x/ -name '*js*' -type f | egrep -v 'test|lib|public|vendor|.bundle.js|.cache.js'`; ech…

You included all the spec / unit test files, and in some instances you included the framework.

I've updated with `test|` in the filter now, but the point stands.
Post reply on HN