Live data from Hacker News

Advice to Young Web Developers

tumblr.beesbuzz.biz

81–90 of 328 posts

Re: Advice to Young Web Developers

#81
post #23

> Even if you need to preserve client state between page loads (for e.g. music or video playback) you can let the browser do most of the heavy lifting by fetch()ing a new page and replacing your content container at the DOM level. Anyone knows of some easy to learn example of such DOM replacement?

Window load events fail to fire this way among other likely problems. You'd have to specifically design around doing it, or do something else like put the whole page in an iframe with your video/music player staying floating outside, or put back inside when it's loaded.

Re: Advice to Young Web Developers

#82
post #25

There are two that stand out to me: > Always validate your data server-side; anything that comes from the client is suspect. At least sanitize in a way that won't break the server but will throw an error. For internal applications and side projects it's ok to just respond with a 40X or a 50X and move on. > To the developer, “isomorphic” code breaks down the barrier between client and server. "Breaks down the barrier"…

[deleted]

Re: Advice to Young Web Developers

#83
Advice: don't make everything slow as shit please. Note, this most likely means writing your own trim left function and not depending on zillions of libraries. If you can't write something as simple as this, please don't! Just output a static web-page that loads ultra fast. Thanks young web developers!

Re: Advice to Young Web Developers

#85
Why are infinite scrolls so demonized? I like them, especially if they update the url so you can go back to the same spot. Everyone loved it when Reddit Enhancement Suite did it way back in the day, but now Facebook does it so it's evil.

Re: Advice to Young Web Developers

#86
post #15

Earlier quoted context omitted.

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.

How would the site we’re communicating on right now be improved if it were rebuilt as an SPA?

Threading could be clearer. Less data would need to be loaded on each page load. I can imagine that a lightweight SPA to handle the a few standard views (e.g. listItems, itemDetails, profile, changePassword, submit) would cut down data transfer by a significant margin (20-30%, maybe more). The UI could also be much better on mobile, and we could give users the option to cache certain pieces of content offline.

Re: Advice to Young Web Developers

#87
post #15

Earlier quoted context omitted.

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.

> It's no longer just text, images and links. Assuming you add video, 99% of the web is just text,images,links,forms, and video. None of these things even require Javascript.

I'd say a big part of the web is gaming, chatting, interacting. A lot of that content updates every few seconds. Without JS, websockets, ajax requests etc, do you suggest users load the entire page again whenever they want to see an updated view?!

Or is your opinion that it should only be possible to do those things in native, purpose-built apps? Because in that case, how do you justify using an operating system? Perhaps we should exclusively use purpose-built assembly code that you flash to some writable media every time you want to run a particular program!

Re: Advice to Young Web Developers

#88
post #41

Earlier quoted context omitted.

You mean the specific experience when back buttons aren't working? Or when urls don't make sense? Or when you can't just share the content by copying the url because it no longer identifies the conten? Or when you can't say if something is loading, missing, or broken? This is my user experience with SPAs regarding navigation.

Use better SPAs.

Agree. There are a lot of bad SPAs out there, but that's a testament to how easy they are to get started with and their popularity.

That doesn't mean good SPAs don't exist - many do!

Re: Advice to Young Web Developers

#89
Ironically, it uses tumblr, so the damn back button is captured (try getting back here).

This is my fave:

> Infinite scrolls are inhumane. People need to be able to reach “the end.” There are forms of eternal torment described in religious texts that are less mean.

Re: Advice to Young Web Developers

#90
post #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 w…

When I started at my current company I was shocked that they were using Wordpress for 90% of client sites. Now 2yrs in, I’m thankful we are using Wordpress for these sites. It keeps things maintainable and simple. And for 90% of businesses, that’s exactly what they need.
Post reply on HN