News for hackers. Stuff that matters.
Re:Ask HN: What is the single top-priority software engineer... by ketzo on Saturday February 08, 2020 @08:18PM (#22279782)
Can you give some specific examples of this problem? Frontend developer curious what kind of trends/solutions you mean.
Re:Ask HN: What is the single top-priority software engineer... by chubot on Saturday February 08, 2020 @08:38PM (#22279851)
Here's my take on it from a few months ago:

----

...

Claim: Most sites are mostly static content. For example, AirBNB or Grubhub. Those sites could be way faster than they are now if they were architected differently. Only when you check out do you need anything resembling an “app”. The browsing and searching is better done with a “document” model IMO.

Ditto for YouTube... I think it used to be more a document model, but now it’s more like an app. And it’s gotten a lot slower, which I don’t think is a coincidence. Netflix is a more obvious example – it’s crazy slow.

To address the OP: for Sourcehut/Github, I would say everything except the PR review system could use the document model. Navigating code and adding comments is arguably an app.

On the other hand, there are things that are and should be apps: Google Maps, Docs, Sheets.

edit: Yeah now that I check, YouTube does the infinite scroll thing, which is slow and annoying IMO (e.g. breaks bookmarking). Ditto for AirBNB.

https://lobste.rs/s/jmmr3w/interview_with_drew_devault#c_wuc...

context: https://lobste.rs/s/jmmr3w/interview_with_drew_devault

I haven't used sourcehut much but the UI is going in the right direction IMO. It looks nice and is functional, at 5% of the weight and 20x the speed of similar sites.

Re:Ask HN: What is the single top-priority software engineer... by abatilo on Monday February 10, 2020 @03:52PM (#22293163)
I tend to agree with most of what you're saying, but one thing that leaves me conflicted is that with a document model, don't you lose the personalization of the content?

One of the reasons Netflix or YouTube is so slow is because every time you load up the page, you're supposedly getting a page that's full of content targeted specifically for you.

Would you say that you just don't want the personalization?

Re:Ask HN: What is the single top-priority software engineer... by chubot on Tuesday February 11, 2020 @02:41AM (#22296787)
Why do you think you lose personalization? That's an independent issue.

I don't mean the site is completely static. I mean the site is rendered on the server, like how 99% of websites worked before 2010 or so, including Google's. Those sites were personalized.

A shorthand for the argument is jQuery vs. React. jQuery enhances a document; React "takes over" the page to give you an app. There are limitations of jQuery which is why I didn't say that specifically, but that's the general idea.

----

I'm finding in the last 5 years that people "forgot" how websites were made. It seems like the "default" mode of thinking switched to SPA. SPA makes some things more convenient and other things less convenient, but it's totally independent of functionality, like whether the site is personalized or not.

Ironically SPA seems to be so slow that people now render it on the server, which is totally bizarre to me.

----

Update: This comment in the same thread goes into the issue of state management, and performance: https://lobste.rs/s/jmmr3w/interview_with_drew_devault#c_6pp...

There's a legitimate reason for the SPA architecture, but it comes with many downsides as well.

Good article (which is ironically on Medium, a great example of a document turned into a terrible, slow app):

https://medium.com/@addyosmani/the-cost-of-javascript-in-201...

https://news.ycombinator.com/item?id=17682378

Re:Ask HN: What is the single top-priority software engineer... by noahtallen on Saturday February 08, 2020 @08:43PM (#22279862)
Isn’t Github following the document model? At least, that’s my impression of how the UI works (I.e. none of the consistent UI elements stick around as you navigate)
Re:Ask HN: What is the single top-priority software engineer... by chubot on Saturday February 08, 2020 @09:58PM (#22280107)
Yes Github looks pretty close to the document model. I think that's why they were able to optimize it over time.

It isn't exactly fast, but I think it's gotten faster over time.

On the other hand there are lots of blogs that won't even render without JS turned on. Those are apps, but IMO they should be static content.

Re:Ask HN: What is the single top-priority software engineer... by btown on Saturday February 08, 2020 @09:34PM (#22280022)
What about when you need an editing interface with an instant preview, though? You would want to reuse the component that renders the static content. So it’s simpler, and leads to happier devs, to treat both as an app from the beginning, and if you need to (for SEO or performance), server-side-render using the same codebase.

Is this silly? Absolutely. Is it a global optimum? Possibly.

Re:Ask HN: What is the single top-priority software engineer... by richajak on Sunday February 09, 2020 @09:06PM (#22285824)
For this specific example, I would use event listener to sync the content. All done manually in DOM, no shortcut, some codes duplicated. I think that's what SPA frameworks and its components try to promote, single point of update.

Personally, I like the vannila JS approach, a bit tedious, but I know what I will get.

Re:Ask HN: What is the single top-priority software engineer... by chubot on Saturday February 08, 2020 @09:54PM (#22280089)
I don't really see what you're saying. That doesn't appear to apply to any of the examples I gave: AirBNB, Grubhub, Github, YouTube, etc.

Or if it does, it applies to a small part of the site. Again, the claim is: most sites are mostly static content.

Re:Ask HN: What is the single top-priority software engineer... by bazza451 on Sunday February 09, 2020 @05:34AM (#22281425)
Could you expand on this? I’m interested in the opinion