Live data from Hacker News

A Web Framework for Zig

jetzig.dev

11–20 of 26 posts

Re: A Web Framework for Zig

#11
Nice, looks like a decent framework. I used to do a lot of python for backend web apps, but recently jumped on the hypetrain and used go for developing a web app (devops) tool. Single binary, easy deployment etc etc.

From that experience, I think this competes with go based web apps mostly. And if so, it makes a good chance at becomming succesful. Zig seams to have a better type system. Additionally the quality of documentation for this project is pretty good. That is something the go ecosystem seems to be lacking in general. The rest of the go perks are there as well. Single binary etc.

Now the ecosystem needs to catch up. Nice!

Re: A Web Framework for Zig

#12
post #9

I don't know zig - is this query type safe in that if I change a member name in the struct it'll fail to compile? https://github.com/jetzig-framework/jetquery usually I do this with codegen, pretty cool if zig's type system is this powerful Also holy crap: for (cat.homes This is like django!

Yes, all reflection in Zig is static reflection, so that should generate a compile error (although how obvious it will be is a different question).

Re: A Web Framework for Zig

#13
post #4

This site makes a big point of using the term "RESTful" repeatedly, but it seems to be JSON-based by default? I don't know why modern web frameworks insist on continuing to misuse or misapply the term despite a fairly large amount of messaging recently about how exactly this term is misapplied, and the resurgence of frameworks and tools that do correctly apply it, e.g. HTMX, Datastar, Alpine AJAX. Otherwise, this loo…

That's a fight we lost two decades ago now unfortunately. Nearly any modern-ish API is a JSON-based RPC. There's nothing wrong with that, JSON RPC is a plenty fine solution for many common use cases, it just isn't REST.

Note that there is also a standard for JSON-based RPC systems, called JSON-RPC [0]. Not every JSON-based self-titled "RESTful" API uses JSON-RPC.

[0]: https://www.jsonrpc.org/

Re: A Web Framework for Zig

#14
post #7
post #3

Jetzig reads funny in german something like "now-ish" Jetzt = now [1] German adjective suffix: -ig [2] The German suffix -ig attaches to nouns, verbs and even adverbs. Given this flexibility, it ranks among the most common adjective endings in German. You can use -ig words to express that something is a certain way or happens a certain way. traurig: sad, sadly wässrig: watery knackig: crunchy, crispy abhängig: depend…

It's a perfectly fine name. There's a billion dollar web framework company named Zeit which famously built https://now.sh

They rebranded to Vercel, most likely because Zeit turned out to not be a perfectly fine name.

Re: A Web Framework for Zig

#16
post #3

Jetzig reads funny in german something like "now-ish" Jetzt = now [1] German adjective suffix: -ig [2] The German suffix -ig attaches to nouns, verbs and even adverbs. Given this flexibility, it ranks among the most common adjective endings in German. You can use -ig words to express that something is a certain way or happens a certain way. traurig: sad, sadly wässrig: watery knackig: crunchy, crispy abhängig: depend…

The "-ig" suffix corresponds roughly to English's "-ish", I would say. As a native speaker of neither German nor English, though.

Re: A Web Framework for Zig

#17
post #7

Earlier quoted context omitted.

It's a perfectly fine name. There's a billion dollar web framework company named Zeit which famously built https://now.sh

They rebranded to Vercel, most likely because Zeit turned out to not be a perfectly fine name.

Do you mean because of the newspaper called _Die Zeit_?

Re: A Web Framework for Zig

#19
post #4

This site makes a big point of using the term "RESTful" repeatedly, but it seems to be JSON-based by default? I don't know why modern web frameworks insist on continuing to misuse or misapply the term despite a fairly large amount of messaging recently about how exactly this term is misapplied, and the resurgence of frameworks and tools that do correctly apply it, e.g. HTMX, Datastar, Alpine AJAX. Otherwise, this loo…

Being RESTful and the data encoding used are largely orthogonal aspects of an API.

Wikipedia RESTful article says:

> The formal REST constraints are as follows:[10]

> Client/Server – Clients are separated from servers by a well-defined interface

> Stateless – A specific client does not consume server storage when the client is "at rest"

> Cache – Responses indicate their own cacheability

> Uniform interface

> Layered system – A client cannot ordinarily tell whether it is connected directly to the end server, or to an intermediary along the way

Re: A Web Framework for Zig

#20
post #4

This site makes a big point of using the term "RESTful" repeatedly, but it seems to be JSON-based by default? I don't know why modern web frameworks insist on continuing to misuse or misapply the term despite a fairly large amount of messaging recently about how exactly this term is misapplied, and the resurgence of frameworks and tools that do correctly apply it, e.g. HTMX, Datastar, Alpine AJAX. Otherwise, this loo…

Ha I came here to complain about the same thing.

Kinda makes me disappointed in the authors especially when they link to the REST wikipedia page as if they know what it means.

Post reply on HN