News for hackers. Stuff that matters.
Re:I’m Joining LinkedIn by kethinov on Wednesday January 04, 2017 @07:23PM (#13323541)
> Perhaps you can write a tiny web app that loads instantly and still retains a full set of features, but most of the world cannot.

I've long been skeptical of this line of thinking emanating from major thick client JS framework authors. I think they underestimate what people are capable of.

> Over time, Ember will become like gcc -O3 for web apps, intelligently optimizing them and delivering them as fast as possible, piece by piece, to your user’s browser.

I've been observing these trends for years and what I'm seeing is this: ever since these new thick client JS frameworks became so trendy, web performance has dramatically decreased, not increased.

This one-two combo punch of framework authors condescending their users as "our target audience is devs who can't hand code" while simultaneously promising performance that's just as good as hand coding and perpetually failing to deliver is a toxic stew that is crippling web performance.

Re:I’m Joining LinkedIn by lcw on Wednesday January 04, 2017 @09:01PM (#13324075)
As software developers I think its easy for us to jump on this bandwagon that if you hand code all the things then you can make a super fast site and the internet would be such a wonderful place; and then thinking its all those heathen script kiddies using these junk JS frameworks slowing our browsers down.

I know I'm guilty of this line of thinking so I'm not judging, but I also think many companies big and small are actually making rather rational decisions when it comes to site performance and the use of JS frameworks. For instance where I work its common for us to knowingly slow down performance on a given page because the feature makes the company X money that offsets the performance loss and the time and money it would take to make it perform better. This compounds over time, but all along the way the business is making reasonable decisions. Frameworks like Ember allow great developers to add powerful features quickly for the businesses to monetize on. I don't think we should write off performance initiatives in these frameworks just because we know they won't live up to a vanilla JS implementation. I also don't think its fair to disparage the movement of thick JS frameworks on these grounds. Many of start-up's and large companies wouldn't be able to lift off products as quickly as they have without the head starts that frameworks such as Ember have given them.

Re:I’m Joining LinkedIn by kethinov on Wednesday January 04, 2017 @09:45PM (#13324291)
The bandwagoning is disproportionately on the side of those leaning towards big frameworks. Look, I've been on the inside of large companies making framework choices and rarely is the decision rational. Often it's based on what's popular and based on the assumption that popular things are popular for good reasons. Biased metrics get thrown around to justify preconceived notions, and off to the races we go. Years later, everyone sees the old stack as "old and outdated" and a strong desire to throw it all away and rewrite it with the new hotness takes hold. Then the entire irrational process repeats itself.

I'm not saying the big trendy thick client JS frameworks are the wrong tool for every job. But in my experience they do seem to be the wrong tool for an alarming number of jobs they are presently being used for. And I'm not just spitting rhetoric here. I'm more than happy to put my money where my mouth is. If you want to know specifically when I think a big thick client JS framework might be the right tool for the job and when it probably isn't, this article does a good job of outlining that: https://www.sitepoint.com/javascript-dependency-backlash-myt...

As for the tradeoff associated with developer productivity vs. performance, there is some validity to that. However, I think people overestimate the developer productivity gains the frameworks offer. You only get productivity gains if your whole team is already fully trained on the framework. And in addition to the performance tradeoffs, you also risk your codebase having a shorter lifespan because the framework may make breaking changes to its API some day (e.g. Angular 1 -> Angular 2), whereas a vanilla JS implementation that relies on smaller, single purpose JS libraries will age considerably better.

Re:I’m Joining LinkedIn by addicted on Thursday January 05, 2017 @12:15AM (#13324942)
Large companies almost by definition need to hire a lot of developers. Seems to me that it would be an absolutely rational and sensible choice to use popular frameworks keeping those constraints in mind.

Google would go bankrupt from a combination of the insane salaries they'd have to pay and the inability to ever fill jobs if its entire stack was based on Haskell.

Re:I’m Joining LinkedIn by Ar-Curunir on Thursday January 05, 2017 @01:36AM (#13325216)
Probably not; people would just learn Haskell.
Re:I’m Joining LinkedIn by sjg007 on Thursday January 05, 2017 @02:05AM (#13325317)
And that would be so amazingly beautiful.
Re:I’m Joining LinkedIn by cocktailpeanuts on Thursday January 05, 2017 @04:31AM (#13325891)
Google will hire people who can write good vanilla JS code, not someone who's good at the latest fad js framework. In fact, if you're good at writing vanilla JS, you would probably pick up these frameworks overnight.
Re:I’m Joining LinkedIn by yoz-y on Thursday January 05, 2017 @04:54AM (#13325969)
Pickup a framework overnight results in shoehorning your current knowledge into the framework and late night rants about how the framework sucks.
Re:I’m Joining LinkedIn by cocktailpeanuts on Thursday January 05, 2017 @05:37AM (#13326115)
It was a figure of speech! :)

My point was that unless you're a small startup with very specific need for the tech stack you're using, you probably shouldn't be hiring based on whether the candidate knows certain framework, because that can be learned quickly, as long as the developer has solid foundation.

Re:I’m Joining LinkedIn by lawik on Thursday January 05, 2017 @05:29AM (#13326085)
I'd say it depends on the framework a lot.

Many frameworks deeply affect how the code is written and have very specific boilerplate, custom templating and such. And some frameworks simply offer means of doing some things in an easier, usually specific, way with the relevant language.

In my experience it is also highly relevant how your thoughts on architecture match up to the framework's. I'd say you can happen to have a solid affinity for the way a framework is thought out. But in general, I'd agree, overnight is generally not sufficient for anything proper :)

Re:I’m Joining LinkedIn by rangibaby on Thursday January 05, 2017 @07:28AM (#13326581)
I plead guilty
Re:I’m Joining LinkedIn by danenania on Thursday January 05, 2017 @08:02AM (#13326758)
People focus on frameworks and popularity, but as someone who builds a lot of complex front ends, what really matters to me is architecture--architectural simplicity and architectural scalability.

Before trying React/Redux, I was against js frameworks too. They all seemed to add a whole extra layer of unnecessary mutable state to keep in sync, and required lots of cruft and duplication. Just give me coffeescript, underscore, and jquery, thank you very much. I composed nice little modular components that latched on to server-generated html, kept state to a minimum, and used a global event bus to deal with interdependence. It had some warts, but it got the job done and scaled up reasonably well. It certainly beat procedural jquery spaghetti and I thought it beat the current crop of frameworks too--what it lacked in polish, community, and standardization were made up for by modularity and simplicity.

Of course, then I discovered React, and more recently, Redux. I immediately realized that it was the culmination of what I'd been trying to do all along. It was basically the same idea, but battle-tested, standardized, and infinitely more elegant. So why wouldn't I use it? Sure, there was a learning curve while I got used to other people's way of thinking about and expressing these concepts. Rather than designing the system myself and knowing it like the back of my hand, I had to learn a whole new vocabulary and toolchain. But it was so, so worth it in the end. I'm still building apps with an architecture I believe in, and I get all the benefits of a well-supported framework to boot.

So, to finally get back to the central point: never once was popularity an important factor in my decisions, and I suspect this is also the case for many many others who adopt one framework or another. Not everything that's popular is only popular due to a bandwagon effect--sometimes the shiny new thing really is a big step forward.

Re:I’m Joining LinkedIn by lcw on Wednesday January 04, 2017 @10:10PM (#13324380)
I think your points have some weight to them. Specifically I 100% agree that JS frameworks are at times misused, and in lots of situations are completely unnecessary. However, my point is the valid use cases for these JS frameworks warrant the open source investment that many community members are pouring into them.
Re:I’m Joining LinkedIn by kethinov on Wednesday January 04, 2017 @10:24PM (#13324437)
That I completely agree with. And to be clear, while I disagree with some of what Tom Dale says sometimes, he's a very talented guy. LinkedIn is lucky to get him and I think it's entirely a good thing to see another prominent open source project get some corporate support.
Re:I’m Joining LinkedIn by Bahamut on Wednesday January 04, 2017 @11:36PM (#13324776)
I think we see many here pump up their abilities that they could homebrew an excellent implementation of [insert special feature] better than [insert framework/library]. Truth is, I don't trust most software engineers to do that without a vetting of some sorts, and open source software provides that. I consider myself pretty good, having done some serious open source work in the frontend world, but if I had to homebrew a framework like React and all of the pieces to make it work (or Angular, even with my intricate knowledge of it), I would not be able to match everything with performance, flexibility, and good API signatures. Most developers are not experienced with thinking about all 3 factors in tandem, and it shows with the code that is written on a typical basis.
Re:I’m Joining LinkedIn by sotojuan on Wednesday January 04, 2017 @08:54PM (#13324040)
Unfortunately a lot of us in HN make our living writing thick clients that ultimately perform worse than server-rendered apps with little benefit. It's just too easy to find a front end dev job that pays well, at least where I live.
Re:I’m Joining LinkedIn by haimez on Wednesday January 04, 2017 @09:18PM (#13324161)
Maybe you should find any of the websites that profit from faster load times and argue the business value. Because that's most of the places.
Re:I’m Joining LinkedIn by mercer on Thursday January 05, 2017 @05:04AM (#13325996)
I've suggested just that at multiple companies, and even if the business value was acknowledged, the usual (informal) response boiled down to "it won't impress my boss as much as new feature <x>, and there's no reason for me to argue with them about this".

And so we'd put another ad somewhere on the page to increase revenue, instead of decreasing the page load time down from 5-10 seconds with some truly trivial low-hanging fruit type adjustments (lazy-loading anything but the 'core' images, etc.). Or we'd do another redesign. Or add a widget somewhere.

What bothers me most is that these kinds of jobs were generally the highest paying and lowest in stress and 'friction' with the client. And I'd do them, telling myself that with the money I was 'saving up future time', all the while feeling incredibly depressed whenever I came home from work or had a moment to think about the current state of my life.

I always pitied the (shockingly high) number of employees in these companies, predominantly managers, who absolutely hated their jobs and constantly talked about 'one day I'll quit and do <x>' while never doing it because, well, the money and stability. Ever since I realized I was basically doing the vey same thing, I've been trying a little harder to find a balance between 'saving up'/stability and enjoying my day to day. And in my field that should be possible.

Re:I’m Joining LinkedIn by di4na on Thursday January 05, 2017 @02:35AM (#13325424)
From my pov : welcome to the fact that a huge part of the web still is handled by tons of never finished perl script and old Js stuff, that had to scale and evolve despite noone making it scale and evolve.

It is closer to that. We got a ton of new things, but never the budget nor time to go fix the old thing.

Re:I’m Joining LinkedIn by sangnoir on Thursday January 05, 2017 @04:47AM (#13325943)
>> Perhaps you can write a tiny web app that loads instantly and still retains a full set of features, but most of the world cannot.

> I've long been skeptical of this line of thinking emanating from major thick client JS framework authors. I think they underestimate what people are capable of

Sometimes even when you can, you shouldn't. Any reasonably-sized organisation will have churn; new developers will have to ramp-up and it will take longer to do so on a hand-coded framework with all it's idiosyncrasies. I'll take Ember over Random Jim's framework, even though he is technically brilliant.

Re:I’m Joining LinkedIn by gizmogwai on Thursday January 05, 2017 @05:14AM (#13326031)
Thing is, by the time you have to take back this application for maintenance, chances are high that the then mainstream framework will be outdated, newcomers won't even know it, the doc will have vanished in a poor "let's move to this new shiny TLD", and still the business logic of the application will be vastly undocumented as well.

I was on your side for a long time, but I've come to appreciate a minimalist, simple, well documented in-house framework over a hype-driven "solve-all-the-thing" one, even free and with a currently big community.

Re:I’m Joining LinkedIn by jeanlucas on Wednesday January 04, 2017 @11:54PM (#13324861)
> I've been observing these trends for years and what I'm seeing is this: ever since these new thick client JS frameworks became so trendy, web performance has dramatically decreased, not increased.

I am in the Emberjs community, I do not observe this in that framework.

Re:I’m Joining LinkedIn by kethinov on Thursday January 05, 2017 @12:26AM (#13324983)
Well I have observed it. I've worked on many projects that used one of the big frameworks (including Ember.js projects) that would've been better off with vanilla JS and a collection of small JS libraries instead. I'm not going to name names, but they're out there. It's a tool that does get misused, like any other.
Re:I’m Joining LinkedIn by zackthehuman on Thursday January 05, 2017 @11:25AM (#13328427)
Recent releases of Ember actually reduced the output size (sometimes in the high double-digit percent) and Glimmer 2 improved rendering performance. Sometimes the needle moves back after work internal to the framework.
Re:I’m Joining LinkedIn by kethinov on Thursday January 05, 2017 @02:59PM (#13330793)
Yep. And to play devil's advocate for a moment, I've really been impressed with fastboot too. I think it's a great idea. Overall things are certainly heading in the right direction, but I just wish we hand't sunk so low from a performance and robustness (progressive enhancement) standpoint first.
Re:I’m Joining LinkedIn by andylei on Thursday January 05, 2017 @12:43AM (#13325031)
yes, but there are plenty of projects that would not be better off with vanilla js
Re:I’m Joining LinkedIn by scaryclam on Thursday January 05, 2017 @09:33AM (#13327335)
And there are also plenty that would be better without any js at all
Re:I’m Joining LinkedIn by Bombthecat on Thursday January 05, 2017 @02:03AM (#13325314)
Yeah! It feels like we are in the 90s again! Where you got flash videos but only a 54k connection. It is not faster...At all. just. slower and slower..
Re:I’m Joining LinkedIn by Silhouette on Thursday January 05, 2017 @11:59AM (#13328833)
>> Perhaps you can write a tiny web app that loads instantly and still retains a full set of features, but most of the world cannot.

> I've long been skeptical of this line of thinking emanating from major thick client JS framework authors. I think they underestimate what people are capable of.

I am also skeptical, but for a slightly different reason.

I believe the original statement from the article is true today.

I also believe things would be very different if the same web developers we have today spent less time learning new frameworks every five minutes and more time learning the fundamentals of the underlying technologies (JS, HTTP, and so on), broader skills like programming and UI design, and more professional practices like standardisation and backward and forward compatibility.

So many tools in web development today are merely papering over the cracks that other tools unwittingly created in the first place. The advocacy of using these kinds of tools to be more future-proof or standardised than building with solid fundamentals is one of the greatest ironies in programming history.

Re:I’m Joining LinkedIn by twblalock on Wednesday January 04, 2017 @08:37PM (#13323954)
Which frameworks claim to target "devs who can't hand code"?
Re:I’m Joining LinkedIn by mikekchar on Wednesday January 04, 2017 @11:14PM (#13324679)
To a certain extent all of them do. "devs who can't code" is hyperbole, but the whole point of a framework is to provide a framework that allows you to fill in the details without building all the plumbing underneath.

This is distinct from a reuse library where you write the plumbing while someone else has written the details of some functionality.

Often you get these super-frameworks that do all the plumbing for you and throw in veritable kitchen sinks of reuse libraries with the intent that you glue it all together to match your business logic. Very frequently this is the stated aim of these super-frameworks -- reason only about your business logic and leave all the details to us.

It is a compelling story, but usually one that doesn't have a happy ending. The devil is in the details. Your business logic usually requires you to hack something that the framework/library authors didn't anticipate. That hack leads to 10 more as you route around the "it isn't supposed to be done this way, but what could we do" mess. Over time it degenerates.

Then you hire old guys like me who are willing to accept money to grind out all the problems without quitting in a huff and running to the new shiny ;-) (only because our legs are tired from running after shinies when we were young).

There are lots of reuse libraries and even minimal frameworks who specifically say, "You're going to have to wire this up yourself. We're not going to make it easy for you. That's because we can't anticipate the problems you will run into and we are trying to give you as much space as possible to figure out how it should be done".

I like frameworks and libraries like that. I don't like the other ones, even though they generally pay my salary.

Re:I’m Joining LinkedIn by stupidcar on Thursday January 05, 2017 @04:29AM (#13325882)
Purely anecdotal. Got any statistics to back up your opinions?
Re:I’m Joining LinkedIn by kethinov on Thursday January 05, 2017 @03:03PM (#13330835)
If you google for stats on the average size of webpages these days, you can see a bunch of studies people have done which show the average file size of website page loads is increasing. Images are the biggest offender, but JS bloat is a significant factor as well.

FWIW this is generally common knowledge within the webdev community. People debate whether or not it's a problem, not whether or not it's happening.