Live data from Hacker News

Why is modern web development so complicated?

vrk.dev

701–710 of 731 posts

Re: Why is modern web development so complicated?

#701
post #614

Earlier quoted context omitted.

I wish we could get away from the fashion show in this industry. Currently we have a React frontend, which just adds extra complexity for no real benefit. But its fashionable.

React (and other SPAs) may be fashionable , but I generally contend that--when written well or even passably , which obviously requires an asterisk lest the Scotsmen come by but I don't think is a very high bar--if nothing else it requires developers to treat a web application as a client of an API rather than tightly integrating it. It enforces a level of separation of concerns that, IME, tends to encourage loose co…

SPA apps will decouple the backend from the front end, but the front end will always be specific to a backend in the vast majority of cases. I don't see how that is so different from templates being rendered on the server.

Old school server side rendered apps are underrated and its perfectly possible to make something that looks and behaves as well as a SPA app for most things.

Re: Why is modern web development so complicated?

#702
post #360

Earlier quoted context omitted.

It's silly to do a round trip to the server just to change some local UI state, right?

Not really, this kind of thinking is exactly what led to the client-side JS framework mess. Round trips are just fine. Browsers are smart, servers are fast, and HTML compresses well. The site you're reading right now (HN) requires a reload. Stackoverflow requires a reload. Neither are slow to use. If your page is really that complicated, then I suggest Vue or Preact which are efficient and designed to progressively e…

Connectivity is not always available, and errors retrieving it may mean you have to re-enter everything. Being able to "navigate" the site without the dinosaur is a tremendous boon for end users. You wouldn't be able to send anything without a connection, but you could buffer it for an opportune moment.

Sites like HN and Stackoverflow have a vastly different audience than most bread-and-butter sites, and tackle different kind of issues.

Re: Why is modern web development so complicated?

#703

It doesn't have to be complicated, if you get support from above. A few weeks ago I launched a new web site for a health care company. HTML, PHP, CSS, and MySQL. No frameworks. No javascript. No garbage. It replaced a site that was a mess of javascript libraries on top of frameworks on top of a half dozen jquery version and on and on and on. The company administrators, doctors, practitioners, etc... are so happy with…

>HTML, PHP, CSS, and MySQL. No frameworks. No javascript. No garbage.

The funniest comment I have read on this website.

Re: Why is modern web development so complicated?

#704
post #59

Earlier quoted context omitted.

Did you consider that the next developer might well come along and post a similar comment: > It replaced a site that was pretty much a home-grown PHP framework written by a single developer. Random mixed logic in templates, hard to update CSS and a poorly designed 'not-an-ORM' ORM. Not to say that your rewrite is like that, but one man's garbage is another man's treasure.

> Did you consider that the next developer might well come along and post a similar comment "After me cometh a Builder. Tell him I too have known." http://www.kiplingsociety.co.uk/poems_palace.htm

Thank you for introducing me to this wonderful poem.

Re: Why is modern web development so complicated?

#705

Earlier quoted context omitted.

The trouble is that "don't build shit software" isn't actionable advice on how to avoid building shit software. For someone seeking to be a more skillful web software engineer, there's no information there.

This is fundamentally because our industry is built on opinions, not standards. You talk to one software engineer, and they'll say, "that's built in PHP, so it sucks; it should have been built with npm, obviously." Then you talk to another and they say, "I can't believe they built that with npm, the package management system is just terrible and the whole mess is bloated and there have been a ton of security issues.…

We can't even accurately estimate the cost of a complex project given our choice of tools

We've been building bridges for thousands of years, and still the relatively simple bridge they built down the road from me took 2.5 years to complete instead of the estimated 9-12 month.

Re: Why is modern web development so complicated?

#706

Earlier quoted context omitted.

Not really, this kind of thinking is exactly what led to the client-side JS framework mess. Round trips are just fine. Browsers are smart, servers are fast, and HTML compresses well. The site you're reading right now (HN) requires a reload. Stackoverflow requires a reload. Neither are slow to use. If your page is really that complicated, then I suggest Vue or Preact which are efficient and designed to progressively e…

