Live data from Hacker News

Advice to Young Web Developers

tumblr.beesbuzz.biz

41–50 of 328 posts

Re: Advice to Young Web Developers

#41
post #16

Earlier quoted context omitted.

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.

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.

Re: Advice to Young Web Developers

#42
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"…

OTOH, if you use Flow or Typescript, it is amazing to be able to share type-safe interfaces across the stack (not code). I suppose you could get this from any compiled-to-JS language too.

Re: Advice to Young Web Developers

#43

> To the developer, “isomorphic” code breaks down the barrier between client and server. To a malicious client, it means they have control over the server too. Huh? I don't follow this. Sharing some helpful util functions between the frontend and backend doesn't allow malicious clients to control your server.

Maybe they are thinking of services like firebase where much of the traditional server logic is now handled in the same js libraries that the frontend uses? But I'm also not sure what exactly the author is referring to.

Re: Advice to Young Web Developers

#44
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 also love when i visit a website with a simple markup and minimal js. Not everything should be a react/graphql isomorphic SPA, but have you checked NotionHQ[0]? The whole thing is a single page react app. People use it to build wikis, manage projects and even create blogs and job postings. All that using client-side rendering. It doesn't load as fast as hackernews but most people seem to love it either way.

[0] https://www.notion.so/

Re: Advice to Young Web Developers

#45
post #34
post #20

I feel like posts like this are just somebody missing the web how it used to be. I mean the Web IS an app platform now.

I didn't get that sense from the post. I took that they were advocating for basic HTML/JS when appropriate. A reminder that it's still a valid way of doing things. If you're building an app, yeah use React. If you want to put some contact info on the internet, there's no reason it can't be vanilla HTML. Or at least that's how I read it.

Looking over the article again, I'd say your right. It was the statement "The web is built around server-side rendering." that made me feel that way. As a whole you're right.

However, I didn't think everyone was out making landing pages with React and VueJS. Maybe they are.

Re: Advice to Young Web Developers

#46

> To the developer, “isomorphic” code breaks down the barrier between client and server. To a malicious client, it means they have control over the server too. Huh? I don't follow this. Sharing some helpful util functions between the frontend and backend doesn't allow malicious clients to control your server.

[deleted]

Re: Advice to Young Web Developers

#47
post #22

Earlier quoted context omitted.

The one that drives me crazy are websites that say they only support safari on iOS... It’s all safari under the hood.

Safari on iOs is a bit special. Some features are missing compared to the Mac version. You also need quite a few safari ios specific code if you want to build a web app. But this is a bit broken since Apple wants you to publish to the appstore and not release web apps anymore. You also need a Mac to debug safari on iOs. I hate Safari.

The point being made is that if you use Chrome or Firefox on IOS, it’s still actually the Safari engine.

Re: Advice to Young Web Developers

#48
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…

> Your documentation doesn't need to be an SPA.

Disagree with this. Having the entire documentation site working as normal on my browser when I have bad/no internet connectivity is extremely useful.

Re: Advice to Young Web Developers

#49
People are motivated to learn and build what inspires them. Some started web dev because they wanted to make the type of projects they saw in chrome experiments that only run on the latest version of Chrome. Some people see very complex SPA apps and are inspired to make complex tools that can't just be done with HTML. Some get into web dev because they had a passion for browser and flash games. This list isn't wrong but also doesn't take into account the huge variety of web developers.

Re: Advice to Young Web Developers

#50
Excellent list. I would add: sometimes it's tempting to rewrite an entire site or application to get away from a world of problems, but you could just as easily be walking into another set of issues at the expense of lost time and existing code value if you aren't careful.
Post reply on HN