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

32 pointsposted a day ago
by LukeB42

19 Comments

jaen

a day 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?

6r17

a day 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 !

ricardobeat

20 hours ago

The library is actually ~1400 lines of code, and 51KB in size. Not very slim by JS framework standards, so focusing on that for the headline feels misleading.

LukeB42

a day 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.

hirako2000

a day 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

a day 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

a day ago

Would you prefer to see ESM or neither?

karmakaze

a day ago

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

DiabloD3

a day 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

a day 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

a day 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.

turtlebits

a day ago

OP has a valid point. On my Mac, it's unreadable without zooming in. I immediately left the page.

DiabloD3

a day ago

Zero code is in your head if you can't read it.

The predominant monitor in existence is your average 24" 1080p monitor, sat at, on average, 32" away from the head. The average person has worse than 20/20 vision.

You must test your website in such conditions and make sure it is readable, and also make sure it meets at minimum WCAG A, but preferably the whole way to AAA if possible.

LukeB42

a day ago

Thank you but the predominant monitor's probably a smartphone. The average professional is probably using a 4k monitor at the moment.

Everything in the free documentation I've provided you out of my own time and money that you're referring to exists in relation to the other elements in that page, so to get the experience you're after simply ctrl+scroll and change the CSS zoom level like the riot at parties that you could be or catch up with circa 2013-2014 and invest in a 4k display please.

rschristian

a day ago

"Zoom in" or "buy a different monitor" is not an appropriate response to people bringing up the plethora of objective & subjective a11y issues on the page.

If you really don't care about providing an accessible experience, try this: no one will use the tool if they can't read the docs. With my monitor and eyesight, it's entirely illegible.

LukeB42

a day ago

Name one objective issue with what I've provided your ungrateful self for free and do it in HN's 12pt again because I need a laugh.