Better HN
topnewbestaskshowjobs
Log inSign up

terrablue

25 karma · joined Mar 14, 2023 (3y ago) · 19 submissions

Submissions

comment 4mo ago · link · parent

The primary innovation is flexibility, simplicity and official support for a wide array of modules. Give it a shot, I don't think you'd regret it.

comment 4mo ago · link · parent

Hey. There are many use cases that involve mixing frontends. On the Primate website itself, the RSS feed is a route previously served by the Handlebars module (because it needed some logic), now by the (a bit more minimal) pure HTML module.

The rest of the website used to be written in Svelte, but the bundle got unnecessarily big. Because it uses Primate, I could rewrite the frontend part using Marko, shaving off around 30% of the client bundle size. Those are not things you can even try out if you're using one of the lock-in meta-frameworks. So a good framing of the counter question would be, why commit when you don't have to?

However, even if you never end up mixing two or more frontends: you have access to all other features using the frontend of your choice.

comment 4mo ago · link · parent

Just a quick mention that there is next to no coupling. If you don't use `primate/store`, none of the ORM code gets pulled in. You could be using any other database client.

The same applies to sessions, i18n, or any frontend. They're all either path'd imports or distinct packages.

comment 4mo ago · link · parent

Hey, thanks for the feedback, sorry for that. Should be fixed now.

5.

Primate Is the Last Great Web Framework(superarch.org ↗)

37 points · by terrablue · 4mo ago · 48 comments

6.

Primate 0.40: Route pages, store enums, async schemas and events(primate.run ↗)

15 points · by terrablue · 4mo ago · 8 comments

7.

JavaScript server-side interoperability with rcompat(bytecode.news ↗)

9 points · by terrablue · 6mo ago · discuss

8.

Primate 0.37: Revised modules, database migrations, and typed environment access(primate.run ↗)

3 points · by terrablue · 7mo ago · discuss

comment 2y ago · link · parent

Primate gets close to that -- there is a webc handler with props support: https://primatejs.com/modules/web-components

The webc handler does lack a few things like hydration, and this can be added if users show interest in it.

comment 2y ago · link · parent

Hey. Regarding 1, compatibility is handled by a separate library, Primate's only dependency, rcompat: https://github.com/rcompat/rcompat ; it's a unified compat layer around Node, Deno and Bun.

As for 2, what would you consider a React-like example? The examples on the frontend are meant to illustrate commonalities between different frontends.

11.

Primate adds support for Python routes(primatejs.com ↗)

4 points · by terrablue · 2y ago · discuss

12.

PrimateJS adds support for Go Wasm routes(primatejs.com ↗)

8 points · by terrablue · 3y ago · 4 comments

comment 3y ago · link · parent

First metaframework to support the big three, and a unified I18N API for frontends

14.

Release 0.25: Native Deno Support, Internationalization for Svelte/React/Solid(primatejs.com ↗)

3 points · by terrablue · 3y ago · 2 comments

15.

PrimateJS now supports Bun natively(primatejs.com ↗)

4 points · by terrablue · 3y ago · 1 comment