top | item 47205659

Show HN: Vertex.js – A 1kloc SPA Framework

25 points| LukeB42 | 10 hours ago |lukeb42.github.io

Vertex is a 1kloc SPA framework containing everything you need from React, Ractive-Load and jQuery while still being jQuery-compatible.

vertex.js is a single, self-contained file with no build step and no dependencies.

Also exhibits the curious quality of being faster than over a decade of engineering at Facebook in some cases: https://files.catbox.moe/sqei0d.png

17 comments

order

DiabloD3|7 hours ago

I was going to say that font is unreadable, but its Courier New.

By my own extensive testing[1], it's optimal at minimum 18px, you're at 13.5px.

[1]: https://github.com/Diablo-D3/dotfiles/blob/master/fontsizes....

chrismorgan|4 hours ago

Courier New is a bad font that no one should choose to use. In typical font-weight terms, where Regular should be 400, it’s 200–250, because it was improperly digitised, not taking ink bleed into account. Windows put some hacks into ClearType to make it render a little less badly, but they’re not dependable these days.

(“Courier”, as provided by macOS, is fine. But Courier New is irredeemably bad.)

Concerning font-family declarations, if you’re doing something like `"Courier New", Courier, monospace`—please just write `monospace`.

(I’m not going to address the font size.)

LukeB42|7 hours ago

Beauty /is/ in the eye of the beholder. The rationale /here/ is that the more text in a page the more code you'll fit in your head the more you'll get done, the more confidence you'll have and again the more you'll achieve.

6r17|6 hours ago

1kloc is a bit abstract ; it seems you are in a great position to give a true bundled weight ; preact is about 3kb which is my fav for years - good job for the effort and results !

LukeB42|6 hours ago

9kb (minifier+brotli)

We could remove 3kb by removing the router but that's not gonna happen. You're more than welcome to minify+brotli it yourself if you use vertex.js in production.

jaen|6 hours ago

Huh, interesting... why have both React components and Mustache-style templates in the same framework? They perform the same function?

What's the use case for mixing them?

LukeB42|6 hours ago

React components might eventually be removed in favor of making the templating system as fast and as elegant as possible but for the time being they provide flexibility.

You can read https://lukeb42.github.io/vertex-interop.html for more info.

hirako2000|4 hours ago

A bit surprised to see a new framework boasting to ship as UMD. Are developers still using commonjs? I'm sure some continue to CDN inject libraries. But even then ESM is well supported.

leptons|2 hours ago

>Are developers still using commonjs?

Yes, and every other flavor too. "Developers" isn't a single hive-mind entity, and there are many different purposes for javascript, and many different kinds of systems where javascript can be used.

LukeB42|4 hours ago

Would you prefer to see ESM or neither?

karmakaze|3 hours ago

Annoyingly there's already a framework called Vert.x for JVM but there's also Vert.x Node.js