5 ms·
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 AP
by ttfkam 3y ago
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 wrapping 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.
- text0404 3y agoi 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.
- ttfkam 3y agoNice straw man you've built there. Be a shame if anything happened to it.
- hinkley 3y agoHave you noticed that Lambda is just FastCGI, Cloud Edition?
- ttfkam 3y ago+ 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.
- vvvvtt340 3y agoI 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/0f910048478c2a6505d1c32185b61934 https://gist.github.com/Rich-Harris/0f910048478c2a6505d1c321... https://svelte.dev/docs/svelte-components#script-3-$-marks-a-statement-as-reactive https://svelte.dev/docs/svelte-components#script-3-$-marks-a... https://svelte.dev/docs/svelte-components#script-4-prefix-stores-with-$-to-access-their-values https://svelte.dev/docs/svelte-components#script-4-prefix-st...
- ttfkam 3y agoThat'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.
- Ambolia 3y agoThat 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.
- ttfkam 3y agoEvery 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.
- Ambolia 3y agoCompiled 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.
- ttfkam 3y agoYou 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.
- robertoandred 3y agoHtmx is nothing but new APIs bolted on to a markup language.
- ttfkam 3y agoWhere 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.
- prmph 3y agoWell, 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.
- ttfkam 3y agoIt 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. React really made people think they couldn't expect any better.