Live data from Hacker News

Show HN: 1 KB JavaScript framework for building front-end applications

github.com

31–40 of 44 posts

Re: Show HN: 1 KB JavaScript framework for building front-end applications

#31

Earlier quoted context omitted.

I used to need to use a large web app like that at work. You'd get a login page. Submitting your login caused the app to load, which was many MB. Once that was all downloaded, the page would finally display, and you could do what you needed to. (In our case, you usually only needed to look something up quickly and be done, which is a bit different than your case.) But the real kicker is... the company VPN was slow. R…

That's painful. I definitely think that there are cases where enterprise users would be best served by simple server rendered HTML or minimal JS. Still, I can't help but think that the real low-hanging fruit is the slow VPN. How much time was wasted waiting for the network? So many companies are penny-wise pound-foolish.

I think you have it backwards here. Most companies are pound wise in the sense that they consider the time cost of employees in a project management setting, but don't account for the small but frequent time wasted waiting on a slow network.

It's not impossible but it's a tough sell arguing for a 50k expenditure for better hardware for the VPN will actually save the company time worth >50k.

Re: Show HN: 1 KB JavaScript framework for building front-end applications

#32
post #31

Earlier quoted context omitted.

That's painful. I definitely think that there are cases where enterprise users would be best served by simple server rendered HTML or minimal JS. Still, I can't help but think that the real low-hanging fruit is the slow VPN. How much time was wasted waiting for the network? So many companies are penny-wise pound-foolish.

I think you have it backwards here. Most companies are pound wise in the sense that they consider the time cost of employees in a project management setting, but don't account for the small but frequent time wasted waiting on a slow network. It's not impossible but it's a tough sell arguing for a 50k expenditure for better hardware for the VPN will actually save the company time worth >50k.

Hmm, maybe I underestimate the cost of VPN upgrades.

I'd say that there's a point where the overhead of spending money becomes high enough that companies will waste a lot of expensive employee time to avoid requisitioning something.

And although companies track high level time costs in a project management context, I'm not sure whether they're conscious of the way that time use can be driven by bits of waste.

That sorta fits "penny wise, pound foolish", but sorta doesn't.

Re: Show HN: 1 KB JavaScript framework for building front-end applications

#35
post #33

Would love to see the code documented with docco, like so: http://dak0rn.github.io/prunk/ The whole library would be documented on one page which is a fairly low entry barrier for new developers. Thanks for this awesome project!

I like this approach a lot, especially as implemented in [1].

Perhaps a tutorial, or some examples can be documented in that style. Hyperapp + hyperscript-helpers[2] is my favorite combo at the moment.

1. http://dave.kinkead.com.au/modelling-the-boundary-problem/

2. https://github.com/ohanhi/hyperscript-helpers

Re: Show HN: 1 KB JavaScript framework for building front-end applications

#36

It is not a library. It is a framework. The distinction is important and whatever you choose influences how you test, develop and maintain your software. Libraries are slaves of your code. When you use libraries you have control. When you use a framework it is the opposite, you depend on the magic provided by it and ultimately you lose part of that control. The choice is clear for me.

One thing I like about the Hyperapp approach though is use of plain JavaScript objects and pure functions to build your app. This means that it's possible to only have a dependency on Hyperapp in one place as part of assembling the overall app.

Re: Show HN: 1 KB JavaScript framework for building front-end applications

#37
post #33

Would love to see the code documented with docco, like so: http://dak0rn.github.io/prunk/ The whole library would be documented on one page which is a fairly low entry barrier for new developers. Thanks for this awesome project!

That would be so nice! I am working on a "how it works" post, but it's still not finished.

If you are interested have a look here:

https://gist.github.com/jbucaran/8dc33b7947f3193eb2ea3d5700e...

Re: Show HN: 1 KB JavaScript framework for building front-end applications

#38
post #7
post #4

So I'm looking at the example JS snippet and suddenly it embeds HTML in the middle. Can someone who knows current JS explain how this even parses?

It's called JSX. I used it in the example because it's popular among the JavaScript crowd, popularized by React. That code is not directly consumed by the browser, instead, it's compiled into the code below by a compiler like Babel, minified and bundled into a tiny blob of code we ship to the browser. app({ state: { count: 0 }, view: (state, actions) => h("main", {}, [ h("h1", {}, [state.count]), h("button", { onclic…

Indeed. Thanks very much.

Coincidentally, the h() function up there looks very similar to what we used to render HTML in a 15-year-old Perl application that I maintained at work.

Re: Show HN: 1 KB JavaScript framework for building front-end applications

#39
post #33

Would love to see the code documented with docco, like so: http://dak0rn.github.io/prunk/ The whole library would be documented on one page which is a fairly low entry barrier for new developers. Thanks for this awesome project!

That would be so nice! I am working on a "how it works" post, but it's still not finished. If you are interested have a look here: https://gist.github.com/jbucaran/8dc33b7947f3193eb2ea3d5700e...

Neat! The great thing about docco is that it takes the comments right from the source and creates that page out of it. So you have both a pretty website and the same documentation directly in the code.

Re: Show HN: 1 KB JavaScript framework for building front-end applications

#40
post #23

Another small template engine similar to React is ".dom", weighing in at only 500 bytes! https://news.ycombinator.com/item?id=13605673 It only works in modern browsers supporting Proxy.

Looks really cool, other than Object.assign, Proxy and Symbol I think this is quite an achievement for that size, but I am pretty sure it doesn't support keyed DOM updates. Hyperapp was also under 1 KB before we introduced the keyed VDOM.

What is keyed DOM updates? Is that the equivalent of React's `key` property?

https://facebook.github.io/react/docs/lists-and-keys.html#ke...

Post reply on HN