Live data from Hacker News

Second-guessing the modern web (2020)

macwright.com

221–230 of 309 posts

Re: Second-guessing the modern web (2020)

#221

One thing I've seen happen again and again in a lot of technologies is a "framework gravity". A lot of people see this as engineers just wanting to work on "hype" technology but I think what is actually happening is a reflection of global engineering time. React is great for SPAs. Most large companies are working on honest-to-god SPAs. By extension most engineers are working on SPAs. So most tooling is created for SP…

Another big issue is the ability to seamless transition parts of your software between different programming models. We just don't have good solutions to this that I know of. The thing with SPAs is that you are probably worse off starting with a traditional server-rendered HTML web site and slowly introducing more and more interactivity, unless you know you won't eventually be better off with an SPA at the foundation…

This is why NextJS is so compelling; if you want to create an SPA (just like with create-react-app), it can do that. But with built-in 0-config support for SSR and SSG, you can pick and choose where and how data-fetching and rendering happen (client or server, at build-time or request time, or any hybrid combination), using one language, one paradigm, one framework. IMHO it's the obvious foundation for any greenfield (or brownfield) React project.

I've been building web-related things since 1998, and IME NextJS has the best DX and most flexibility of any framework I've encountered.

Re: Second-guessing the modern web (2020)

#222
post #181

Earlier quoted context omitted.

Another big issue is the ability to seamless transition parts of your software between different programming models. We just don't have good solutions to this that I know of. The thing with SPAs is that you are probably worse off starting with a traditional server-rendered HTML web site and slowly introducing more and more interactivity, unless you know you won't eventually be better off with an SPA at the foundation…

The problem you describe is a data modeling problem, its because the same data comes from different places and is stored on multiple places, where each change triggers many changes. Its like like programming using only global variables. The solution is to have one directional data flow rather then bidirectional. UI should only listed to changes- not mutate data directly. Instead UI input should be sent to a client/se…

Yes, this. Unidirectional data flow is a fundamentally good idea. IMHO it's why React (the paradigm) has become dominant.

Re: Second-guessing the modern web (2020)

#223

Earlier quoted context omitted.

Nice blog post! I read the whole thing. I'm working on something with multiplayer using an unbounded queue of command events, so I learnt a few things about that situation. If you have any posts that elaborate on the typical infrastructure events from running that in production, I'd love to read it as you obviously put a lot of effort into your blog posts.

This is entirely new infrastructure, and I don't have data yet since this is a side project. I am biasing towards relying on a connected socket for all state management which is fair for board games (and, I do believe more generally given how connected the world is becoming). There are tremendous problems with using WebSockets in production, but they can be overcome with a decent protocol design as you have a number…

sent you an email, I'd be interested in reading that paper once it's available! Cheers

Re: Second-guessing the modern web (2020)

#224
post #50

Earlier quoted context omitted.

Yep. We recently did an assessment of available UI libraries and pretty much concluded the best maintained libraries with a modern look and feel are all web-focused and we're likely to have to settle for building an electron app if we want to be able to take advantage of the best selection of 3rd party libraries without building as much ourselves. As much as I don't like the ecosystem or Javascript as a language, the…

If you're building a desktop app, just plain C# in visual studio has an extremely powerful GUI (WinForms) that is fairly easy to use. Lots of widgets abs very good charts and graphs that you can zoom-in on and annotate in a million ways. It's miles ahead of Python (saying this as a Python guy). Click Once means installs are fairly simple (assuming a Windows deployment).

And not being on the assumed target platform, I am grateful the web is seen as such a strong target. Either I'll get a solid in-browser experience or an Electron experience, but regardless I actually get access to the application. Android has a decent-enough story for PWAs as well.

Re: Second-guessing the modern web (2020)

#225
post #89
post #75

Earlier quoted context omitted.

Tbh if you're living in React-land and understand Redux, useReducer with useContext has subsumed the need for it in nearly all cases for myself and my team. For the parts it doesn't match, truly global stuff or tonnes of mutation, MobX is nicer out of the box than Redux. Redux can be just as nice and in some ways more powerful, but thats only after installing and configuring X amount of middlewares, with all the type…

