Live data from Hacker News

Why Learning Angular 2 Was Excruciating

hackernoon.com

161–170 of 226 posts

Re: Why Learning Angular 2 Was Excruciating

#161
post #22
post #6

I've found that learning new technologies from first principles is better than starting with frameworks, unless you're willing to put up with a lot of ambiguity. For example with Javascript I'd start with basic manipulations (e.g. get to know the prototype model, the debuggers, the DOM, etc.), work up to a make-life-easier library like JQuery, then try a framework. It may depend on your learning style, of course.

This is exactly the path I've taken. I figured if I start out with right off the bat, and not understand the foundation, I'd be screwed in the long run. My reasoning is that once I grasp JS's quirks/ins/outs (I'm looking at you 'this'), well I'd be ready to see the light and better choose a framework. So far, I think ReactJS nailed it, but keep in mind I am fairly new to Web Dev (coming from PC/Console/C++ world) so…

Personally, I think Mithril.js has done a better job than React of "nailing it" in terms of elegance, but it had the advantage of React bulldozing the path.

I'm not new to JS, and React's approach was the first one in years that I found very interesting in a way that didn't feel bloated or over-engineered out of the gate.

Re: Why Learning Angular 2 Was Excruciating

#162

Earlier quoted context omitted.

I don't think the idea of "planned" breaking changes every 6 months to be such a bad thing. A major release twice a year that you can upgrade to when you're good and ready. Sounds like a way to prevent having to completely rewrite from the ground-up to keep up with the web a la angularjs. I like React because it's a lot smaller but I totally see the advantages of Angular 2 and I kinda dig the major release cycle.

This release cycle is fine so long as you don't rely on anything but Angular 2. As soon as you rely on packages that support Angular 2, the 'good and ready' argument breaks, since you can't start till all the packages you rely upon have already made the upgrade, and you can't take to long either, because you can't expect further work or fixes to be made to older versions of the packages. 12-month breaking changes, th…

This makes the improper assumption that you're forced to upgrade. The code for Angular 2 will not evaporate when Angular 3 appears - at that point the choice to upgrade to the latest version is just that: a choice. You are free to wait until Angular 4 comes out before you adopt Angular 3 if you want to make sure the ecosystem around it is solidified.

Re: Why Learning Angular 2 Was Excruciating

#163
post #127

Earlier quoted context omitted.

One other project comes to mind that also updates every six months: Ubuntu. Last I checked, their ecosystem was doing fairly well. I wouldn't consider Ubuntu "unfinished" unless we're talking about the state of all software everywhere.

Ubuntu also has LTS releases for this exact reason.

Once the framework has actually shown some degree of maturity I don't think it would be unfair to ask the Angular team for an LTS version of Angular.

Re: Why Learning Angular 2 Was Excruciating

#164
post #117

Earlier quoted context omitted.

Lmao, this is exactly how I've felt, and why I'm using ordinary js with closures and a bit of jquery for the time being while I get up to speed and figure out wtf is going on. "Javascript the good parts" has served me well.

Eh, it really is not that bad. With just React and a fetch polyfil (to replace jquery's ajax) you can get pretty much the same power as with just jquery. This will all settle down in a year or two, once we get the most basic features built-in into browsers. Like for example modules + HTTP2 will probably mean no more bundlers or build tools (which is where the vast majority of this craziness is coming from)

Made the switch to HTTP/2. Using push with minified/gzipped/cached assets. Loading all my assets is typically a 6ms affair for all of react, react-dom, redux, custom JS, custom CSS, and additional PWA files. Mind you, dev machine.

Re: Why Learning Angular 2 Was Excruciating

#165
post #76

I've said it before here and I'll say it again: the JS ecosystem is moving in the wrong direction. Sometimes I feel that with Javascript, we developers have taken something that wasn't ours, and we're in the process of destroying the best thing there ever was about it. One of its best qualities used to be that you could have absolutely no idea what you're doing, read a few bad tutorials somewhere on the web, mash you…

Uhm, why can't we have both?

Sure, Mr. Bakery, do everything in jQuery in a tag. I'd even argue that's probably the correct approach.

But I don't work for a bakery -- I work for a large company with a complex tech stack writing web applications that will have to be maintained by some poor sucker long after I move on. Tools like React/Angular, Webpack, and npm allow me to do that in a way I couldn't as little as 3-4 years ago.

I see comments like this in every one of these threads. It's shocking to me how misunderstood web development really is. If the web was meant to be strictly utilitarian we never should have moved off gopher.

Re: Why Learning Angular 2 Was Excruciating

#167

Earlier quoted context omitted.

Tell me about it! Literally all you need is React. Oh, plus react-router for routing, I guess. And Redux, obviously. Plus react-router-redux to link them together, and react-router-scroll for scroll history. Also react-intl to handle internationalisation. And react-helmet to do document header stuff. You'll need to use immutable as well, obviously , so you'll need redux-immutable. And redux-saga. Hmm, you'll definite…

I've used React by itself for over a year before I ever reached for anything else you mentioned there. I eventually picked up many of the other things you mentioned too, and they were very useful, but they were very far from being necessary to make use of React, and I probably would've wanted them or something close if I didn't use React.

they may not have been necessary for your projects, but they're absolutely necessary for any real-world production grade apps. Angular is solely targeted in that direction. 90% of the React examples I see when I interview people are handlebars/mustache 2016, and would be better solved with server-side rendering in the first place.

Re: Why Learning Angular 2 Was Excruciating

#168
post #143

Earlier quoted context omitted.

I miss the days of the plain-old html web. It might have been ugly, and there might have been marquees and blink tags, and under construction signs, and webrings and webmasters, but it loaded over my 56k modem, nobody was screwing with my back button, or messing up scrolling, or popping modals in my face, or pestering me with anti-anti-anti-ad-blocking nag modals and interstitials.

I was just reading a blog post where a guy had written about Steve Reich and Brian Eno's experiments and his attempts at replicating them. It was posted on HN a few days ago: http://teropa.info/blog/2016/07/28/javascript-systems-music.... There are embedded YouTube videos, MP3s, and code samples to illustrate what he's writing about. He's implemented their ideas using the Web Audio API and you can run the code from w…

> It's a real testament to how great the web can be

Doing something in a browser that we could do 30 years ago on a desktop isn't that great a testament.

Re: Why Learning Angular 2 Was Excruciating

#170

Earlier quoted context omitted.

"tiny" nope.

import React from 'react'; import ReactDOM from 'react-dom'; function App(props) { return Hello {props.name} ; } ReactDOM.render( , document.getElementById('root') ); Or the alternative component API that has componentWillMount, componentDidMount, componentWillReceiveProps, shouldComponentUpdate, componentDidUpdate, componentWillUnmount, and render. That's pretty much all there is

If that's pretty much all there is, you'd be better off saving ~150kb and just using ES6 template strings.
Post reply on HN