News for hackers. Stuff that matters.
Re:Step-by-step tutorial to build a modern JavaScript stack ... by Wintamute on Saturday October 29, 2016 @01:18PM (#12825010)
The create-react-app tool from Facebook lets you create a "modern" (air quotes yours) web app with one development dependency and zero configuration.

https://facebook.github.io/react/blog/2016/07/22/create-apps...

It's surprisingly full featured. Testing, ES6, CSS, live reload dev server, building for production ... everything you need for the majority of React based web app builds. Literally up and running in minutes. Also you can just offload all of the cognitive burden of selecting tools to people much more qualified.

Judge the whole scene by one GitHub project if you will, but the "boo hoo web development is too complicated" meme is getting a bit old now. It's mainly coming from a place of ignorance. Yes it's been a journey for web development over the past few years, but there are powerful and simple tools available now that other platforms and communities could learn from, rather than just disparage.

Re:Step-by-step tutorial to build a modern JavaScript stack ... by dceddia on Saturday October 29, 2016 @02:40PM (#12825577)
I'll add a second vote for create-react-app; it's a great tool.

It gets a project up-and-running fast and contains basically all you need. It's not a "boilerplate" that dictates which libraries you use (in terms of Redux, Router, HTTP, etc.).

So here's the interesting part: it basically turns your build into a dependency, with all the pros and cons that entails.

CRA is regularly updated so if you choose to, you can keep your project in sync with the latest fads/features in builds -- snapshot testing, minified production build, hot module reloading (coming soon), etc. Of course, like any dependency, there's the risk of breaking changes.

It's a tradeoff, but a pretty good one in my opinion. Having been part of a couple projects that started in Grunt, then moved to Gulp as the Grunt build was getting slower... it's painful to have to retool the build system, basically ever. "Set it and forget it" works great for a few months, but there always seems to be some new trick to make things faster/better/etc that your tool can't do.

I really like the "build as dependency" idea.

Re:Step-by-step tutorial to build a modern JavaScript stack ... by voltagex_ on Saturday October 29, 2016 @06:08PM (#12826698)
Say create-react-app stops being updated / maintained in a year or so, how hard would it be to "untangle" my project from it? With Javascript communities moving so fast, I worry about being left behind, or not being able to update when I need to (or the inverse, not being able to stay on a stable version)
Re:Step-by-step tutorial to build a modern JavaScript stack ... by peller on Saturday October 29, 2016 @06:13PM (#12826724)
Just one command to decouple your project: "eject"

https://github.com/facebookincubator/create-react-app#conver...

Re:Step-by-step tutorial to build a modern JavaScript stack ... by treehau5 on Saturday October 29, 2016 @01:37PM (#12825153)
It's funny, but if some of these people griping about web development tried to unpack their favorite enterprise framework, like Spring MVC or whatever J2EE/.NET architecture they are running, there would be way more packages and bundles wrapped up together. It's just the web is finally getting to a good place.
Re:Step-by-step tutorial to build a modern JavaScript stack ... by fourthark on Saturday October 29, 2016 @02:12PM (#12825406)
Yeah, difference is between a "standard library" with a million components, and a million independently distributed components. With the usual tradeoffs between centralization and competition.
Re:Step-by-step tutorial to build a modern JavaScript stack ... by ng12 on Saturday October 29, 2016 @02:49PM (#12825627)
How do you think you get to a standard library? How do you package the best tools when you don't know what the best tools are?
Re:Step-by-step tutorial to build a modern JavaScript stack ... by nightski on Saturday October 29, 2016 @04:52PM (#12826308)
How long do you think something like that should take? It's already been 25 years... I think it says something about the browser ecosystem and the language itself.

The entire WPF ecosystem for example was developed and refined in a fraction of this period. Heck even .NET itself is only 14 years old.

Re:Step-by-step tutorial to build a modern JavaScript stack ... by pault on Saturday October 29, 2016 @06:20PM (#12826755)
I don't think that's really a fair comparison. I would argue that you should start counting from the adoption of UMD modules and npm for package management, since a universal package format and dependency management are requisite for an ecosystem to get of the ground.
Re:Step-by-step tutorial to build a modern JavaScript stack ... by fourthark on Saturday October 29, 2016 @07:46PM (#12827174)
Languages with one single corporate implementor obviously will centralize and standardize their library. Languages with a bunch of competing implementors stay fragmented. JavaScript is a lot like C++ in this regard.
Re:Step-by-step tutorial to build a modern JavaScript stack ... by treehau5 on Saturday October 29, 2016 @10:33PM (#12827823)
Javascript development as you see it today started budding with Mootools, Prototype, jQuery, YUI, etc. Wasn't until the early 2000s that the concept of unobtrusive javascript was even a thing. Then bundling assets came, asset pipeline concept from the rails world got popular in javascript land, then you had all the grunt, gulps, webpacks come into the picture -- Point being .NET came out in what, 01? So Javascript has a few more years, I think we will be in a good place in a couple of years. Besides that point, how much work behind the scenes before .NET was even ever released to us was going on? How many man hours of development was put before that first public release? My guess is a lot more than we think.
Re:Step-by-step tutorial to build a modern JavaScript stack ... by lucideer on Saturday October 29, 2016 @01:50PM (#12825241)
The "one dependency" quoted is "react-scripts"[0], which just acts as an effective meta-package for auto-including 45 other dependencies.

That said, treehau5 has a point. This shouldn't inherently be an issue in devDependencies, unless there are individual problems. The end product is what's important.

[0] https://www.npmjs.com/package/react-scripts

Re:Step-by-step tutorial to build a modern JavaScript stack ... by swsieber on Saturday October 29, 2016 @09:09PM (#12827495)
Of course it's coming from a place of ignorance - that's where all new devs start, right? This one is perpetuated by the fact that whenever a dev pokes his head into the web dev world, the tools are different than the last time they checked.
Re:Step-by-step tutorial to build a modern JavaScript stack ... by KON_Air on Saturday October 29, 2016 @02:32PM (#12825527)
Not that I'm not using JavaScript to do things, it was never meant to do, but I don't know, using "modern" or "comprehensible" in same sentence with "JavaScript" always makes me giggle.
Re:Step-by-step tutorial to build a modern JavaScript stack ... by Touche on Saturday October 29, 2016 @11:03PM (#12827922)
There's nothing modern about a website that does nothing without JavaScript
Re:Step-by-step tutorial to build a modern JavaScript stack ... by uryga on Sunday October 30, 2016 @11:14AM (#12830213)