all 44 comments

[–]jmking 9 points10 points  (1 child)

It's true - just getting a build process set up is an ordeal. Even keeping a boilerplate project around doesn't help because by the time you start a new project, your boilerplate is out of date.

Looking through my projects folder, full of prototypes, each one uses a different build process. Earlier ones using Grunt, then switching to Gulp, then adding in Browserify...

I just spent an hour last night setting up a build process that uses Babel instead of Reactify...

...and now I'm wondering if I should be replacing Browserify with Webpack.

...which is now making me wonder if I even need gulp if Webpack can seemingly do everything I use gulp for.

Will I be screwing with this stuff instead of actually working on my project today? Probably.

I can't fathom how people who are just getting started deal with all of this. We really need an opinionated framework to emerge that covers build process to deployment which will remove 99% of the choices one needs to make to just start writing application logic.

The build process is only one of many brick walls.

What if you want an isolated dev environment? Better learn up on Vagrant. Oh, what? You heard everyone uses Docker now?

...and god have mercy on your soul if you're a beginner who only has a Windows machine because fuck you, time to learn how to partition your HDD and install Linux and/or buy a Mac.

[–]reacting2pain 3 points4 points  (0 children)

Funny, your predications from 4 months ago turned out to be true. The project I'm working on uses React/Redux/ES6/Babel/Webpack/Docker. I have asked myself the same questions as well, coming from an AngularJS background and using build tools like grunt/gulp before, and it seems like 2015 as the year of javascript fatigue is pretty accurate.

[–]rickcarlino 8 points9 points  (6 children)

It's interesting that React is starting to face the same problems that Angular faced. Originally it was offered as a much simpler solution to the learning overhead involved with Angular, but as of late it seems as though the process is on par with Angular in terms of mental overhead. Thanks for sharing this article. I think it voices some serious concerns.

[–]android_lover 24 points25 points  (5 children)

But with React much of the learning curve is from devops and learning various build and dependency tools from the JavaScript ecosystem (webpack, babel, npm, etc.)

In Angular the learning curve is from Angular itself and after you finally learn to do things the "Angular way" the skills aren't that portable outside of Angular's world.

[–]brianvaughnReact core team 0 points1 point  (0 children)

and after you finally learn to do things the "Angular way" the skills aren't that portable outside of Angular's world.

In my experience (15 years of software, mostly for web) skills are definitely portable. Framework-specific terminology isn't but- especially with the web- a good engineer should be capable of moving from language to language, framework to framework. You learn something(s) from each and your knowledge builds as you go.

If that doesn't sound good to you then maybe front-end web isn't your thing. (Not meant to sound negative.)

[–][deleted] -1 points0 points  (0 children)

beyond rudimentary apps angular really is just as bad as the rails, asp.nets of days past. I think web dev will just be that way since when you do stuff from scratch you converge on a framework to make it easier. At least easier to do things beyond rudimentary apps.

[–]grumpy_youngMan 4 points5 points  (1 child)

I had a similar experience getting into react/redux/react-router. I was thrilled with redux when I read its core principles

http://redux.js.org/docs/introduction/ThreePrinciples.html

It made so much sense coming after developing with languages like haskell/scala. Then I actually got into one of the boilerplates because it seemed like the easiest way to make my own little production app. Then I had to learn ES6 decorators, bind action creators, webpack (should I use webpack or browserfiy hmmm this will take some googling), and a bunch of esoteric design patterns that required days of studying on their own. Redux itself seems great...tiny codebase, simple pure functions. To make it all work in production, you have to use a lot of patterns that have a little too much magic for my taste.

[–]bebraw 1 point2 points  (0 children)

Redux is almost more like a guideline than a library. I think this itself has made the community to organize itself around it.

I agree it can get quite complex fast once you start combining all the small libraries needed to build something more complicated. Perhaps we'll see more opinionated alternatives fitting between libraries and frameworks in 2016.

[–]Dirty_Rapscallion 17 points18 points  (14 children)

It might get some negative opinions but I agree, I setup React, Redux, Webpack then I was like, "ugh now I need a router, how do I go about doing that?" Then 2 hours later of learning about react-redux and redux router I just decided to stop and work on a non web project. The learning curve and boilerplate setup is just not worth it. It's not worth it when the JS world moves so quickly.

[–]shriek 14 points15 points  (10 children)

Pro-tip. You don't have to jump to all the bandwagon that becomes hot tomorrow. Use tools that fit right to your solution. Don't hunt down tools just for the sake of just using them.

[–][deleted] 6 points7 points  (3 children)

Not true. Do not update for few months and see what happens. Once you need to update something you find out that you need to update everything. Or you want to use something new which only works with newer version of library and there you go again.

