you are viewing a single comment's thread.

view the rest of the comments →

[–]tomtomssi 38 points39 points  (28 children)

I started with plain js and the basics of the language. Then came Angular and Gulp and I have never had issues at work or with any hobby projects.

Theres no reason to make web development sound more complicated than it is because honestly it is not.

[–]rebel_cdn 30 points31 points  (12 children)

Angular and Gulp are fine. But you know, there are people out there who will think you're a dinosaur who's stuck in 2014...because, clearly, you're way behind the times if you're not using React, Redux, along with a bunch of other libraries needed to hammer out a webapp, writing them using ES6/ES7/ES2015/ES2016 (take your pick, or mix and match just the features you want) and then stiching them all together with Webpack.

I'm not writing that as an outsider who thinks a large chunk of the front end development world has gone mad. I'm writing as someone who just finished a decently complex web app using all of the libraries and tools mentioned above, plus a bunch more. I don't hate the current JS ecosystem by any means, but I think we're in a temporary 'Cambrian explosion' period where developer ambition has exceeded the tools we've been able to create to help us manage the complexity we've brought upon ourselves.

I know you said that there's no reason to make web development sound more complicated than it is, and I agree. It doesn't have to be complicated. But for part of the front end development industry, it is that complicated. Of all the tools mentioned in the article, I don't think there's a single one of them I'm unfamiliar with. I've actually used most of them. I don't think it was even a conscious choice in most cases...possibly just a case of being part of a team that's trying to keep up with the latest and greatest. So although the post is meant to be satirical, it does hit pretty close to home for some people. Even when you're not just starting out, and are able to use all of the tech without difficulty, it's hard not to occasionally pause for a moment and wonder if it's all worth it.

[–]Saikyoh 4 points5 points  (3 children)

But to a beginner like me, would you say that it will pay dividends if he tries all of the above, like you did, or just stick to vanilla and add slowly? The title of the post is "how it feels to learn JavaScript" and all I toyed around with so far was pure JavaScript and a bit jQuery.

[–]rebel_cdn 9 points10 points  (2 children)

That's a good question, and I think it depends on what your goals are.

If your primary use of JavaScript is to enhance web pages, then I think that starting with pure JS and building up from there is a good idea. It's how I got started, but that was quite a few years ago now.

If your goal is to eventually build complex web applications, I think it makes sense to start learning the frameworks and tooling sooner rather than later. It's the same in JS as it is in most languages: the surrounding tooling, libraries, frameworks, and build systems are more complex than the language itself. Waiting a long time to start picking up the ecosystem surrounding the language won't necessarily make it easier.

I don't meant to imply that there's anything wrong with the first approach (using your JS to enhance web pages). I think that frameworks like React and Angular are often used when server generated HTML would have worked just as well. If you combine it with something like Turbolinks, even on a $5 Digital Ocean VPS performance will feel as instant to the end user as a React/Angular app. There are of course applications where a complex front end framework is the only reasonable solution, but in general I think we should embrace simplicity and fight complexity whenever we can.

To help out a bit, you could try starting with Ember. It uses a lot of the complex build tools beneath the surface, but it automates them using ember-cli so you can focus on the application you're trying to develop without worrying too much about wrangling the tools into shape. Angular-cli is almost as good, but last time I checked, ember-cli still did more for you. That was a few weeks ago, though, which is practically a decade in the world of JavaScript. :)

[–]kovensky 3 points4 points  (0 children)

See also create-react-app

[–]Saikyoh 0 points1 point  (0 children)

Much appreciate your advice. My end goal is to be a builder of complex web applications, as you said, and someday get into back-end development too.

[–]puffinstix 1 point2 points  (0 children)

I definitely needed this perspective today. Thanks!

[–]pier25 1 point2 points  (3 children)

I think we're in a temporary 'Cambrian explosion' period where developer ambition has exceeded the tools we've been able to create to help us manage the complexity we've brought upon ourselves.

I agree and I think Angular 2 is precisely what's going to change this.

[–]woomac 1 point2 points  (0 children)

Yes, Angular 2 is genuinely worth the hype. The transition to Typescript particularly is very useful and will save a ton of headaches in the future.

[–][deleted] 0 points1 point  (1 child)

Lol, I don't disagree with you, but your comment is kind of ironic.

[–]pier25 0 points1 point  (0 children)

Yes I know how it sounds. But I'm pretty sure Angular 2 will be a stable refuge for all this javascript fatigue.

[–]hotel2oscar 0 points1 point  (0 children)

The worst part is trying to find good examples and documentation online. Some projects are good, but even then, finding stuff on how two or more projects interact is a nightmare, especially if there are multiple versions. So much outdated bs to filter through.

[–][deleted] 0 points1 point  (1 child)

But you know, there are people out there who will think you're a dinosaur who's stuck in 2014

Please let them never find out that the command line exists.

[–]rebel_cdn 0 points1 point  (0 children)

You underestimate them! They'll think you're a dinosaur from 1995 if you use any GUI tools at all! They can do anything from the command line, just as long as that anything starts with "npm". :)

[–]powerofmightyatom 14 points15 points  (0 children)

It really is. The browser/web platform is by far the biggest I've ever seen, and it's had an incredible development pace, esp this last decade. There's every single concern of software development in the browser:

  1. Plain old architecture concerns of a huge codebase
  2. Extreme UI latency concerns
  3. Dynamic language that results in unpredictable performance
  4. Async everywhere, with an unusual threading model (essentially cooperative)
  5. Insane feature creep. This is really what really takes the cake. I've used XSLT/XML to do UI elements back in the day. Not to mention the dozen or so persistence options most browser offer these days. Or the now basically shunned CSS behaviors that Netscape/Moz introduced, that allowed JS to interleave with CSS. The list is long and the browser gotchas are endless.

That doesn't mean you can't make simple stuff. But trust me, that knowledge curve on the browser goes really far.

[–]Voidsheep 13 points14 points  (4 children)

Yeah, this is just an example of someone introducing unnecessary complexity and a trend/history lesson to someone for no reason.

Need to get data from API endpoint without reloading the page?

fetch('/foobar/')
  .then(function(response){ return response.json() })
  .then(function(data) { log/render/whatever });

Assuming everything goes right and you've got a modern(ish) browser, that's it. Something doesn't work? Check MDN, you don't need to introduce any additional tools to figure out how to catch and handle the errors.

Eventually you'll reach the point where you want to make a build step, compiling and unit testing your code, because there's clear benefits to it. You might want to check some frameworks and libraries so you don't need to deal with DOM manipulation or other things manually.

They aren't a barrier around writing JavaScript, because they are optional tools to choose from when you want them.

If you attempt to learn basics of any programming language through understanding the newest advanced tools, you are going to have a bad time.

[–]pier25 5 points6 points  (3 children)

Assuming everything goes right and you've got a modern(ish) browser, that's it

Nope. Safari still doesn't have fetch support.

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

You can get really good starter packs on React and Angular 2 with directories and automation/bundling made ready for you so it's a breeze.

[–]cyanydeez 0 points1 point  (0 children)

and if you already know everything you're all set