Live data from Hacker News

Build your own web framework

vercel.com

91–100 of 155 posts

Re: Build your own web framework

#91

Earlier quoted context omitted.

> I thought of node as a victory for async more than anything else. In terms of server-side development? Async is rather useless on the server side. Can't generate a web page or JSON blob with the results of a database query until you actually get those results from the database. I can see the application for something like websockets but I presume most Node sites aren't using those. I figured its success was due to…

> In terms of server-side development? Async is rather useless on the server side. Can't generate a web page or JSON blob with the results of a database query until you actually get those results from the database. This is precisely why async (well, cooperative concurrency generally) is useful, whether on a server or otherwise. Blocking for things you can’t do yet is a waste of idle resources. There are plenty of oth…

I don't understand. What can a Node app do in between making a database request and when the response arrives?

Re: Build your own web framework

#92

What a sad state “modern” web dev is in. I’m glad that I’m living in a much faster and simpler world, but I fear, for end users and developers alike, that it is an ever shrinking one. I really can’t understand the appeal of what, to my eyes, amount to endless layers of needless complexity. I wish articles such as this one were more common: https://alexcabal.com/posts/standard-ebooks-and-classic-web-... This is the we…

> I wish articles such as this one were more common: > https://alexcabal.com/posts/standard-ebooks-and-classic-web-... > This is the web I want and love. Worth noting that according to their article, Standard EBooks does not use javascript on their page. This might work for them, and it might work for you, but in many cases users want SPAs and interactivity (Google Maps, Google Docs, etc)

SPAs and interactivity are different and independent things.

Re: Build your own web framework

#93

Having this page open for ~10 seconds on my iphone SE (I believe recently hailed as the greatest of phones) crashes safari every time. Can someone able to read the page tell me if this article is ironic or not?

Graham, it has the phrase about how you can, "hydrate dynamic components".

Likened most to the phrase; Simpsons like, "Der".

Re: Build your own web framework

#94

What a sad state “modern” web dev is in. I’m glad that I’m living in a much faster and simpler world, but I fear, for end users and developers alike, that it is an ever shrinking one. I really can’t understand the appeal of what, to my eyes, amount to endless layers of needless complexity. I wish articles such as this one were more common: https://alexcabal.com/posts/standard-ebooks-and-classic-web-... This is the we…

I think our industry will have a wake up call during the recession. At least I hope so. Companies need so many people because developers have become parasites sucking up all company resources writing a two text field form.

Re: Build your own web framework

#95

What a sad state “modern” web dev is in. I’m glad that I’m living in a much faster and simpler world, but I fear, for end users and developers alike, that it is an ever shrinking one. I really can’t understand the appeal of what, to my eyes, amount to endless layers of needless complexity. I wish articles such as this one were more common: https://alexcabal.com/posts/standard-ebooks-and-classic-web-... This is the we…

> I wish articles such as this one were more common: > https://alexcabal.com/posts/standard-ebooks-and-classic-web-... > This is the web I want and love. Worth noting that according to their article, Standard EBooks does not use javascript on their page. This might work for them, and it might work for you, but in many cases users want SPAs and interactivity (Google Maps, Google Docs, etc)

> users want

I hear that so much, except they don't. Most sites aren't Figma.

What we're seeing is the proliferation of apps that have been traditionally just desktop apps, but being made for the web. We have to distinguish the web as an app delivery tool (Google Docs, Figma) vs what most developers are writing. CRUD apps. And for those you can ask the server for state often.

Re: Build your own web framework

#96

What a sad state “modern” web dev is in. I’m glad that I’m living in a much faster and simpler world, but I fear, for end users and developers alike, that it is an ever shrinking one. I really can’t understand the appeal of what, to my eyes, amount to endless layers of needless complexity. I wish articles such as this one were more common: https://alexcabal.com/posts/standard-ebooks-and-classic-web-... This is the we…

For JS developers trying to achieve what's outlined in the linked article: https://github.com/cheatcode/joystick

Very thin abstractions over HTML, CSS, JavaScript and Node.js that don't separate you from what you're trying to ship to the browser: HTML, CSS, and JavaScript. No "magic" or "hacks," just a bit of plumbing to make you more productive.

Re: Build your own web framework

#98

Earlier quoted context omitted.

> In terms of server-side development? Async is rather useless on the server side. Can't generate a web page or JSON blob with the results of a database query until you actually get those results from the database. This is precisely why async (well, cooperative concurrency generally) is useful, whether on a server or otherwise. Blocking for things you can’t do yet is a waste of idle resources. There are plenty of oth…

I don't understand. What can a Node app do in between making a database request and when the response arrives?

Make other database requests, or return the responses derived from prior requests. Or just anything else waiting in the event loop queue, including queueing more work.

You can think of the concurrency model like green threads with only one thread available, or actors in a single system process.

Edit to elaborate: yield/suspend is key here. The way it works is yielding/suspended calls have their outstanding work put behind the extant queue which proceeds until each next queued routine suspends or returns, and once that set of blocking work completes the routine which suspended can proceed until it yields again or returns. The obvious pathological case is long running work which doesn’t suspend. Which if it’s I/O or idle-heavy should be refactored to yield, if it’s compute-heavy it should be treated as an optimization or scaling target.

Re: Build your own web framework

#99

What a sad state “modern” web dev is in. I’m glad that I’m living in a much faster and simpler world, but I fear, for end users and developers alike, that it is an ever shrinking one. I really can’t understand the appeal of what, to my eyes, amount to endless layers of needless complexity. I wish articles such as this one were more common: https://alexcabal.com/posts/standard-ebooks-and-classic-web-... This is the we…

A framework is a boxed architecture. That appeals to some people more than others.

Architecture is just a matter of organization. Ease with basic organization is what separates experts from laymen in any field.

Re: Build your own web framework

#100
This is precisely the most common mistake doomed project managers make.

There are aspects to modern web interfaces which one cannot know a priori. Thus, the first design will almost always be implemented incorrectly, and it is usually better to choose an existing framework.

Many have found these useful:

https://www.phoenixframework.org

https://keystonejs.com

https://quasar.dev

https://angular.io

Post reply on HN