News for hackers. Stuff that matters.
Re:Building GitHub with Ruby on Rails by snemvalts on Friday April 07, 2023 @04:36AM (#35479555)
Github is one of the few webapps where I can feel daily that the framework used isn't enough. So many things get out of sync/not up to date, which are fixed by refreshing the page.
Re:Building GitHub with Ruby on Rails by hakre on Friday April 07, 2023 @04:51AM (#35479629)
Yes, just seen it yesterday. However, this is perhaps not of Github origins. Even when you use the recommended interface to git - the command line - it's only as up-to date as you've entered the last command for - or pressing F5 in gitk.
Re:Building GitHub with Ruby on Rails by Gasp0de on Friday April 07, 2023 @05:05AM (#35479699)
If anything that's a fault in the Frontend though, which is not what the article is about, right?
Re:Building GitHub with Ruby on Rails by amrocha on Friday April 07, 2023 @05:05AM (#35479701)
Very true, but that's a frontend problem, not a rails problem.
Re:Building GitHub with Ruby on Rails by jeremyjh on Friday April 07, 2023 @07:24AM (#35480470)
These problems are always more common in server-rendered apps though, because front-end state is always a patchwork. And the Rails developers and community have a strong preference for this architecture.
Re:Building GitHub with Ruby on Rails by VWWHFSfQ on Friday April 07, 2023 @09:39AM (#35481451)
I observe the exact opposite. Server rendered UIs are far more often times up to date than client rendered apps.
Re:Building GitHub with Ruby on Rails by amrocha on Friday April 07, 2023 @02:34PM (#35485181)
I can't think of a single website that's real time and server rendered
Re:Building GitHub with Ruby on Rails by UlisesAC4 on Saturday April 08, 2023 @12:42AM (#35490596)
I do not have examples with me. But anything built with Elixir Liveview will be server rendered and will also be real time, with some gotchas though.

https://github.com/phoenixframework/phoenix_live_view

Re:Building GitHub with Ruby on Rails by jeremyjh on Saturday April 08, 2023 @07:19AM (#35492272)
Its not exactly server rendered, though. After the first page view all the server is rendering are json graphs of dom diffs to be applied by the client application. If you use the routing features then technically its an SPA.
Re:Building GitHub with Ruby on Rails by gls2ro on Friday April 07, 2023 @11:25AM (#35482576)
Mind you some parts of Github FE are React https://twitter.com/rauchg/status/1591464351990697984?s=46&t...
Re:Building GitHub with Ruby on Rails by int_19h on Friday April 07, 2023 @06:57PM (#35488169)
The upside is that you can link just about anything in GitHub, and those links work consistently and point at the exact right content. This is much less common with SPAs.
Re:Building GitHub with Ruby on Rails by amrocha on Friday April 07, 2023 @08:04PM (#35488822)
SPA =\= client rendering
Re:Building GitHub with Ruby on Rails by jeremyjh on Friday April 07, 2023 @09:24PM (#35489424)
I agree its a valid criticism of parts of the ecosystem, but a lot of people these days are using next.js, nuxt.js or sveltkit and those give you easy patterns to follow so that all those things work, basically for free. SPAs are better now than they were just a few years ago.
Re:Building GitHub with Ruby on Rails by yurishimo on Friday April 07, 2023 @06:02AM (#35479972)
Is that a fault of Rails though or Github's architecture as a whole? In my opinion, Github is the result of hundreds (thousands?) of devs working on one product with little discussion across the entire project. Their HTML patching solution works great in isolation for one team shipping features to their island of the product. But we as users see it fall short at scale. Like you mentioned, things getting out of sync is a real pain point that doesn't have an obvious fix when you have so many people touching the product daily.
Re:Building GitHub with Ruby on Rails by Cthulhu_ on Friday April 07, 2023 @06:13AM (#35480035)
I feel the same with Gitlab, with e.g. build pipeline status not updating when it's done - it feels pull- instead of push-based.

I mean it may be working just fine, but I don't see it - and the success rate of refreshing a page to see an update is so high that it doesn't instill confidence.

These tools should be more reactive, I think, with live progress indicators and the like.

Re:Building GitHub with Ruby on Rails by peheje on Friday April 07, 2023 @11:00AM (#35482258)
Nothing wrong with pull based. Actually I feel like push connections are more often less reliable as they are lost and not reconnected.
Re:Building GitHub with Ruby on Rails by ativzzz on Friday April 07, 2023 @10:07AM (#35481715)
I think it's a tradeoff - rails makes live frontend updating challenging because you need to maintain a separate system to manage that, especially when you have a large app. JS frameworks have this built in, but their backend is lacking compared to rails IMO
Re:Building GitHub with Ruby on Rails by doodlesdev on Friday April 07, 2023 @04:22PM (#35486503)
GitHub could've used Hotwire [0] but instead they decided to grow a buggy immature in-house solution.

[0]: https://hotwired.dev/

Re:Building GitHub with Ruby on Rails by mscccc on Friday April 07, 2023 @06:44PM (#35488032)
Even with my kindest interpretation, I cannot find how this comment adds anything to the conversation. It’s also incorrect. Hotwire was released after GitHub’s internal UI framework (which is quite impressive!) was created.

Attributing some UI bugs with their choice of framework is a massive oversimplification of the problem.

Re:Building GitHub with Ruby on Rails by 0xblinq on Monday April 10, 2023 @01:48AM (#35509528)
> Hotwire was released after GitHub’s internal UI framework

Any source for this?

My understanding is that it was extracted for building Hey from the use cases the 37signals people had on other products such as basecamp, etc.

Re:Building GitHub with Ruby on Rails by mscccc on Monday April 10, 2023 @10:19PM (#35519944)
Yes that’s correct.

I was saying it came after, meaning GitHub could not have used it since it didn’t exist. :)