Live data from Hacker News

Build your own web framework

vercel.com

111–120 of 155 posts

Re: Build your own web framework

#111

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?

Interesting. Based on this series of responses, you moved from "async is useless" to "actually, I don't actually know what async processes can do, and what happens between each process." It implies to me that your initial comment was written with little understanding of what you purported to denigrate.

Re: Build your own web framework

#112

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've spent the previous month working with React for the first time and I find myself longing for the simpler days. There's absolutely no reason why it was needed for this project, much less for it needing to be a SPA. The codebase is bloated, the dev environment is slow and unwieldy (even on my M1 Max) and just doing simple things takes longer. The only small saving grace is we're using TypeScript.

If we're ever in a position to rewrite it I'll be pushing hard for Rails or Django with simple server rendered HTML. Anything less would be doing us and our internal customers a disservice in terms of how quickly we can deliver features.

Re: Build your own web framework

#113
post #53

I’ve been looking a lot at RedwoodJS, but it doesn’t seem to be “just right”. Don’t know if I’m bike-shedding, either. I do think React is a requisite for a rich application (not blog). I think auth + DB + deploy + fe/be in one asset is challenging. I certainly get why folks build their own constantly. But you burn out before you make any real progress. I’m not sure we’re really achieving any higher level abstraction…

You might dig Joystick: https://github.com/cheatcode/joystick .

Is there something explaining what differentiates joystick from other frameworks? The Readme explains what joystick is but not what's unique about it.

Re: Build your own web framework

#114

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.

>Architecture is just a matter of organization.

Have to say, I think that's somewhat oversimplifying. Architecture is a lot more than organization. It's also a broad and deep understanding of external and internal resources, the creative design process, corporate vision, industry insight, risk analysis, project management, stakeholder politics, marketing, and technology.

It's very possible to be super organized but still end up with a discombobulated frankenstein of a project, or one that's under water on time or budget, or a design that's too niche and misses the market.

Re: Build your own web framework

#115
post #112

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've spent the previous month working with React for the first time and I find myself longing for the simpler days. There's absolutely no reason why it was needed for this project, much less for it needing to be a SPA. The codebase is bloated, the dev environment is slow and unwieldy (even on my M1 Max) and just doing simple things takes longer. The only small saving grace is we're using TypeScript. If we're ever in…

I'm not pro-react but I find it much saner than rails/django. My brain can't wrap writing server side blend of js and html, the component way makes code pretty clean right away, and live reload is faster in vue/react than django (afaik). Not saying that the js world is great by any mean, or that in your case simple html templates would do, but most of the time I rapidly feel the need to have react/vue to make things clearer or safer (and prettier).

Re: Build your own web framework

#116

Earlier quoted context omitted.

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

Interesting. Based on this series of responses, you moved from "async is useless" to "actually, I don't actually know what async processes can do, and what happens between each process." It implies to me that your initial comment was written with little understanding of what you purported to denigrate.

This isn’t helpful. They very clearly and frankly asked. Don’t shame people for not knowing something you already know, they’ll very probably be turned off from learning it.

Re: Build your own web framework

#117
post #81

Earlier quoted context omitted.

With modern hardware it is very easy to serve millions of daily users from a single machine with simple software. No one bothers because everyone loves their fast-as-a-snail framework in their favorite slow scripting language and they need massive infrastructure to scale it to serve less than 1k concurrent users. Programmers have no one to blame but themselves.

Speak for yourself. Tools these days are much more ergonomic, not to mention faster than ever before. I host a website on DigitalOcean with 0.5 GB RAM and 1 vCPU that can support millions of requests and runs with just a git push. Try doing that in the 90s.

In the 90s, it was all different. Back then, we had to type ‘make install’.

Re: Build your own web framework

#118
post #73

This is too funny. I predicted that when I entered this post the first comment would be HN people bemoaning complexity. And indeed it was. The commenter's proposed solution was WASM. Wasm doesn't solve the issues in this post. What does this post talk about: - serving content from the edge (wasm doesn't do anything there) - asset optimization (wasm doesn't help) - pre-rendering complex pages to static HTML+css (wasm…

It’s like they are either getting old and don’t like to keep up with modern web development but it’s easy to see this behavior elsewhere too. Aversion towards new way of doing things where people feel like the old way was just working is too common and predictable sometimes. “Things work” using old way, but, does that mean that no optimizations are to be made? Optimizations further lead to reiteration of the way we d…

Young developer thing all motion is progress. Old developers know most is not, but the trap at the other end of the continuum is thinking no motion is progress.

There’s always a little progress, sometimes quite a bit. But a lot of the res5 is cycling between two options that both have very bad corner cases.

Re: Build your own web framework

#119

Earlier quoted context omitted.

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 b…

I'm trying to envision a situation where you'd want to make more than one database request at the same time. Like I guess on a blog or something, you could load the user record of the current user and then load the blog post details at the same time, but then there's a chance that the user doesn't have permission to view that blog post and then the request for the post has gone to waste, right? It goes against my instincts to kill a request as quickly and directly as possible if something can't be accessed.

I don't know, I'm willing to accept that maybe I'm just not used to thinking of developing back-end web apps that way. But async still just doesn't seem as useful as it would in a GUI desktop app.

Re: Build your own web framework

#120

Earlier quoted context omitted.

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

Interesting. Based on this series of responses, you moved from "async is useless" to "actually, I don't actually know what async processes can do, and what happens between each process." It implies to me that your initial comment was written with little understanding of what you purported to denigrate.

Well, I understand what they can do in desktop and mobile GUI apps. But server-side web requests don't work that way; there's a beginning and an end and a pretty straight line between the two.
Post reply on HN