top | item 23117586

(no title)

aardvark1 | 5 years ago

I've working at large F100 financial services companies as an engineer and technical manager for 10 years. I've seen front ends built using a myriad of techniques and frameworks.

Leaving bytes and bundle weight aside, in 2020 JS frameworks like React are far and away the best approach for front-end engineering from a large organizational standpoint.

1)Not difficult to hire for. JS frameworks are currently in the sweet spot where they're both widely popular and "cool". Consequently it's not hard to find good candidates. That wasn't the case 5 years ago where React/Angular developers were still uncommon.

2) The HUGE and helpful community of developers. There are so many excellent resources for learning and solving problems with JS frameworks. JS developers are eager to show off on medium and similar sites. I've never seen such a large and enthusiastic community. This will inevitably subside as JS fall out of favor but I hope it doesn't for a long time.

2)Rapid UI development. The JS ecosystem make it easy to build UIs quickly that don't completely suck and look good for the ever-important demos to senior leadership.

3)Opinionated frameworks naturally enforce best practices and ensure relatively consistent architecture. This makes it easy to move engineers from one team to another and make grokking new codebases a lot easier. New engineers are productive quickly and begin creating value for the company. This was not the case with the inevitable jquery monstrosities that resulted after a critical mass of code or # of engineers.

4)Fewer bugs. JS ecosystem makes it very easy to write unit and integration tests.

Companies with IT budgets that are 9+ figures will happily pay for extra bytes across the wire in exchange for those benefits

discuss

order

fooey|5 years ago

One of my main things I argue strongly for on any new project is "don't do anything weird". Don't use weird fringe languages, don't use weird fringe frameworks. If the thing you want to do doesn't exist, think real hard about why it does not.

At my office, we've somehow ended up with a critical graphql server that's written entirely in Kotlin, which is cool but completely impossible to hire for or get any kind of community support for it. It feels like absolutely everything you want it to do, you have to do build yourself, whereas if we'd used a normal off the shelf graphql server it all already exists.

I'm so sick of maintaining old weird forks and unnecessary custom code that doesn't need to exist.

james-mcelwain|5 years ago

I think the advice is sound, but Kotlin and Graphql are pretty mainstream. This sounds like a local market problem.

karmakaze|5 years ago

I would further describe 'weird' as being out of the norm for the company and where hires come from. In general, I have a 'weird' budget of 1.0 thing(s) for non-critical projects.

Recently, I've been spending it on Vuejs/TypeScript (with Go backend) at a company that uses React/TypeScript, GraphQL, Rails/Ruby, and Go.

ng12|5 years ago

Absolutely agreed. I have never in my life had a stakeholder get on my case because our site was 3mb when it could have been 1mb. I have had many stakeholders get on my case because we couldn't turn around features fast enough, or the site was buggy, or our UX was worse than our competitors. Those are the things that the people who pay me and my team care about and if I could 10x our bundle size for a 1.5x improvement in development speed I would do it in a heartbeat.

untog|5 years ago

That depresses me because it's clear who is being ignored here: the user.

A 3MB bundle size instead of 1MB does make a difference, and if you're working on the kind of site that relies on conversions/purchases to succeed then you're absolutely leaving money on the table. Not to mention that Google factors in page load time to rankings.

> our UX was worse than our competitors

If your competitor has a < 1MB bundle and yours is 3MB then any user on a low end Android phone is absolutely going to have a worse UX experience. Maybe stakeholders aren't aware of all this. Maybe you should tell them.

tiborsaas|5 years ago

Dev experience and productivity is key, but don't forget that 10x bundle size has effects you can't simply dismiss. It does cause a UX problem since a slower pageload is part of the UX.

SEO. Google also takes into account page / paint times.

These are the things your stakeholders probably don't know about but you should.

thinkloop|5 years ago

Wait another year or two and your stakeholders will smarten up - users are noticing. Svelte JS, for example, has everything you listed minus the costs. React is very far from the end of the road.

milesvp|5 years ago

I was lucky at one point to work with product owners who understood that latency translated to lost revenue and so they helped champion the idea that engineering excellence was actually valuable, and that squeezing out performance was itself a worthy goal. It helped that we could compare our metrics to comparable sites, and could give upper management bragging rights when our pages loaded faster than bigger higher staffed “competitors”.

But otherwise, I think you tend to be right, in a lot of areas even an extra second of latency doesn’t matter, and more features will move the needle more.

goatlover|5 years ago

2 more MBs is going to matter to some users with limited data or bandwith.

nojito|5 years ago

>I have never in my life had a stakeholder get on my case because our site was 3mb when it could have been 1mb.

As cloud costs become tougher to swallow, this is going to change.

untog|5 years ago

