News for hackers. Stuff that matters.
Re:Why Learning Angular 2 Was Excruciating by janfoeh on Monday September 19, 2016 @05:28PM (#12534899)
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 your head onto the keyboard and end up with something horrifying that was nevertheless close to what you wanted to achieve. It was beautiful, egalitarian. Like the web is supposed to be.

I've spent quite a bit of time on Stackoverflow, coaching people who you would not call developers (nor would they themselves) on how to do that one tiny thing they wanted to add to the site for their bakery, yoga studio or blog. And almost got it working themselves. I know of no other language that can tell a similar success story, with that high an impact.

Just insert that <script> for that jQuery plugin here and modify that initializer over there with a vague understand of how it needs to be adapted to your situation. Voilà!

But we couldn't let that stand, could we? Because what works for Alice and Bob doesn't work for somebody writing that 200.000 line image editor or CRM in JS, and let's face it, that's what the web is about.

So here we are, the single <script> tag having been replaced with compilers, transpilers, five mutually incompatible build systems, three different module systems in God knows how many implementations, frameworks changing their API every ten minutes and five thousand lines of NPM module code to be installed for even the simplest of tasks.

We did it, gals and guys! The web is safely back in the hands of full-time professionals (with Hindu cow-like frustration tolerance). Where it belongs.

Bah.

Re:Why Learning Angular 2 Was Excruciating by Andrex on Monday September 19, 2016 @05:38PM (#12534977)
I get where you're coming from but your comment boils down in favor of unoptimized and insecure code. And I can't agree with that.

I would also point out that the web is the most backwards-compatible platform of all time and Alice and Bob can continue doing their thing for as long as they want.

The tools that professionals use today are an abstraction to increase efficiency and reduce code reuse, in the same way most programmers don't code assembly or C anymore. I'm not sure every part of the modern web stack is a universal good, but I'd be lying if I didn't say I'm more pleased coding on the web today than I was hacking together a Geocities page in my teenage years.

Re:Why Learning Angular 2 Was Excruciating by janfoeh on Monday September 19, 2016 @05:52PM (#12535087)
I appreciate your position, I really do. It's not like I am clear-cut on this myself, even if my frustration makes it sounds like I am. I appreciate that the language, the platform and the web itself needs to evolve.

But I object to the argument that people can just continue to do their thing, because people in that position are overwhelmingly dependent on the ecosystem. Guidance, libraries, tools. And that ecosystem has left them behind, or is at least very far along that road.

Of course reasonable people might disagree, but to me, that people might write unoptimized (or just plain horrible) code is a very, very small price to pay for the empowerment the web delivers to them. And as to "insecure" - Jane and Joe want to show a slideshow of their hand-baked Macarons, not write banking auth systems. If they manage to open up a security risk, the attack surface is usually rather small, and the fault lies with the platform.

No, I stand by this: Javascript was our generations Hypercard, on steroids, and we've almost completely squandered its potential.

Re:Why Learning Angular 2 Was Excruciating by Andrex on Monday September 19, 2016 @06:22PM (#12535263)
It's certainly an interesting conundrum, and I agree that eventually without ecosystem support Alice and Bob might find things a little tough.

However, it's important to realize that the way the web is moving is to not only benefit the working professionals being paid to write it, but also the consumers who experience it.

Why do we have minifiers and transpilers and modules and font icons? Why do we aim for one script tag instead of 50?

Because for a consumer, the web sucked (and still sucks to an extent, but less so with AMP and offline APIs.) For "prosumers" like Alice and Bob, it was a buffet, but for people browing their web pages it sucked. It was slow and unresponsive and that's even before the rise of the mobile web.

And whether the ecosystem leaves them behind or not, Alice and Bob can always create a new slideshow.js file on any given platform they want.

The web is moving towards being better for professionals and consumers, and I agree that those in the middle might lose out a little, but they are very small peanuts. I'd rather optimize for the next billion users in Africa, India and beyond, most of whom are on sub-2G speeds, than for the script kiddies making an easy living pilfering jQuery widgets without learning the platform.

Re:Why Learning Angular 2 Was Excruciating by douche on Monday September 19, 2016 @06:33PM (#12535328)
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.
Re:Why Learning Angular 2 Was Excruciating by barryhoodlum on Monday September 19, 2016 @06:58PM (#12535479)
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 within the page and listen to the music being generated in real-time. It's a real testament to how great the web can be.

I think being able to do things like that is worth all the annoying parts of the modern web, in the end. For the developer and the end user. I wouldn't want to go back to the old way. I think it's easy to focus on the annoying parts and take the good parts for granted.

Re:Why Learning Angular 2 Was Excruciating by flukus on Monday September 19, 2016 @07:45PM (#12535702)
> 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 by barryhoodlum on Monday September 19, 2016 @07:54PM (#12535755)
But you're clicking on a link, not downloading and installing an application.
Re:Why Learning Angular 2 Was Excruciating by flukus on Monday September 19, 2016 @08:16PM (#12535893)
You are downloading an application, arguably installing one temporarily too.

Is this that much more efficient than "apt-get install foo"?

Re:Why Learning Angular 2 Was Excruciating by ecnahc515 on Monday September 19, 2016 @10:05PM (#12536476)
Yes, because it means all my users can install the same application and I only have to write it once for all platforms.

Not every platform/OS even has a (good) package manager. So I think this alone is what makes the web great.

Re:Why Learning Angular 2 Was Excruciating by chiefalchemist on Monday September 19, 2016 @10:50PM (#12536647)
True. But users don't care. Not only that, such ease had only created more noise and less expertise. Piss all you want about MS and Apple back in the day but they understood quality control. Today? Ha. We just have lower expectations. We accept shite because we have no other choice.

Furthermore, free isn't free when my privacy is sold and/or my eye balls are subjected to even more ads. This is progress? No fucking way.

Re:Why Learning Angular 2 Was Excruciating by sangnoir on Tuesday September 20, 2016 @02:44AM (#12537619)
> Piss all you want about MS and Apple back in the day but they understood quality control

I don't know what you are on about as there weren't any app stores controlled by Apple or MS. Anyone was able to release crap software on floppy disks or BBS, and they did.

Re:Why Learning Angular 2 Was Excruciating by flukus on Monday September 19, 2016 @11:27PM (#12536805)
Which platforms don't have good package management? Linux has, if anything, too many. Windows has chocolatey. Apple has homebrew. Writing portable applications can be done in a variety of ways and packaged for each platform.
Re:Why Learning Angular 2 Was Excruciating by ajbetteridge on Thursday September 22, 2016 @11:51AM (#12557699)
Windows might have chocolatey, one among a small number package managers for Windows (including the bleh Windows 10 Store), but not being baked into the OS distribution means the average user isn't going to install it. Users want what's already in the Start menu/page, not something they have to go to a site, copy some (as far as they know) random text, paste it into a power shell, and then hope it works. You effectively need a package manager to install the package manager. That might be ok for your power users, but the average person what wants to install GIMP because he's been told by his mate down the pub that it's "like a free Photoshop", would rather go to the GIMP site and download it, he won't even know about chocolatey because he's so used to using Windows without a package manager that he'll just Google "GIMP" and hope the fist link is the right one. Windows missed the boat on package managers and the Windows 10 Store definitely does not make it any easier.
Re:Why Learning Angular 2 Was Excruciating by joshcrews on Monday September 19, 2016 @06:57PM (#12535475)
the advance of minifies and transpilers and modules doesnt seem to increase page performance. one of the effect of it being so efficient to minify and transpile is that large imports and frameworks are easier to use, and that boosts the total JS lines of code, making the JS parsing take a long time, and the page performance get "janky"
Re:Why Learning Angular 2 Was Excruciating by chiefalchemist on Monday September 19, 2016 @10:44PM (#12536625)
Mediocrity expands to fill the space and time available.

Mediocre solutions are fixed with an endless array of tools. Learning tools takes time. And that's just to break even. And around we go again.

Can we really say the average web experience is better than the average of 10 or just 5 years ago? (Hint: Nope.) Find someone who is less frustrated with technology and you'll find someone who has given up on technology.

Re:Why Learning Angular 2 Was Excruciating by Andrex on Monday September 19, 2016 @07:09PM (#12535542)
Good point. And you could argue HTTP2/SPDY and GZIP makes concatenating and minifying files even less of an issue.

I'm not sure it's completely comparable though, file sizes would have increased even without minification.

Re:Why Learning Angular 2 Was Excruciating by rsyntax on Monday September 19, 2016 @06:19PM (#12535245)
jQuery still exists. IMO, the ecosystem has just moved towards rich-client front end applications. There was no good tool/framework for that and people started fulfilling that need. Of course you could write like you said "unoptimized (or just plain horrible) code" which in an actual application is huge price to pay. I think it all boils down to being able to use the right tool for the job. I wouldn't advise using React or Angular to show static content e.g an splash page.
Re:Why Learning Angular 2 Was Excruciating by rpeden on Wednesday September 21, 2016 @10:13AM (#12548296)
The catch is that using NPM and CommonJS modules for front end packages makes it so that tools like Rollup and the Closure compiler can't do the kinds of optimizations they are capable of. The code we ship is doing a lot of runtime dependency resolution that could be done at compile time if we constructed our modules properly.

I think that many of the front end tools we use now result in an optimized developer workflow, but usually not optimized code.

Re:Why Learning Angular 2 Was Excruciating by lmkg on Monday September 19, 2016 @06:44PM (#12535391)

  > 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 your head 
  > onto the keyboard and end up with something 
  > horrifying that was nevertheless close to what you 
  > wanted to achieve.

  > I know of no other language that can tell a similar 
  > success story, with that high an impact.
I assure you, the same is definitely true of VBA.

And I agree with your overall point. Shitty code often makes the world a better place. It gets a bad rap from developers because we compare it to good code. But shitty code written by non-devs is not replacing good code, it is replacing an absence of code. And shitty code, for all its sins, is still often better than no code at all (which usually has the same sins).

Re:Why Learning Angular 2 Was Excruciating by janfoeh on Monday September 19, 2016 @06:53PM (#12535446)
> Shitty code often makes the world a better place.

That's one of those things I have probably read - and agreed with - a hundred times before, but never that succinct.

I will make that mine; I hope you don't mind.

Re:Why Learning Angular 2 Was Excruciating by ng12 on Monday September 19, 2016 @07:25PM (#12535610)
Uhm, why can't we have both?

Sure, Mr. Bakery, do everything in jQuery in a <script> 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 by flukus on Monday September 19, 2016 @07:49PM (#12535721)
> 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.

Or rewritten because the flavor of the month has changed.

>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.

What exactly couldn't you do 3-4 years ago that you can now?

Re:Why Learning Angular 2 Was Excruciating by ng12 on Monday September 19, 2016 @10:47PM (#12536634)
The big shift has been from managing complexity to avoiding it where possible, encapsulating it when not. In my current favorite webstack, every logical view is abstracted behind an API (which happens to be a React Component). Internally, everything about that component is encapsulated -- the internal implementation, the sub-components, even the CSS thanks to CSS Modules. In fact, if I really had a reason to write a specific component in Angular or jQuery I would be able to: it's easy to embed non-React code inside React, and as long as it exposes a top-level React Component I'm hunky dory. I refer to React because that's my library of choice -- but you can say similar things about Angular and Aurelia.

This has only been something we've gotten right over the last few years. jQuery trampled all over the DOM, data-binding heavy frameworks like Backbone were impossible to reason about, Closure Library turned your Javascript into Java-flavored spaghetti, Coffeescript was basically Perl, and CSS was global by default. Now React lets me write perfectly performant abstractable code. Redux lets me manage state in a functional, reproducible way. Webpack supports CSS modules which let me write sane styles and code-splitting so I don't need to worry about managing resources. Typescript lets me write code that's safe and easy for others to consume. ES6 modules allow me to actually architect my codebase without shoving everything onto window. And the ringer is I'm not married to any of these technologies -- I can scalp out Redux for another data store, Typescript for Babel, go back to global CSS, etc.

Writing UI code is hard, and I'm not sure why some HN folks assume web developers are ignorant. Web apps are a HUGE hack, and it's funny to me that a forum dedicated to hackers has so many who shun it for that reason. It's not "flavor-of-the-month", it's finally making progress towards a really hard problem in really exciting ways.

Re:Why Learning Angular 2 Was Excruciating by gaius on Tuesday September 20, 2016 @05:17AM (#12538158)
Writing UI code is hard, and I'm not sure why some HN folks assume web developers are ignorant.

But it really isn't and the proof is HyperCard from the 1980s. It's only hard because you have made it hard, for no reason that anyone can fathom (apart perhaps from job security).

Re:Why Learning Angular 2 Was Excruciating by ng12 on Tuesday September 20, 2016 @10:51AM (#12539940)
I'm very curious what kind of web apps you think people are building. HyperCard was great for demoware -- and if you were to try and make it into a real production-ready tool you'd get VBA.

Do you really think everybody -- from Android/iOS to Swing to qt to Web 2.0 -- just had no idea what they were doing?

Re:Why Learning Angular 2 Was Excruciating by flukus on Monday September 19, 2016 @11:30PM (#12536816)
> Writing UI code is hard, and I'm not sure why some HN folks assume web developers are ignorant.

Probably because every feature you listed was achievable before react.

Re:Why Learning Angular 2 Was Excruciating by gaastonsr on Monday September 19, 2016 @11:59PM (#12536950)
I just want to hear your answer with one of those...

How did you do type checking before TypeScript (or the like) in JS? give me a real answer.......

Re:Why Learning Angular 2 Was Excruciating by flukus on Tuesday September 20, 2016 @12:21AM (#12537031)
I didn't, and you didn't mention type checking above.

One very common way though was to avoid the need for it altogether in javascript, by rendering html on the server.

Re:Why Learning Angular 2 Was Excruciating by ng12 on Tuesday September 20, 2016 @12:22AM (#12537039)
That's a different poster, and I did mention it above.

What does server-side rendering have to do with Typescript? Are you advocating avoiding javascript all together?

Re:Why Learning Angular 2 Was Excruciating by flukus on Tuesday September 20, 2016 @12:36AM (#12537099)
Sorry, I missed that, I was replying to the parent comment only.

But yes, I do advocate avoiding javascript altogether whenever possible (which is more often than current trends). There were a number of other transpilers too, all of which were a pain and I don't see how typescript is going to improve on that.

Re:Why Learning Angular 2 Was Excruciating by ng12 on Tuesday September 20, 2016 @12:20AM (#12537026)
I actually regret writing out such a detailed reply. Congratulations, you're a top HN troll.
Re:Why Learning Angular 2 Was Excruciating by gaastonsr on Tuesday September 20, 2016 @08:02PM (#12544396)
Great answer. Sometimes I hate HN for people like above.
Re:Why Learning Angular 2 Was Excruciating by DigitalSea on Monday September 19, 2016 @07:11PM (#12535548)
I sometimes yearn for the days of the simple script tag that seemingly gave us the world at our fingertips. Especially when I have spent hours trying to get tooling to work alone. The constant updates, deprecation of libraries and tools before they even hit version 1.0, it can be tedious.

Having said that, I think in the case of the direction of Javascript itself: I believe it is going in the right direction. ECMAScript 2015 was a mammoth release that really took Javascript in a nice direction, the smaller ES2016 release adds a few minor features and ES2017 is shaping up to be another monumental release for Javascript. The ecosystem as you mention is really in a confusing state at present.

The only constant in all of this is Javascript. We are living in an era where things are being deprecated before they even hit 1.0. The one part of front-end development heading in the wrong direction is the questionable design choices of frameworks like Angular and React. The only framework I have seen which is abiding by actual web standards is Aurelia. The lack of Aurelia specific concepts means you're not committing to something proprietary you're stuck using, like the case with Angular 2 and ReactJS.

Then you have the elephant in the tooling room: Webpack. People are using it, it is becoming increasingly popular in the front-end space, but it has basically no documentation and it is incredibly confusing. People are using it, without even understanding it or knowing how to use it. Mostly learning from blog posts and StackOverflow. Webpack 2 looks promising, but it probably won't have any documentation either.

It is almost like nobody seems to plan anything, choosing to develop and release off of the cuff. Even when Babel dramatically broke things out and changed the way it works for v6, that was a painful experience for the ecosystem in itself. Then you have System.js, JSPM and other tooling/module loaders breaking things every release.

Re:Why Learning Angular 2 Was Excruciating by rpeden on Monday September 19, 2016 @05:52PM (#12535082)
Don't worry too much.

I don't see browsers dropping ES5 support any time soon, and jQuery isn't going to disappear.

There will still be plenty of opportunity for people to jump in seize great market opportunities using PHP, jQuery, and chewing gum while all of us full-time professionals are here on HN arguing about Angular vs React and whether npm is insane, awesome, or both.

Re:Why Learning Angular 2 Was Excruciating by janfoeh on Monday September 19, 2016 @06:07PM (#12535165)
Thank you, and I hope you are right.

Again, don't get me wrong - when I was writing what was called DHTML almost fifteen years ago, I would have killed for the APIs, capabilities and cross-platform stability we have today. It's a good thing. Lots of shiny.

I simply feel that this is a concern that doesn't get enough attention, certainly not around circles like these that in the end drive the further evolution of development on the web platform. And that we collectively would do well to at least acknowledge the trade-offs we're making in the process.

Re:Why Learning Angular 2 Was Excruciating by erikpukinskis on Monday September 19, 2016 @10:04PM (#12536471)
I feel the same. I've just straight up stopped using frameworks. I refuse to use ES6 or any module which depends on it. No more coffeescript, no SASS. No promises, no templates.

And really, what all of this boils down to is: avoid declarative control structures at all costs. Procedural design by default. There are a handful of situations where I will build a declarative API, but they are rare. I will use libraries, but only if they have a single well defined purpose and are largely procedural.

The result? It's wonderful. All of my code is completely traceable. If something doesn't work, I never have to go read online for an hour, dig around in the source code for random modules trying to understand boot and build processes well enough that I can form a hypothesis about where a bug is. I just start at whatever point my expectation is violated, and work directly back to whatever is broken.

I can always insert a debugger statement, and instantly stop state either in Node or in the browser. The execution path and data handoffs never disappear into a mysterious framework or executable. The code in production is always in . or ./node_modules.

The entire class of headaches so prevalent in Rails/Ember/every other declarative-is-best system are just gone. Granted, I deal with other headaches. I have to really think about how data moves through the system. I can't just add a flag to access data from one end of the system in a totally different part of my app, because there's no magical framework code using light AI to figure out how to marshal data around based on some declarative configuration conditions.

Essentially what I've decided is it's better to sacrifice convenience in order to get inspectability. You lose speed in your initial hacking, but you gain a predictable pace of debugging. Bugs never really stay mysterious longer than 15 minutes or so. I never have those instances where I spend a whole workday scratching my head about framework internals.

I do spend a day scratching my head about how my data should be structured and how it should flow through the system. But that's effort that will continue to pay dividends. It generally leads to better interfaces that require less maintenance. Work that is often continually put off when you have a framework that offers every shortcut that could be sanely crammed into it.

Re:Why Learning Angular 2 Was Excruciating by patj on Thursday September 29, 2016 @08:37AM (#12604760)
You can still do all of those things you're talking about. In most cases you don't even need jQuery anymore and can just use browser APIs.

Why do you argue about something that clearly doesn't interest you? From a so-called professional: It's perfectly fine to continue doing websites the way you do if that works for you and your client. End of story.

Everything else that confuses you is just the world of software getting bigger, Javascript being used in different places, people trying out things and promoting them, good stuff, bad stuff, you know – like the real world. Imagine knowing every aspect (political, economical, social) of a larger city and you would go crazy as well. Breathe and relax.

Re:Why Learning Angular 2 Was Excruciating by spankalee on Monday September 19, 2016 @07:09PM (#12535540)
Complex frameworks have historically made up for a lack of capabilities, starting with the lack of a component model and composition facilities.

This is changing for the better with web components. Now you'll be able to have just a `<script>` tag and define a component and use it in markup. It'll be even simpler than jQuery, and saner at the same time.

So you can do this:

   <script>
     class MyElement extends HTMLElement {
       constructor() {
         super();
         console.log('yay!');
       }
     }
     customElements.define('my-element', MyElement);
   </script>
   <my-element></my-element>
And use no external libraries at all.
Re:Why Learning Angular 2 Was Excruciating by untog on Monday September 19, 2016 @06:09PM (#12535177)
jQuery isn't dead - they're still releasing new versions. You can still do everything you used to be able to. But now you can also do more - you can sensibly modularise your code. Virtual DOMs bring huge performance boosts with very little work.

IMO, the JavaScript ecosystem has matured. Sometimes in weird ways that aren't great, but it's still better to have an irritating package manager than no package manager at all. But there's no price to be paid here - if you don't want to use any of it, you don't have to.

Re:Why Learning Angular 2 Was Excruciating by Zelphyr on Monday September 19, 2016 @06:14PM (#12535221)
The problem is, it has become popular in our industry to equate new with "quality". So, while you're correct that jQuery isn't dead and in fact is more mature, there are too many who won't use it almost because its mature. Its not the new shiny that it once was. But frameworks like React and Angular are very shiny. Even though, in my opinion, they're quite simply a mess.
Re:Why Learning Angular 2 Was Excruciating by untog on Monday September 19, 2016 @06:16PM (#12535227)
I think there is an element of people using things because they are new and shiny, yes. But plenty of people use React and Angular over jQuery because they make 1000x more sense when putting together a large web application with multiple developers contributing to the codebase.
Re:Why Learning Angular 2 Was Excruciating by janfoeh on Monday September 19, 2016 @06:36PM (#12535344)
Sure, for larger projects a good, well-thought out and consistent framework is a godsend. No doubt about it that plenty of people make very good use of the frameworks and libraries at our disposal.

But on the other hand I cannot count the number of times I've seen Angular included for a simple contact form with validation on a static site, React to render a single trivial dynamic list or a nice, but basic JS lib that only works in module form via NPM exports.

Sorry if I sound like a fortune cookie, but it's true - if all you've got is a hammer, everything looks like a nail.

Since 2001 or so, I can count on three fingers the number of variable collisions I have experienced in small- to medium scale projects. That I as a newbie now have to understand and manage various module systems in order to embed a lightbox on my site is a huge jump in complexity for a gain that is at best negligible in practice.

And while you and I probably have worked on some higher-complexity use cases, I think we would be kidding ourselves if we assumed that this constitutes the majority of the web.

Because that's not Facebook-scale, it's the dude around your corner selling dishwashers and reparing washing machines, trying to get his inventories's prices from an Excel sheet onto his page with a minimum of fuzz.

Re:Why Learning Angular 2 Was Excruciating by stephenhuey on Monday September 19, 2016 @08:13PM (#12535871)
And the number of Aurelia users is rapidly rising not only because it's new and shiny and easier to build complex web apps, but also because it's more natural and standards-compliant than frameworks such as Angular. A natural reaction to seeing what's missing or going down the wrong path (as in the case of Angular 2).
Re:Why Learning Angular 2 Was Excruciating by tim333 on Tuesday September 20, 2016 @01:32PM (#12541326)
>Virtual DOMs bring huge performance boosts with very little work.

Do they? In most tests I've seen straight javascript / jquery on the DOM is faster. eg. https://objectpartners.com/2015/11/19/comparing-react-js-per...

Re:Why Learning Angular 2 Was Excruciating by flukus on Monday September 19, 2016 @07:52PM (#12535743)
It's also a lot less necessary than it was because browser compatibility has improved. Last time I did a mobile web app I seriously considered removing it because it was heavyweight and I was only using a few functions. I didn't, due to time constraints, but I could have.
Re:Why Learning Angular 2 Was Excruciating by altern8 on Monday September 19, 2016 @06:08PM (#12535175)
You can still do the exact horrible thing you're describing.

However, JavaScript now gets used by real programmers for real applications, and has therefore evolved to accomodate for that.

You're saying (incorrectly) that now inexperienced programmers can't put crappy scripts online without knowing what they're doing and hope the thing works. Well, you can still do that, but you can also actually learn the language and build serious stuff.

I can't see how this is the wrong direction for JavaScript.

Re:Why Learning Angular 2 Was Excruciating by oldmanjay on Monday September 19, 2016 @05:44PM (#12535022)
If it were impossible to trivially build low-function websites, you'd have more impact with your point. As it stands, it comes off more like union guys complaining that hardworking people make them look bad.
Re:Why Learning Angular 2 Was Excruciating by Zelphyr on Monday September 19, 2016 @06:09PM (#12535178)
Seems to me OP is stating the exact opposite. That the JS ecosystem used to be more egalitarian with a much lower barrier to entry than (ironically) what frameworks like React and Angular provide.
Re:Why Learning Angular 2 Was Excruciating by oldmanjay on Monday September 19, 2016 @06:20PM (#12535253)
If the OP is stating that it is possible to trivially create low-function websites then I am befuddled. Why complain that what is wanted is achievable?

Or perhaps this is one of those things where people assert that the existence of things they don't want to use is somehow offensive. Still isn't a very helpful point to make.

Re:Why Learning Angular 2 Was Excruciating by khedoros on Monday September 19, 2016 @08:18PM (#12535904)
> Or perhaps this is one of those things where people assert that the existence of things they don't want to use is somehow offensive.

It could be related to the signal-to-noise ratio. If I'm a non-dev looking to throw something together and 98% of the information I find is about some pro-level frameworks, it'll be hard for me to sort through that and find information appropriate to my skill level, level of interest, and needs.

Maybe it's still a net-gain for the world as a whole, but it's certainly a loss for the non-dev. It makes the learning curve (perhaps needlessly, perhaps not) more regressive.