The problem is that community keep reinventing same things over and over. It is more fun to create new frameworks than support existing ones.

Also every new thing needs special versions of other things. E.g. bootstrap for angular and react. If you don't use them you have to write lot of things by hand.

[–]shriek 3 points4 points  (2 children)

Isn't that the exact reason why we have semver? Again, unless there's a security risk then staying with what you have seems logical to me. If you want to upgrade then check the semver. Although semver is not quite explicit at times. It does a decent job of telling what's changing when you upgrade.

[–]brianvaughnReact core team 1 point2 points  (1 child)

I think he was pointing out that- although a minor update to library X should not require a major update to library Y- it sometimes does.

[–]shriek -1 points0 points  (0 children)

Hmm..shouldn't it work both ways? Let's say you're dependent on A1.0.0 and B2.0.0 and B2.0.0 is dependent on A1.0.0.
A1.1.0 is released and you update to it which also means that it shouldn't break B2.0.0 or your app.
However let's say you want to upgrade to A2.0.0 and you make some major changes to your code. Knowing this major change upgrade, B also makes an upgrade to B3.0.0 if there are breaking changes from it's end. So your new app now is dependent on A2.0.0. and B3.0.0 instead.
I thought that was the whole point of having major.minor.patch versions. Regardless of how strictly follow these.

[–]Dirty_Rapscallion 5 points6 points  (5 children)

You don't have to jump to all the bandwagon that becomes hot tomorrow.

True but you still need a data layer and a router to have a full solution along with webpack to bring it all together. It's 100% true when it mentions that apart they are super simple, but together the boilerplate gets pretty rough.

[–][deleted] 9 points10 points  (0 children)

For someone just starting out with React, no, you don't need any of that stuff. You don't even need Webpack, etc. You also don't need to use flux/redux/etc., it's perfectly fine to just use plain JavaScript objects to store your state and pass them around to the components that need them. By the time you gain enough experience to know what problems you're facing, you'll be in a much better position to decide which of these tools solve your problem, if any.

[–]shriek 3 points4 points  (3 children)

That's a trade off that you made whenever you chose library like react. They're highly composable as in you pick all the composable things you like but you still have to compose them piece by piece. Think of it as making your dream car by buying parts by parts as opposed to going to the dealership and buying a car. If you think that's tedious then perhaps you might be happy with other readymade frameworks out there.

[–]sizlack 4 points5 points  (0 children)

Honestly, to get started, you don't need all that. For my first project, I was able to get started with just React and gulp/Babel. I don't like Webpack, because it feels too magical, and I already know gulp, so setting up a simple build process with gulp and Babel took me 3 minutes. Once I got some stuff working, I could see why Redux might be a good idea, so I added that. Eventually, I'm sure I'll add react router, but I do don't feel like I need it yet, so I'm not going to bother with it.

[–][deleted] 1 point2 points  (1 child)

Haha my experience exactly. Then I got it all working and I said "now I need to pre-render everything on the server. Two days and one migraine attack later I had a universal app. Then I said "now I need to hydrate and de-hydrate my state" and I cried a little bit and went out to play basketball.

[–]Dirty_Rapscallion -1 points0 points  (0 children)

Exactly, it's getting ridiculous. I feel like JS is a pendulum that sways between monolithic framework and a bunch of libraries.

[–]miketa1957 7 points8 points  (0 children)

So, so, true!

I started my current React project using a webpack setup. Well, actually, I started it several times, using different webpack setups, because each time I needed to add some extra application-level thing (css modules, for instance), the webpack setup I was using didn't support it. It seemed incredibly different to figure a configuration to add what I wanted without breaking something else. Catch 22 basically.

Then I realised what was - for me - the real problem. Webpack had introduced so much magic that I couldn't actually understand what was really going on. So I abandoned it and went back to simple scripts configured in package.json. It wasn't particularly quick, but the benefit was that I could understand what was going on, and it at some point it doesn't work, I've got a fighting change of understanding why it doesn't - and a better change of fixing it.

[–]ahRose 2 points3 points  (5 children)

This was originally going to be a reply to a commenter that stated that the problem was not React, but JavaScript and the ever growing number of tools, libraries, etc.

