Live data from Hacker News

How I made a website with Svelte

johanronsse.be

101–110 of 130 posts

Re: How I made a website with Svelte

#101
post #81

Earlier quoted context omitted.

To understand why people say Angular is over-engineered Google something simple like "Angular http request". You'll end up at this page: https://angular.io/guide/http It's almost comical. I can't believe how long that guide is and how many concepts Angular invented just to fetch some JSON from an http service.

> I can't believe how long that guide is The format should probably be broken up. But yeah covers a lot: * HTTP, JSON, JSONP * Request entities, response entities, headers * Error handling, cancelation, and retries * Authentication, logging, and other kinds of "middleware" * XSRF * Progress tracking * DI and testing * Type safety > how many concepts Angular invented Not a single one of those was invented by Angular.…

They're not invented by Angular but for each and everyone one I have to learn how to do it the "Angular way", usually with an Angular-specific API. That's why it's over-engineered.

Re: How I made a website with Svelte

#103
post #101

Earlier quoted context omitted.

> I can't believe how long that guide is The format should probably be broken up. But yeah covers a lot: * HTTP, JSON, JSONP * Request entities, response entities, headers * Error handling, cancelation, and retries * Authentication, logging, and other kinds of "middleware" * XSRF * Progress tracking * DI and testing * Type safety > how many concepts Angular invented Not a single one of those was invented by Angular.…

They're not invented by Angular but for each and everyone one I have to learn how to do it the "Angular way", usually with an Angular-specific API. That's why it's over-engineered.

Yes, that's certainly true.

Whether good or bad, it seeks to be the solution to many problems (which you would have to solve in some way), hence it being a "framework".

I'd probably call that "opinionated" rather than "over-engineered."

Re: How I made a website with Svelte

#104

Earlier quoted context omitted.

Wolfr_- Just read over ygdir and wondering: We've had such phenomenal success with https://styled-system.com/ across our team that I'm wondering if your adversity to utility-first CSS might be due to misuse in some way? Utility first is largely to build primitive abstractions that expose narrow constrains for developers building UI. It's the opposite of complexity due to the fact that it reduces options. _But_ if the…

I'm not Wolfr_, and I haven't used that React-based library you link, but I have seen tailwindcss.com -- which, as far as I've heard, is one of the flagship "utility-first" CSS libraries -- used in medium-to-large scale projects. The problems I've seen with Tailwind in these projects are: - Elements end up with messy, non-semantic class name strings like "m-4 mt-0 p-3 rounded bg-blue". This makes it much harder for n…

I prefer non-semantic class names (“messy” is up for debate). I find it much easier to reason about the markup when I can see exactly how each element is styled right there _with_ the element. Not only does semantic naming add a layer of indirection, I have have never found it to be as “clean” as you are insinuating. I can’t count the number of times I’ve found myself having to invent names for elements, containers, etc. just so I can apply a style when it would have been much easier to just “style=whatever”. All the naming conventions in the world don’t solve this: is it list-item__header or list__item-header? Who cares?

I don’t find your arguments about maintenance very compelling either. If you want an element with “p-3” to have more padding, just... change it to “p-4”. That’s the whole point! You don’t have to wrangle with the _semantics_ of the element. You style it exactly as you want. It’s akin to using the `style` attribute but terser. The only vector of change for the definition of a class name becomes the CSS spec itself. “p-3” === “padding: 3px” and cant _ever_ mean anything else (or it would have a different name).

I see your point about SaaS tools, but why can’t you just add a class name for that purpose alone? Seems simple enough to me.

I’ve tried just about everything when it comes to organizing CSS/styles and I have come to the conclusion that semantic naming is more trouble than its worth.

Re: How I made a website with Svelte

#105
post #75

Does svelte have any traction recently? Any big names using it?

It did well in the State of JS, but there are no big names using it. I think it will have grow in popularity in 2020. The community is still relatively small.

The list of "who is" is most certainly growing, and there are definitely some bigger names out there: https://github.com/sveltejs/svelte/blob/master/site/src/rout...

Jobs listings are cropping up in sundry places too. See for example: https://sveltejobs.dev/jobs/apple-senior-front-end-developer

Re: How I made a website with Svelte

#106
post #81

Earlier quoted context omitted.

To understand why people say Angular is over-engineered Google something simple like "Angular http request". You'll end up at this page: https://angular.io/guide/http It's almost comical. I can't believe how long that guide is and how many concepts Angular invented just to fetch some JSON from an http service.

I find it a little strange that you are pointing out comprehensive documentation on a module as proof of a problem with the framework... Lets talk about what you get with HttpClient: - Easy testing. Because its using the DI system, its very mockable. You can totally set this up with fetch or whatever behind a service but, well why? Its already done. - Robust type safety. Again you can set this up with fetch, but why?…

How come Vue doesn't need this stuff then?

Re: How I made a website with Svelte

#107
post #20

> What I like about these foundries is that they have permissive licenses that are just a one-time purchase. When I make a website I don’t want to worry about the font licensing for years. I love the work of professional typographers, but tend to stay away from commercial Web fonts, because they like to include very restrictive terms in the font licences. For example, you're only allowed to back up Klim fonts once, w…

I really appreciate the amount of work that goes into making a font. On one hand, these typographers and their foundries are starving for revenue and on the other hand they make the customer's professional life incredibly difficult with the retrictions that you mention. Most small foundries have been bought out by Monotype and their licensing is now 100% subscription only. I was lucky to have purchased Univers and a…

There have been a few fonts I was interested in until I saw the several-hundred dollar bill and the license that basically restricted any useful application of the font. No wonder why startups commission their own fonts these days, so they can own them.

Typography and calligraphy is an art form so it does justify the expense, but you've got to be able to actually use it.

Re: How I made a website with Svelte

#109
post #83

Earlier quoted context omitted.

No, you make a small web app. It doesn't have to be a big project, but it should be something that benefits from what the framework can deliver. This doesn't. If you're "exploring game engines" making a resume with one is probably not what you should reach for and if you're "exploring DAWs" your testbed shouldn't be generating a pure sine wave. This sort of site is the opposite of a perfect testbed for a framework. T…

I made a small front-end for a web app before: http://johanronsse.be/skilliverse-10/ - Video: https://www.youtube.com/watch?v=qicEFB_XrQQ This is much more about what the framework solves: UI as a function of the data, no spaghetti code full of DOM handlers and cross-references that are hard to follow. Now I just used Svelte for this project, which is indeed a simple website which might not need this at all. Still, I…

I didn't see any real transitions. I think I might have seen a bit of fade-in after page load, but that might just be a browser quirk. If the fade is why you're talking about, that can be easily accomplished with just a few lines of CSS; no framework needed.

If there's some transition I didn't see because of the browsers I used (I tried two different browsers on two different devices), then it might be worth using the framework, but I maintain that I haven't seen the demo site show anything that couldn't be done with vanilla HTML and CSS.

Re: How I made a website with Svelte

#110

It was a pleasure reading your article, I hope I can use it as reference for my future svelte project. And I must say that Svelte also caught my eye this year. I gave it a shot in their playground, and I was surprised how intuitive things are. Svelte as a compiler seems very natural an approach to building frontend apps and independent components. My next project will be Svelte on the frontend (SPA), and Elixir+Phoen…

Any particular resources you'd recommend for Elixir/Phoenix? Doing their basic intro guides right now and liking them, but would love anything you did after those that you liked.
Post reply on HN