News for hackers. Stuff that matters.
Re:Things you forgot because of React by ttfkam on Tuesday August 15, 2023 @10:20AM (#37134342)
I've been doing web development since 1996. I've witnessed the ebbs and flows and hype trains.

Svelte's the real deal. How do I know? Because it's not a new API or paradigm. It's the old web just better.

It encourages HTML and sane CSS, not just wraps them in endless boilerplate. It compiles to efficient code rather than making you write all of it over and over again. It takes all the lessons from the last decade and a half and distills them into familiar web development patterns.

   <script>
   <style>
   all your HTML
   + bare minimum of logic to solve your problems
I haven't been this excited about a new web technology in a decade, so coming from an old school web dev who learned off of view source in 1996, take that into consideration.

And while I prefer Svelte, Htmx is doing a lot of the same work; not new APIs; just embracing old ones without all the boilerplate.

Re:Things you forgot because of React by hinkley on Tuesday August 15, 2023 @10:38AM (#37134539)
Have you noticed that Lambda is just FastCGI, Cloud Edition?
Re:Things you forgot because of React by ttfkam on Tuesday August 15, 2023 @12:59PM (#37136314)
+ multi-availability zone redundancy and resiliency, multi-region deployment options, and edge computing at CDN endpoints.

Other than that, for web functionality, they're identical! ;-)

Then of course there's the ability to supplement authentication on the backend, detect file uploads for background processing, etc. All of which are outside the scope of FastCGI.

But you don't care for Lambda. That's fine. You do you.

Re:Things you forgot because of React by vvvvtt340 on Tuesday August 15, 2023 @10:56AM (#37134764)
I love svelte too, but I would argue that the way svelte extends JavaScript by making reactivity a language primitive pushes svelte beyond "the old web, just better".

https://gist.github.com/Rich-Harris/0f910048478c2a6505d1c321...

https://svelte.dev/docs/svelte-components#script-3-$-marks-a...

https://svelte.dev/docs/svelte-components#script-4-prefix-st...

Re:Things you forgot because of React by ttfkam on Tuesday August 15, 2023 @12:07PM (#37135649)
That's where this part kicks in:

    "It takes all the lessons from the last decade and a half and distills them into familiar web development patterns."
That includes reactivity and state management—two concepts that weren't adequately covered by the old web.
Re:Things you forgot because of React by Ambolia on Tuesday August 15, 2023 @11:14AM (#37134994)
That only works if you think that basic HTML and CSS where at any point good platforms for building complex applications. Many people (me included) wouldn't agree with this. In that case, saying that Svelte doesn't help overcome any of those fundamental limitations of web development would not be a selling point.

Things only get worse when you add vanilla javascript to the mix.

Re:Things you forgot because of React by ttfkam on Tuesday August 15, 2023 @12:12PM (#37135735)
Every web app no matter the framework boils down to HTML and CSS at its core. The furthest you can get from those is ratcheting up the number of <div> and <span> elements, then of course making the mad dash to reintroduce the lost functionality through heaps of JS and accessibility through aria roles.

Or… you could use the tags most appropriate to the problem with accessibility and SEO automatically coming along for the ride.

PicoCSS is an excellent example of what can be accomplished with just a sprinkling (~10KB) of CSS over plain old HTML.

Browsers can do so much more than they used to out of the box today. We should take advantage of that rather than silo it away in one-off React-based APIs.

Re:Things you forgot because of React by Ambolia on Tuesday August 15, 2023 @12:46PM (#37136171)
Compiled languages boil down to assembly, but I wouldn't like to write them as assembly files with a few higher-level constructs sprinkled through the files.

You may disagree that html and css are that bad. But I think it was always a mess, specially when you go beyond linked documents and add any kind of interactivity and forms. There's also inherent limitations like "select" dropdowns offering very little functionality and mostly ending up as custom components in all projects I have worked in.

Re:Things you forgot because of React by ttfkam on Tuesday August 15, 2023 @12:52PM (#37136232)
You seem to be taking the position that Svelte does not allow for components for cases like custom dropdowns where HTML falls short on its own.

This is not at all the case. I highly recommend actually looking at Svelte examples before commenting further.

That said, there are a lot of folks out there who don't know that, for example, combo boxes and accordions are possible with plain HTML.

    <datalist>
    <details>
    <summary>
PicoCSS is a great resource for seeing what's possible with just plain HTML and ~10KB of CSS.
Re:Things you forgot because of React by Ambolia on Tuesday August 15, 2023 @01:19PM (#37136642)
I don't have knowledge about Svelte so you may be right about it solving all those issues. My contention is with regards to the general idea of the article and some comments that seem to indicate that everything was good in the web development world before React introduced a bunch of problems. React did introduce some problems, but to sell me on migrating I'll need to see that the new framework solves the issues inherent to web development, not just the issues that React created.
Re:Things you forgot because of React by ttfkam on Tuesday August 15, 2023 @02:27PM (#37137488)
I do not think that is a charitable view of the article or most people's comments. We all knew what was gained. We just bemoan what was lost, much of which has been found to be largely unknown to more recent entrants into the field.

Folks aren't against solving problems. I think the main concern is the amnesia regarding problems that had already be solved and are now be solved again only not as well.

Re:Things you forgot because of React by robertoandred on Tuesday August 15, 2023 @11:18AM (#37135046)
Htmx is nothing but new APIs bolted on to a markup language.
Re:Things you forgot because of React by ttfkam on Tuesday August 15, 2023 @01:01PM (#37136350)
Where that markup language is HTML, yes, I agree.

It's a feature, not a bug. That said, I personally prefer the Svelte model. I like leveraging the client browser for effect, not just rendering everything server-side.

Re:Things you forgot because of React by prmph on Tuesday August 15, 2023 @12:16PM (#37135785)
Well, CSS itself is a problem, because it is not component-izable and composable. I only use inline CSS now, not because it the very best aproach, but at each it keeps my projects sane after years.
Re:Things you forgot because of React by ttfkam on Tuesday August 15, 2023 @12:21PM (#37135843)
It is in Svelte. Take a look. You write normal CSS as you always have, and Svelte takes care of scoping it to just your component by default.
Re:Things you forgot because of React by text0404 on Tuesday August 15, 2023 @08:16PM (#37141107)
i too have been developing since 1996. and in 1996, nobody was making web-based applications with anywhere near a fraction of the complexity that modern web apps manage.

please build spotify using only HTML and JS language features from 1996.

Re:Things you forgot because of React by ttfkam on Thursday August 17, 2023 @12:18PM (#37164019)
Nice straw man you've built there. Be a shame if anything happened to it.