Interesting, I did look at MobX briefly but pretty quickly concluded it seemed like overkill for our use case where Redux, Redux Toolkit and Thunk would pretty much solve everything we needed and seemed comparatively simple to follow, I'll definitely take a look into useReducer and useContext though, that looks like a potentially viable option for the majority of cases.

I've got experience with MobX (from about 3y ago) and more recent experience with RTK. I still feel that MobX is easier to reason about -- but RTK is a big improvement over vanilla Redux. /$.02

Re: Second-guessing the modern web (2020)

#226

One thing I've seen happen again and again in a lot of technologies is a "framework gravity". A lot of people see this as engineers just wanting to work on "hype" technology but I think what is actually happening is a reflection of global engineering time. React is great for SPAs. Most large companies are working on honest-to-god SPAs. By extension most engineers are working on SPAs. So most tooling is created for SP…

I agree with your logic but not the premise; wrt React and SPAs in particular, thankfully NextJS has emerged as a robust React-based framework encompassing every kind of rendering mode (SSR, SSG, ISR, CSR/SPA, hybrid) and architecture.

Which is good as long as you're only building just a frontend. Or a landing page.

The moment you need to integrate it with server side validations, authentication, add a database, migrations, background jobs, etc. it becomes a mess. In fact, a custom undocumented mess.

Re: Second-guessing the modern web (2020)

#227

> unloved, unpopular, uncool things like Django, Rails, Laravel Oh they're loved all right, it's just that they're (all three) very mature, packed with features, easy to pick up and people who work with them don't have a reason to sit around and discuss the tools. I work for a smaller Rails shop and the atmosphere is just so nice there. We work on small (think $20k) projects for different niche customers, we absolute…

what's your company?

Re: Second-guessing the modern web (2020)

#228

Earlier quoted context omitted.

Another big issue is the ability to seamless transition parts of your software between different programming models. We just don't have good solutions to this that I know of. The thing with SPAs is that you are probably worse off starting with a traditional server-rendered HTML web site and slowly introducing more and more interactivity, unless you know you won't eventually be better off with an SPA at the foundation…

This is why NextJS is so compelling; if you want to create an SPA (just like with create-react-app), it can do that. But with built-in 0-config support for SSR and SSG, you can pick and choose where and how data-fetching and rendering happen (client or server, at build-time or request time, or any hybrid combination), using one language, one paradigm, one framework. IMHO it's the obvious foundation for any greenfield…

agreed. it's so in tune with the developer/web ecosystem of 2021. the fact that my React SEO landing pages are pre-cached and served by a CDN with so little config required is slightly magical.

Re: Second-guessing the modern web (2020)

#229
post #28

Earlier quoted context omitted.

I see a big difference between Hadoop and React though: React pushes the costs on the client. This is something that's not often mentionned, but with a traditional SPA, a good part of your code runs on the client, which is server costs you don't have to pay. I don't know if it's something that people do consciously to reduce costs and just never talk about, or if it's an unintended consequence, but it's here. If your…

React optimization problems are more than just CPU; React encourages lots of little requests in such a way that no amount of computing power can tackle. Coupled with other flawed but popular design antipatterns like skeleton screens, performances is abysmal. Not just long page loading times but browser and machine freezing slowdowns. BitBucket and Jira have gotten so much worse since they moved to React. With all my…

Proof of this:

https://old.reddit.com/

vs

https://reddit.com/

Re: Second-guessing the modern web (2020)

#230
post #177

Earlier quoted context omitted.

> The two are basically synonymous, I don't understand how there is even a discussion around this. This erroneous belief is the very source of the problem. Here's a user, telling you that I'm sick of lag from weird multistage loads in apps that gain nothing from keeping local state in browser JavaScript variables. I have never, literally never, thought that a good experience came from a SPA. Give me HN and it's 2000s…

> Here's a user, telling you that I'm sick of lag from weird multistage loads in apps that gain nothing from keeping local state in browser JavaScript variables. You do realize the alternative is the same amount (or more) of waiting with a blank screen, right? > Or compare the absolute shit-show of new Reddit in an SPA to old Reddit. You are conflating bad design / UX with SPAs. You can build a SPA that is exactly th…

    > You are conflating bad design / UX with SPAs. 
Not really. Bad UX is what is really synonymous with SPAs.
Post reply on HN