Live data from Hacker News

Show HN: SingUI – compose modern front end with pure vanilla JavaScript

stackblitz.com

11–15 of 15 posts

Re: Show HN: SingUI – compose modern front end with pure vanilla JavaScript

#11
post #2

I'm sure this is a great framework, but I thought "vanilla JavaScript" meant just writing everything from scratch and not using a framework. Have I misunderstood what this term means?

Here I'd like to separate it from those frameworks that require a "compiler" to work... Sorry for mistaken "vanilla" for different meanings...

Can we not just use react without jsx? Is that still a thing?

Re: Show HN: SingUI – compose modern front end with pure vanilla JavaScript

#12

There are frameworks that already exist that don't require compiling, like hyperapp (but others, too). Even React can be written without compiling - you don't _have_ to use JSX or advanced babel. So I read through the example, and I do get it, but I'm not a fan, but I also think you put a lot of thought into this in general. If you want adoption, I think you need to focus on at least two things: - Testing (part 1). Y…

1. This was just a POC, and there's yet no document. Testing may be added later but for there's only 400 lines of code, it could hardly go wrong. The demo itself acts as a proof of correctness as well. 2. Hyperapp actually does have some sort of compiling (at least parsing a string for a tag) 3. There're far more advanced usages that you may not aware of, so build function has no need to care about whether it's in te…

Hopefully I didn't come off aggressively, I was just trying to give you some feedback.

In terms of hyperapp, that is as much compiling as `document.createElement("a")`, which is what your library does, too.

I'm not saying write redundant tests. Tests are more than just one person's psychological comfort. Another great example is if you are accepting PRs into a larger codebase, having tests means you know other people aren't breaking previously working parts of your app. Tests can also work as documentation, since a test describes how pieces of your app should work.

I'm confused why you think any of my suggestions imply that you should make your library heavy/larger/unmanageable.

Re: Show HN: SingUI – compose modern front end with pure vanilla JavaScript

#13

Earlier quoted context omitted.

1. This was just a POC, and there's yet no document. Testing may be added later but for there's only 400 lines of code, it could hardly go wrong. The demo itself acts as a proof of correctness as well. 2. Hyperapp actually does have some sort of compiling (at least parsing a string for a tag) 3. There're far more advanced usages that you may not aware of, so build function has no need to care about whether it's in te…

Hopefully I didn't come off aggressively, I was just trying to give you some feedback. In terms of hyperapp, that is as much compiling as `document.createElement("a")`, which is what your library does, too. I'm not saying write redundant tests. Tests are more than just one person's psychological comfort. Another great example is if you are accepting PRs into a larger codebase, having tests means you know other people…

I mixed hyperapp with hpyerscript.. My bad

In terms of "heavy", it's actually a problem with node's package management. Once I include test frameworks as dev dependencies, there's a high chance of installing my package will get the test framework together with it's whole bunch of dependencies installed as well - very unnecessary and time consuming.

Re: Show HN: SingUI – compose modern front end with pure vanilla JavaScript

#14

Earlier quoted context omitted.

Here I'd like to separate it from those frameworks that require a "compiler" to work... Sorry for mistaken "vanilla" for different meanings...

Can we not just use react without jsx? Is that still a thing?

You didn't get the point.

What I'm tring to do is making a "writable" solution with pure JavaScript, not needing to write a lot of `React.createElement` or something similar. I even got `attr` and `prop` proxied to the correct element when building, no need to extract them form arguments each time inside an element.

What's more, it's only less than 5kb without gzip.

Re: Show HN: SingUI – compose modern front end with pure vanilla JavaScript

#15

Earlier quoted context omitted.

Hopefully I didn't come off aggressively, I was just trying to give you some feedback. In terms of hyperapp, that is as much compiling as `document.createElement("a")`, which is what your library does, too. I'm not saying write redundant tests. Tests are more than just one person's psychological comfort. Another great example is if you are accepting PRs into a larger codebase, having tests means you know other people…

I mixed hyperapp with hpyerscript.. My bad In terms of "heavy", it's actually a problem with node's package management. Once I include test frameworks as dev dependencies, there's a high chance of installing my package will get the test framework together with it's whole bunch of dependencies installed as well - very unnecessary and time consuming.

No problem, the JS ecosystem is so full that there is a lot of naming overlap.

Nothing should be stopping you from just making a test file, you don't _have_ to use a framework. NodeJS even comes bundled with https://nodejs.org/api/assert.html .

Post reply on HN