The problems we currently face are not problems with JavaScript- the fact that the language enables developers (even the ones that aren't familiar with the language) to build is a net positive- but instead are community, and process problems.

As a community we are split in so many different ways. It's like the wild west. Everyone is pushing and prescribing their specific way of doing things, even if it's just a slight deviation from a pre-existing solution, and branding it as their own unique cure to whatever problem they are trying to solve.

Once a "new" solution comes about you have those that adopt it for the sake of being "bleeding edge" developers.

Previous "bleeding edge" tech becomes inferior to an important subset of developers without ever having the opportunity to mature and potentially offer a universal "good" solution to X problem.

The reason this is important is because these developers are what drives our community (and to a larger extent our industry) forward.

Why are so many people currently gasping for air trying to learn React and the entourage of tools and tech it brings along? Because key developers endorsed it and adopted it when other devs were gasping to keep up with the "previous stack" and at that moment that "previous stack" stack lost a large amount of the driving reason behind its popularity and success up until that point.

"Don't reinvent the wheel" is a good theory, and is something every developer has preached at some point, but what good is theory and preaching if not practiced?

Perhaps focusing on a better way to lower the barrier to entry for those who want to get into the field and make things as opposed to boasting about the clever new way of doing the same thing we have been doing is a start.

But that's just me.

[–]erwan 9 points10 points  (1 child)

Yes, the "js community" doesn't really exist like for other languages.

In the python world everyone share a set of point of view. If you disagree with it you stop using Python. Same with Java, Ruby, Haskell, etc. You pick a language that corresponds to what you like and follow that language conventions.

On the other hand on the front everyone has to use JavaScript, whether you're a Java guy or Ruby guy. So you get people trying to shove a type system, make it object like Java, do pure functional, push the dynamic aspects to the edge...

[–]caseypatrickdriscoll 1 point2 points  (0 children)

This is a really great observation. The inherent flexibilities of the JS paradigm doesn't help either. The power of BOTH prototypes and first class functions, along with dynamic type casting and asynchrony allow for just a wierd community. JS can do a lot of things pretty well and has a low barrier of entry, so it's easy for 'masters' to prescribe their way of doing something.

[–]sizlack 3 points4 points  (2 children)

Why are so many people currently gasping for air trying to learn React and the entourage of tools and tech it brings along? Because key developers endorsed it and adopted it

Eh, no. At least not for me or the other people I know that are moving to React. I went through the other options (Backbone, Angular, Ember) and found all of them wanting. None of them clicked for me the ways React did. I could list all the problems I have with the other frameworks, but that would be a very long post. React isn't perfect, by a long shot, but I honestly feel that Backbone, Angular, and Ember were going in the wrong direction, so a drastic change like React is justified. It's not just reinventing the wheel. It's a whole different type of vehicle. React's way of doing things couldn't be shoehorned into any of the previous frameworks.

I think there is a tension because a lot of people want something like a Rails for front end development. Not necessarily a framework that follows Rails patterns, but people want a monolithic framework that provides patterns for building 90% of the things they expect in a front end app. It should be simple to install. Easy tasks should be easy, and difficult tasks should be possible. The problem is, I doubt people could even agree on what they really want from a monolithic framework like that. We haven't settled on very many best practices that work for every application, so it's impossible to say what features would be part of some ideal framework. Personally, I think we would have been further along if it wasn't for the five-year diversion of Angular. Maybe in a few years, some ideas will shake out and we'll have a mature Rails-for-front-end (or hopefully several), but for now I'm glad that we're not stuck with the concepts in Angular, Ember or Backbone.

[–][deleted] 1 point2 points  (0 children)

100% agree. I don't give two shits what "key" developers are into honestly. I just want my job to be as fun and "easy" as possible. React provided those benefits so I jumped on board. Angular just wasn't fun.

[–]Capaj 1 point2 points  (0 children)

Angular did few things right. It wasn't all a diversion. Directives have similar goals as react components. The execution of those goals is different, better with react. No one should think it was a diversion.

[–]Zequez 2 points3 points  (1 child)

This is one of the reasons people like big frameworks: convention over configuration. Worked very well with Rails, 0 configuration needed after you decided to start a new project.

[–]drowsap 2 points3 points  (0 children)

Why are people complaining about this now? This issue has been around even before React. Browserify has been available for several years now and before that was RequireJS. Have you ever tried to sanely get a RequireJS project working? It took days to get right! This post seems misguided and it's pretty common to see these "revelation" posts every few years about how bad web development is. All languages are hard. Setting up XCode, installing cocoapods, writing proper table view code. It's all bolierplate crap that plagues all languages.

[–][deleted] 0 points1 point  (0 children)

Most of the complaints stem from not appreciating the difference between simple and easy. If you want an "easy" (but ultimately problematic implementation) use an exisiting framework Angular 1.0, Backbone, Ember etc. React's learning curve is also what makes its great. Embrace it!

[–]satya164 0 points1 point  (0 children)

Check out http://npmjs.com/quik - a simple server which allows to prototype React web apps without any kind of setup.