Live data from Hacker News

Advice to Young Web Developers

tumblr.beesbuzz.biz

11–20 of 328 posts

Re: Advice to Young Web Developers

#11
post #4

This sounded more like a anti-SPA post. Maybe the title should be "Reasons for not building a SPA".

SPAs are an anti-pattern. Let's rebuild html rendering, navigation history, forms, etc, all with Javascript, because it's the hip thing to do.

There are very clear reasons for SPAs to exist.

1) Prevent reloading of the page every time the user clicks a link, reducing the overhead of fetching common content between pages multiple times (headers, menus, etc) and providing a more seamless experience to the user.

2) Better emulate the feel of mobile applications, for users who spend most of their time on their phones and don't often or have never interacted with a computer. Yes, those exist.

3) Improved network performance (by sacrificing initial load time). Once the browser downloads and caches the bundle on initial load, the user can revisit the page on regardless of their connection stability or speed.

This isn't to say SPAs are a perfect choice in all cases (they also have just as clear drawbacks), but saying "it's what everyone does" is the only reason they exist is downright false.

Re: Advice to Young Web Developers

#12
post #4

This sounded more like a anti-SPA post. Maybe the title should be "Reasons for not building a SPA".

SPAs are an anti-pattern. Let's rebuild html rendering, navigation history, forms, etc, all with Javascript, because it's the hip thing to do.

I've never heard that somebody disliked vmware vsphere as an spa. the older flash one however...

Re: Advice to Young Web Developers

#13
post #4

This sounded more like a anti-SPA post. Maybe the title should be "Reasons for not building a SPA".

The most common reasons for building a SPA:

* That is the design pattern dictated by your large framework.

* Maintaining state is absurdly simple, but it requires original code if not using a big framework.

* The browser provides a simple standard API for interacting with HTML, but your framework provides abstractions you didn’t know you could live without.

That’s it. Developers twist themselves in knots trying to qualify their opinions as anything more valid than what sounds like incompetence, but with any level of informed discussion it’s clearly about competence (or insecurity).

Re: Advice to Young Web Developers

#14
post #4

This sounded more like a anti-SPA post. Maybe the title should be "Reasons for not building a SPA".

SPAs are an anti-pattern. Let's rebuild html rendering, navigation history, forms, etc, all with Javascript, because it's the hip thing to do.

You still need js for interactive apps, SPAs avoid the spaghetti mix of html rendering and rendering client side.

Re: Advice to Young Web Developers

#15
post #4

This sounded more like a anti-SPA post. Maybe the title should be "Reasons for not building a SPA".

SPAs are an anti-pattern. Let's rebuild html rendering, navigation history, forms, etc, all with Javascript, because it's the hip thing to do.

The way in which we consume and deliver via internet has moved on from the early days of the web. It's no longer just text, images and links. There's much more to it now, and SPAs are a reasonable step forward to providing richer experiences online with more functionality.

Not sure you could ever call them an anti-pattern.

Re: Advice to Young Web Developers

#16
post #4

This sounded more like a anti-SPA post. Maybe the title should be "Reasons for not building a SPA".

The most common reasons for building a SPA: * That is the design pattern dictated by your large framework. * Maintaining state is absurdly simple, but it requires original code if not using a big framework. * The browser provides a simple standard API for interacting with HTML, but your framework provides abstractions you didn’t know you could live without. That’s it. Developers twist themselves in knots trying to qu…

Another big reason is that developers want to deliver a specific user experience that is simply not possible with the default page loading functionality of most browsers.

Re: Advice to Young Web Developers

#17
post #5

> Browsers change. Relying on browser-specific behavior means you’re relying on that one browser at that one point in time. Code to the standard, and test everywhere. I wish this was listed at the top of the list, in the middle, and at the end. It’s super annoying when a site or application isn’t “supported” because it wasn’t tested in a separate browser (i.e. non-Chrome browsers). I know it’s not always easy with a…

Nothing pisses me off like getting a message that some website only supports Chrome in 2020

Re: Advice to Young Web Developers

#18
Seems like a list of every web development ideal that gets upvoted on Hacker News.

Still, I think the list can pretty much condensed down to one point:

Use whatever technology is appropriate for this site or web app.

Because a lot of developers seem to have a 'when all you have is a hammer' attitude towards web development. They learn React/Vue/Angular/whatever, then seemingly decide everything they will ever build will use that framework, regardless of whether it's the right tool for the job.

A blog doesn't need to be an SPA. A static business site that never gets updated and doesn't do anything remotely interesting doesn't need to be an SPA. Your documentation doesn't need to be an SPA.

It's like that guy who was recreating CPanel as a WordPress plugin/install. Sure, you could do things that way, but may want to rethink whether this is really the best architecture to build a server control panel in.

Post reply on HN