Live data from Hacker News

Why is modern web development so complicated?

vrk.dev

321–330 of 731 posts

Re: Why is modern web development so complicated?

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

The statefulness of jQuery is a massive cognitive load.

Re: Why is modern web development so complicated?

#322

Earlier quoted context omitted.

No, you're not right. How you render CSS and the page have very little to do with how secure your app is. SQL escaping, session handling, etc all come easily with standard php libraries. So "I didn't bother with any PHP frameworks" doesn't mean the dev wrote an SQL connector.

I'm sorry if you thought I meant CSS rendering was the source of potential vulnerabilities, but for any website that has, say, users, if you're not using any PHP frameworks or external libraries you might have to implement some crypto of your own to store passwords securely, just for starters. I don't think PHP offers a standard library to do that, does it? There are a hundred examples that are specific to whatever a…

[deleted]

Re: Why is modern web development so complicated?

#323

Earlier quoted context omitted.

No, you're not right. How you render CSS and the page have very little to do with how secure your app is. SQL escaping, session handling, etc all come easily with standard php libraries. So "I didn't bother with any PHP frameworks" doesn't mean the dev wrote an SQL connector.

I'm sorry if you thought I meant CSS rendering was the source of potential vulnerabilities, but for any website that has, say, users, if you're not using any PHP frameworks or external libraries you might have to implement some crypto of your own to store passwords securely, just for starters. I don't think PHP offers a standard library to do that, does it? There are a hundred examples that are specific to whatever a…

> if you're not using any PHP frameworks or external libraries you might have to implement some crypto of your own to store passwords securely, just for starters. I don't think PHP offers a standard library to do that, does it?

It does, actually: https://www.php.net/manual/en/intro.password.php

Re: Why is modern web development so complicated?

#324
So... let me get this straight. You are making a website. You do need to load some changing data into it, so just a static site will not cut it. But we want to keep things simple. All we really need are a few AJAX calls and some DOM updates. And just like the author mentioned we don't want to write old clunky JS, we want to write beautiful ES6 code. So we install babel for ES6. And we install jQuery to do our AJAX and DOM stuff. Turns out that if we want to make AJAX calls to our API server, we cannot just load the file in the browser, it expects a server. We look briefly at installing nginx or apache and it seems like a lot of trouble. But we do discover webpack dev server. That's perfect. So we install webpack and configure the dev server. Since we are doing it, we might as well make it run babel for us. And while at it, we might as well do the bundling. Especially, since we would like to use a couple of other NPM modules. Nothing major, just convenience things. And since we are using the dev server anyway, we add hot-reload support. And a minifier, so we can have a minified production build.

So now we are using HTML, CSS, jQuery, babel, webpack, webpack dev server, webpack hot reload plugin, webpack plugins to load resources and a minifier. But hey, keep it simple, right?

Re: Why is modern web development so complicated?

#325
post #311

Earlier quoted context omitted.

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

The statefulness of jQuery is a massive cognitive load.

Perhaps for an SPA, though lots of what I see React used for doesn't need to be, or isn't, an SPA.

Re: Why is modern web development so complicated?

#326
post #217
post #195

Earlier quoted context omitted.

If it is just validation a js framework would be overkill. jQuery would fit well here.

You missed the multi-page forms part. As soon as you have state of some fields affect how other fields or parts of the page display it becomes complex really quickly. There is an explosion of possible states. If you've ever seen code like this, you know why more modern js frameworks were invented: onSomethingChanged() { $('#foo').prop('disabled', true); $('#spinner').removeClass('invisible'); $('#error-1').prop('hidd…

I think he would model that as POSTing. Server side PHP would render document from scratch from the state.

Re: Why is modern web development so complicated?

#327
post #150

Earlier quoted context omitted.

GitHub works without JS just fine. Switch it off. In fact, I'm pretty sure Github is rendered server side for the first load. You shouldn't be seeing any spinners. I'd check if I wasn't on my phone.

Nope, the content is loaded dynamically from their API after the rest of the page has loaded: https://i.imgur.com/Kxs9l7j.mp4 Sure, the list of my repositories is server rendered, but I already know my list of repositories. The thing I'm waiting for 99% of the time when loading github.com is to see if there's any new activity. Sorry about the graphical glitches, blame nvidia or xorg or gnome or something.

Likely because the list of repositories changes infrequently, so it's a better candidate for caching. They serve what then can quickly, quickly, then pull in the naturally slower stuff later.

Re: Why is modern web development so complicated?

#328

Earlier quoted context omitted.

> I don't think PHP offers a standard library to do that, does it? https://www.php.net/manual/en/password.installation.php "There is no installation needed to use these functions; they are part of the PHP core." The functions are common knowledge in the community, and made to be easy to use. > Further, the expertise I do bring to this conversation is in software development, and I can say assuredly that a one-man dev…

I don't think someone nitpicking between the definition of the words "framework" and "library" is engaging in this conversation honestly, and I'm pretty sure that your failure to address the "this is but one of hundreds of examples, not all of which are covered by standard libraries in PHP" comment I made is further justification of that belief.

In the context of web development, they are generally considered as distinct.

Re: Why is modern web development so complicated?

#329
post #315

Earlier quoted context omitted.

I'm sorry if you thought I meant CSS rendering was the source of potential vulnerabilities, but for any website that has, say, users, if you're not using any PHP frameworks or external libraries you might have to implement some crypto of your own to store passwords securely, just for starters. I don't think PHP offers a standard library to do that, does it? There are a hundred examples that are specific to whatever a…

"There are a hundred examples that are specific to whatever app this guy built for the Healthcare company, not all of which are covered by the PHP standard library." You would need to implement whatever custom code required or use a libruary. You would need to do the same with a framework. No framework offers business health care functionality. Do you think laravel has an ocr skin cancer detector package? PHP is fast…

PHP isn't the problem, the claim that there are no security issues despite hand rolling every feature is the issue, and it's in no way accurate.

A lot of bad software engineering going on in these comments, downvotes don't change that...

Re: Why is modern web development so complicated?

#330
post #15

Earlier quoted context omitted.

I think we’ve done a great job of convincing each other within our tech bubble than everyone wants a SPA. Not sure the general public cares for our enthusiasm though.

This, this, this. Users didn’t ask for magazine websites - which should be serving up, y’know, images and text - to sit and spin on my phone while all the Javascript libraries load. Users didn’t ask for these things; we as a community just decided to foist it on them.

A lot of the slowest stuff on websites are trackers that are being foist on developers to foist on the users (if the developers even have control over the trackers, like with GTM)
Post reply on HN