The common thread in a lot of this is disregard for end user experience. But I think the biggest reason that these discussions never go anywhere is that people are using the same tools for wildly different purposes.

At a guess, I'd say that a webapp for a financial services company is going to be loaded once then interacted with heavily? Single Page App model. In that instance the time taken to download, parse and execute JS upfront isn't a big deal. Same as Gmail: when it loads, it takes a couple of seconds, then I leave the tab active for who knows how long. Plus in this situation the audience is relatively monolithic: a lot of desktops, and most of them fast.

The problem is people taking lessons learned in that environment and applying them elsewhere. Shopping sites, news sites, essentially anything that people arrive to from a Google search pay a much bigger price for a giant payload. Users can and will leave your site if it's taking too long to load. They'll be running on all kinds of devices, including low-end Androids with very underpowered CPUs.

Whenever I see a site like that implementing a full React page with Redux and who knows what else bolted on, I cringe. It's not an appropriate use of tools. But these days people only look at developer productivity (we can add so many more features so much faster!) rather than focusing on the experience in the user's hand.

metalforever|5 years ago

The extra bytes across the wire come at a cost of worse search engine performance (extremely costly for ecommerce) and bad accessibility for people using screen readers. #2 I also don't agree with. The JS ecosystem seems like the opposite of "build UIs quickly". You can't swing a stick without hitting like 5 tools you have to use.

nitsky|5 years ago

> This will inevitably subside as JS falls out of favor but I hope it doesn't for a long time.

I don't think JS will fall out of favor for a long time.

Languages that compile to wasm are unlikely to be competitive until native dom access has broad browser support, which could be years. On top of that, compilers will have to be written to do code splitting and compile times will have to drop.

Languages with strong type systems are unlikely to be competitive because TypeScript is good enough that JS projects are now manageable.

jve|5 years ago

> 1)Not difficult to hire for. JS frameworks are currently in the sweet spot where they're both widely popular and "cool". Consequently it's not hard to find good candidates

If someone is good at JS why not hot hire him? Wouldn't a professional be up & running with ANY framework you throw at him in a month or less?

scarface74|5 years ago

I know JS like the back of my hand, I’ve been working with it off and on throughout the years since it was first in beta for Netscape Navigator. I’ve had to do some relatively complicated JS logic on the front end and back end.

But, I wouldn’t work for any company crazy enough to hire me as a modern front end developer.

sbayeta|5 years ago

This is also true for other well established web (not JS) frameworks like Django or Rails

troughway|5 years ago

Not only this, but eventually we will ditch JS in favor of something more "isomorphic" with whatever the back-end is using.

Tech like Blazor and related asm.js type thinking will eventually replace JS when it bypasses asmjs completely and ships bytecode that the browser executes directly.

I doubt these frameworks will be much different compared to what we are doing today, because we will still need to deal with layouts, alignments, the color and shape and proportion of things, event handlers etc. The usual stuff.

Ragging on React, Vue, Angular is misguided. These frameworks allow developers to write front-ends as if they are applications, because in a lot of cases, this is what the modern "website" really is. They are training the next generation of front-end developers much like how jQuery did in mid 2000s.

nitsky|5 years ago

> Not only this, but eventually we will ditch JS in favor of something more "isomorphic" with whatever the back-end is using.

Why not use JavaScript itself for this? That is the strategy employed by Next.js/Nuxt.js/Sapper/etc. Your React/Vue/Svelte components are rendered on the server and then hydrated on the client.

james-mcelwain|5 years ago

That dream is already here if you use Clojure, and it's great! Web assembly makes me very bullish on this kind of setup. Maybe we won't even be targeting the DOM in the future?

nimmer|5 years ago

> eventually we will ditch JS in favor of something more "isomorphic" with whatever the back-end is using.

I think you are looking for Nim. It compiles to assembly (through C), javascript, wasm and more.

zankly|5 years ago

It’s like Java... tons of orgs will trade off perf to enable an engineering team of mixed quality to deliver projects.

gautamdivgi|5 years ago

What is wrong with java performance? I think the garbage collection in Java is probably (if not) one of the best.

Start-up times are an issue. But once warmed-up the JVM is very performant provided tuned well.

eitland|5 years ago

Except Java is extremely performant and if your engineering team doesn't know exactly what they're doing there's often a good chance they'll both use more time and create a slower product with a low level language as far as I know.

xeromal|5 years ago

Exactly. Ensure the average developer can contribute. Of course top tier devs can deliver better products using bare JS.

scarface74|5 years ago

It’s completely different. Java is a back end language - even if we accept that Java is 20% slower (just making up a number. I don’t know whether it’s slower or not), hardware is cheap and you control it. You don’t have any control of the client’s computer or their bandwidth.