Live data from Hacker News

Build your own web framework

vercel.com

61–70 of 155 posts

Re: Build your own web framework

#61

Do we ever think we'll collapse all of the complexity layers for programming on the web? Coming from other languages, I'm finding that the agreed-upon web standards make development super hard (we have to collectively build these towers of babel on top of them, since we can't fix the underlying stuff) I guess WASM maybe is one possible solution here

I think the problem is there aren’t standards. For backend we have decades of proven architecture but for frontend people are still trying to hammer out the philosophy.

Re: Build your own web framework

#64

Earlier quoted context omitted.

> early days of server-side javascript Err ... Netscape's LiveWire introduced server-side Javascript in 1996 even before Java became widely used on the server side. The module convention, the (synchronous) core modules of Node.js, and its canonical http middleware API and express.js/Connect/JSGI is from the CommonJS initiative, a co-op of 2000's SSJS framework developers [1]. [1]: https://www.commonjs.org/

This is an "um ackshually" reply. Nobody used LiveWire and it died a swift death. And don't "um ackshually" me about saying "nobody." You know what I mean.

Classic asp also supports JavaScript, it is old and wide spread in the bowels of legacy sites.

I thought of node as a victory for async more than anything else.

Re: Build your own web framework

#65
post #5

This is a nice overview of modern front-end development but I'm constantly disappointed with what 'web framework' means in node-land. None of these things are strictly necessary when building a web app but authz/authn, user management, databases, server-side logic vs client-side logic, are pretty much always needed. When I see the phrase 'web framework' these are the things I am interested in seeing and they all seem…

The fact that googling 'node user login' returns an insecure result is more indicative of the quality of Google's search results than it is of Node. Node has had a built in password hashing function since before it even hit version 1.0 (pbkdf2) [1]. It also has a built in timing safe comparison function for safely comparing values without leaking data via timing attacks [2]. The crypto module is actually pretty extensive.

If you're looking for a traditional web framework (something similar to Flask or Sinatra) I would take a look at Hapi (which has no third party dependencies and is maintained by one of the original authors of the oAuth spec), or you could always try Express (the most popular Node framework), or Fastify (the fastest Node framework).

[1] https://nodejs.org/dist/latest-v18.x/docs/api/crypto.html#cr...

[2] https://nodejs.org/dist/latest-v18.x/docs/api/crypto.html#cr...

Re: Build your own web framework

#66
post #51

Earlier quoted context omitted.

The edge network of a Vercel/Netlify is very hard to replicate in cloud as a small startup.

I wasn't referring to the edge network for _startups_ to replicate. I was more wondering how AWS and others can replicate Vercel/Netlify and eat their lunch. They have no defensible moat as a company.

The same reason IBM can’t. They are incumbent and have an enterprise world view. They are necessarily going to be more bloaty. IAM yay!

I use Vercel (and Netlify) and once you spend the 2 minutes setting it up you never think much of it again as it just does its job.

Re: Build your own web framework

#67

Do we ever think we'll collapse all of the complexity layers for programming on the web? Coming from other languages, I'm finding that the agreed-upon web standards make development super hard (we have to collectively build these towers of babel on top of them, since we can't fix the underlying stuff) I guess WASM maybe is one possible solution here

This is exactly why I started building "Linux on the Web" about a decade ago. LOTW is meant to completely abstract away all the weird "browser-isms" that seem to overwhelm people like you who just want to sit down and do Plain Old Programming. I am currently in the midst of supporting a good selection of game console emulators (GB, NES, and SNES are already working), and WASM is indeed a blessing for that! https://lo…

I love this so freaking much!!!! Definitely going to be playing with this over the weekend!

Re: Build your own web framework

#68

Earlier quoted context omitted.

Its pretty hard to trust a lot of the eng content on the web right now; so much blogspam, self promo stuff from frankly underqualified people who are trying to build up a profile to get hired. Somehow I still don't feel that way about StackOverflow. Google and random results though... yikes.

Maybe that's the fault of those "who know" but don't write and contribute online ?

Those who know are fewer, they get outnumbered by the low quality content.

Re: Build your own web framework

#69

Do we ever think we'll collapse all of the complexity layers for programming on the web? Coming from other languages, I'm finding that the agreed-upon web standards make development super hard (we have to collectively build these towers of babel on top of them, since we can't fix the underlying stuff) I guess WASM maybe is one possible solution here

on the note of babel, I don't usually do front end stuff but the other day I wanted to transpile one single javascript file to support older browsers, one time and then never again. I tried for like an hour and I could not figure out how to do it, without setting up like a whole environment/pipeline for it. My expectation going into it was "surely there's some sort of command that just lets you do input file -> output file", but i struggled until I just gave up and used their web demo thing to do it (which tbh I should have just done to begin with, but I had not anticipated it would be so difficult).

I mean I'm sure it's possible somehow, but it sure isn't obvious. And I get that this is not at all the usual use case for it, but still

Re: Build your own web framework

#70
post #2

I'm struggling with the idea that React is a primitive used to build a Web Framework.

React can be used as a templating library server-side in a node environment (like handlebars). It's a bit heavy for the task but it works.

A huge benefit React (and anything else that uses JSX) has over text-based templating is that you can strictly lint/typecheck JSX because ultimately it's just syntactic sugar over plain JS.
Post reply on HN