Live data from Hacker News

Tenets

github.com

151–160 of 162 posts

Re: Tenets

#152
post #25

The direction React/NextJS has taken modern web development is a modern day abomination. I say this as a passionate fullstack developer whos worked for YC startups and a fortune 10 company within the past decade. I appreciate Vercel as a company too; I have no hate towards them but the NextJS 13 release almost made me quit web development. Svelte is an absolute love language to the web and a direction for healing the…

Astro is a pretty cool alternative too

I've been enjoying Astro+Svelte. I tried using Sveltekit and couldn't really get into it; I'm sure there are situations where it would be better than Astro + Svelte, but I don't know what they would be.

Re: Tenets

#153

Earlier quoted context omitted.

> HTML is not the mother language - It's actually pretty terrible for describing dynamic user interfaces. I disagree a lot on HTML here - it's a pretty fantastic way of describing a render and layout tree, so much so that people are embedding HTML-like syntax in programming languages because the syntax is better than what the language already has to offer. To paraphrase something I've heard: JSX proves that HTML actu…

Also, these differences in syntax and opinion are why I vehemently support and work on web components. You shouldn't have to have two incompatible silos of UI building just because of some frankly minor differences in preferences. Component authors and component users should be able to seamlessly interoperate which disagreeing about such trivial things.

Have a blogpost handy? Sounds interesting but I don’t know much about it.

Re: Tenets

#154
post #75

Earlier quoted context omitted.

> JSX proves that HTML actually won. While I think that might be true, similarly, JSX proves that for the dynamic parts of the template, you want a real programming language.

I'd say that it's better to use real programming language, but you shouldn't use it in JSX beyond the simplest statements like ifs and loops. Mixing any logic beyond that with HTML makes a mess of both. I'm personally a fan of minimalist templating engines that provide only simple loops and conditionals so that template has to receive prepared data tree which is created by the actual programming language first and pa…

Sounds like Django, which I’ve found maintainable.

Re: Tenets

#155

Earlier quoted context omitted.

> HTML is not the mother language - It's actually pretty terrible for describing dynamic user interfaces. I disagree a lot on HTML here - it's a pretty fantastic way of describing a render and layout tree, so much so that people are embedding HTML-like syntax in programming languages because the syntax is better than what the language already has to offer. To paraphrase something I've heard: JSX proves that HTML actu…

I personally agree - mileage definitely varies with people. Prefer markup languages over code for describing user-interfaces any day. Find myself quite comfortable with XAML and struggle with SwiftUI.

It depends on the markup format, language, and libraries of course. However in general I prefer code. Why? While it takes a bit longer to get started, you can factor patterns into reusable methods and before you know it are working at a higher level:

    make_fancy_dialog(msg);
Html only recently got templates but I don’t believe they are that powerful.

Re: Tenets

#156

Earlier quoted context omitted.

>HTML is not the mother language - It's actually pretty terrible for describing dynamic user interfaces. Compared to... what? XML? QML? XIB? There's literally nothing better than HTML for UI. Anything else is either buried in a mountain of proprietary nonsense, is platform specific, or is far inferior technically.

Even some of the "proprietary nonsense" is better than HTML. Visual Basic let you just drag-and-drop controls onto a page, arranged in any way you liked! Now, it wasn't responsive , but we didn't have smartphones back then so nobody cared.

There were layout managers in the 90s which were responsive, though they wouldn’t reflow widgets vertically. Similar to horizontal flexbox.

I bet someone could have added the functionality but it just didn’t matter when all screens were squareish.

Re: Tenets

#157

Earlier quoted context omitted.

> I disagree a lot on HTML here - it's a pretty fantastic way of describing a render and layout tree, In the context of the discussion, that would imply that "a render and layout tree" is a good way to describe a UI. That too is subject to serious questions.

Yes, I would claim that. What major, non-game, UI stacks out there aren't structured that way?

Well, the constraint layout system that Apple introduced (sorry, I am drawing a blank on the name) is sufficiently different that I'd say that although technically you could call it a layout tree, that is really missing the point.

Also, the render tree concept doesn't exist in the internals of GTK (at least; I could speculate about Qt but will not). Rendering is done by invalidating rectangles and then finding intersections with widgets; since there is no z-axis stacking, there's only ever 1 widget to be drawn at a given pixel coordinate.

Re: Tenets

#158
post #139

Earlier quoted context omitted.

Previous versions of SvelteKit didn't have this +page handicap. Try older versions if it's still possible and you will love it

Wouldn't make much sense to invest time into an abandoned and unfinished version of SvelteKit.

It's just so you can see how good it was

Re: Tenets

#159
post #77

Earlier quoted context omitted.

Sure... but there are degrees of closeness to HTML and the closer to HTML it is, the less translation you have to do and the easier it is to deal with. That is, the closer to HTML the better. Plain javascript is a crappy way to represent HTML because both the syntax and semantics are different (and sometimes there are conflicts, like with "class"). JSX is better than plain javascript because the syntax is closer, but…

I'm not buying it. Svelte's template language also has different syntax/semantics from HTML as well - arguably just as much. The JSX parts are character for character the same as HTML as well, except for the class/className distinction (which if you have used Preact it does not have that issue).

Svelte does not make any opinions about HTML attributes or tags, unlike JSX which contorts language standards such as `className` or disallowing style="..." without JS in CSS.

Re: Tenets

#160
post #61

Earlier quoted context omitted.

It’s meaningless.

It's absolutely not. It works wonders for the community. Sorry for saying, but I am quite certain such a comment as yours is a rare sight in the svelte community. Everything in svelte is around showing others how to do it. Most questions in the forum are solved with concrete examples despite its awesome documentation. People help each other. Good vibes ;).

That’s all great but “Goob vibes” is thoroughly vague. It doesnt mean anything in particular.
Post reply on HN