3 ms·
So, I was trying to do this literally a decade ago (as in, I remember it being 2013 when I started trying to make an angularjs site work this way). I haven't be
by sanderjd 3y ago
So, I was trying to do this literally a decade ago (as in, I remember it being 2013 when I started trying to make an angularjs site work this way). I haven't been doing front-end or "full stack" for awhile, so I'm a bit out of the loop. Why has this seemingly failed to progress in the last decade?
- PhoenixReborn 3y agoMost of the more modern Javascript SSR frameworks support hybrid in some capacity (Remix, Next, Svelte). I can't speak for Angular as I've never used it.
- sanderjd 3y agoOh, I didn't mean to focus the discussion on angularjs; that "angularjs" that I was using was essentially a totally different and now-deprecated framework from today's angular. I just meant it as an example of why I don't see this as an up-and-coming idea, but rather something that has been the clear best path for a very long time, but doesn't seem to have taken off. I don't know enough about any of the frameworks you mentioned to evaluate whether the "hybrid in some capacity" actually does mean this approach has become widely used, but I guess from my experience of using the web, it doesn't seem like it is common, it seems like most applications are still sending a skeleton and then filling the data in client-side, rather than rendering the initial page load server-side.
- badestrand 3y agoThis is already here and in use. See Next.js using React.js for example. Server-side rendering out of the box and small next needed pieces are loaded continuously when they are needed.
- sanderjd 3y agoNice! Anecdotally this still doesn't seem to be the dominant way that web apps I use are implemented. Is this just taking awhile to get mindshare, or are there some drawbacks keeping most people from using it?
- alexanderchr 3y agoBecause it adds a lot of complexity for the small benefit of shorter initial load times. There are many issues, for example you need to make sure that all your front end code runs both in the browser and in node. You need to mark parts of your UI to not server render, you need to be aware of the timing between the site being loaded and hydration being finished (a text input might have some value prefilled from the server and may be changed by the user before hydration finishes). Just from the top of my head. My experience is that most of the time it’s better to make your public facing site fully SSR and then make the actual app fully client side rendered. You usually don’t need that much interactivity for your public site and your app users don’t mind a few seconds startup time. You also usually don’t need SEO for your app because it’s behind authentication anyway. Exceptions exist of course.
- sanderjd 3y agoVery helpful! Those are basically the same drawbacks as a decade ago. I guess my question to the folks here saying hybrid is the way to go nowadays is: Have these problems been solved in your view?