Connectivity is not always available, and errors retrieving it may mean you have to re-enter everything. Being able to "navigate" the site without the dinosaur is a tremendous boon for end users. You wouldn't be able to send anything without a connection, but you could buffer it for an opportune moment. Sites like HN and Stackoverflow have a vastly different audience than most bread-and-butter sites, and tackle diffe…

Most bread-and-butter sites are just fine as server-side rendered page. Large client-side frameworks reimplementing the browser and server functionality should be rare, when the situation actually calls for it.

If you really need a offline site then a simple service worker is all you need to cache the pages, not a big JS app.

Re: Why is modern web development so complicated?

#707
post #311
post #84

Because it had to play catch up to native apps feature wise due to demand, while building upon a base that wasn't intended for that, while serving the same app to literally thousands of different environments and expecting it to work perfectly. Thus, growing pains and overly complicated frameworks/plugins/other bits slapped together to address the core issues which ballooned the complexity. But we all knew that. What…

"What's more impressive is that things are getting less complicated." Over what timeframe? While it certainly had its own issues, the HTML5/jQuery pairing easily fit into your head. Notwithstanding the benefits, React, packers, routers, and the 10 other things you bundle, is a cognitive load. Doesn't help that the routers and 10 other things don't come with React, and so, choices vary across teams.

There are many JS libraries that are wonderfully simple. I think the problem is:

- Too much choice; it's insane how much you have to decide before you get started: React or Vue? SSR or SPA? REST, GraphQL, or RPC? PostCSS or Sass? CSS-in-JS? What router? Redux or stateful components? Axios or Fetch API? Client-side rendering/routing or server-side rendering/routing? Webpack, Parcel, Create-react-app, Next.js, or Gastby? And the list goes on... I mean that's just nuts.

- State management is inherently complicated; people don't realize that 90% of the case you don't need interactive / stateful views to build a product. People implement bunch of useless interactive "niceness" that are overkill because React allows them to. If you use React as an HTML template engine then React is actually super simple and super neat.

How awesome would it be to have a framework that has sensible defaults for all these questions. And that educates how to decide certain crucial aspects.

For example:

- Use plain old HTML instead of interactive views if you can.

- Don't start with Redux. Instead, use Redux only after you know exactly why you need Redux.

- Use a RPC-like API (e.g. https://github.com/reframejs/wildcard-api) and only use REST/GraphQL if you need to expose your data to third parties.

- Use server-side rendering/routing if your app is mainly about content (a blog, a newspaper, a e-commerce shop, ...).

- Use client-side rendering/routing if your app is mainly about user interactions (a music player, an email app, a graphical editor, ...).

That's what I'm trying with Reframe: https://github.com/reframejs/reframe

Re: Why is modern web development so complicated?

#708

I think a lot of programmers forget the purpose of programming is for an end result. Instead, they focus on ever more complexity to feel superior to their peers. "Look what I can do" attitude. This reminds me of the Nasa space pen, when Nasa spent a million to develop a space pen and the Russians just used a pencil.

According to this[1] and many other articles, the NASA space pen story is just a myth.

1. https://www.scientificamerican.com/article/fact-or-fiction-n...

Re: Why is modern web development so complicated?

#709
It isn't. Unless you make it complicated. Developers spend time making things complicated. And then more time complaining that things are complicated. Followed by even more time "solving" what is complicated by making it complicated in different ways. Repeat. Yawn.

Re: Why is modern web development so complicated?

#710
post #691

Earlier quoted context omitted.

There is: it's the Internet. Also, native applications aren't crippled...

Have you ever tried to support a native application? There's a reason why the web is the preferred mode of delivery over the internet.

Sure, I do. And it doesn't seem that people that still have to support Internet Explorer have a much easier time considering that they seem to have settled on using a whole additional layer of abstraction !
Post reply on HN