Live data from Hacker News

Ask HN: What novel tools are you using to write web sites/apps?

news.ycombinator.com

111–120 of 333 posts

Re: Ask HN: What novel tools are you using to write web sites/apps?

#112
post #96

This partially might be more of a what's old is new again, but here's what I use: - 100% server side rendered - Progressively enhanced (fully works without JS, but having JS enabled makes it nicer) - In select places where I need SPA-like snappiness I use a ~100 line long DOM diffing algorithm (I request full HTML through AJAX and diff it into the current page; if the user has no JS enabled then the page just refresh…

how do you control for swapping to much?

I don't.

Linux's memory management subsystem is really good. It's almost magic. And modern SSDs are really fast. So whatever swapping is going on in the background I really don't feel it.

It's basically an OS managed database. Instead of the SQL server doing the swapping to-and-from the disk, Linux does it for me.

Re: Ask HN: What novel tools are you using to write web sites/apps?

#115
post #103

Earlier quoted context omitted.

> So you don't have mutable data shared between threads then? I might have worded that one sentence a little better, sorry. I do technically need to share data between threads, since my event loop runs on multiple threads, so if I want to mutably modify something I do need to wrap it either in a `Mutex` or an `RwLock` and lock it. What I meant was that it is not the same as a "transaction" in the SQL sense. It can't…

So it's a simple mmap database like early versions of MongoDB? I like using atomic commands, but I imagine it would become tedious fast to do the extra work of doing the accounting of the transaction manually every time you want to do a non atomic transaction.

> So it's a simple mmap database like early versions of MongoDB?

Even simpler. I use mmap only for things that I build offline and that never change during the runtime. Everything else is just kept as your garden variety objects in memory.

(Well, although I guess you could say it is an mmap database, it's just that the mmaped file is the swap, and the OS manages it for me.)

> I like using atomic commands, but I imagine it would become tedious fast to do the extra work of doing the accounting of the transaction manually every time you want to do a non atomic transaction.

In my case it's not really tedious at all. Usually when I want to mutate something it looks something like this:

    let user_ref = state.require_login()?;
    let user = user_ref.write();
    user.set_field(value);
    drop(user);
Of course this depends on your requirements. If you'd have 20 different objects of 10 different types that you'd have to lock separately and you'd want to update all of them atomically it might become hairy (SQL would definitely be better in such a case), but I don't have such cases.

Re: Ask HN: What novel tools are you using to write web sites/apps?

#116

This partially might be more of a what's old is new again, but here's what I use: - 100% server side rendered - Progressively enhanced (fully works without JS, but having JS enabled makes it nicer) - In select places where I need SPA-like snappiness I use a ~100 line long DOM diffing algorithm (I request full HTML through AJAX and diff it into the current page; if the user has no JS enabled then the page just refresh…

This speaks to my soul! How cheap of a VPS?

Re: Ask HN: What novel tools are you using to write web sites/apps?

#117
post #9

Hugo running on AWS Amplify. A really great combo for static web sites.

Interesting. What made you go with AWS Amplify over netlify?

I already had an account at AWS. And I like paying for services that I use. Netlify has a free tier, whereas Amplify has a low and reasonable price from the start.

Re: Ask HN: What novel tools are you using to write web sites/apps?

#118
If you're interested in hearing about what folks are using I have a podcast focused on this exact topic at: https://runninginproduction.com/podcast/

There's 75+ episodes with a new guest / app in each one. We talk about what tools folks use to build and deploy their apps, the why, best tips, etc..

At the moment there's 188 distinct tools (languages, web frameworks, various services, etc.).

Personally I'm a big fan of Flask and Rails with mostly server rendered templates. Lately I've been combo'ing that with TailwindCSS, Hotwire Turbo and StimulusJS for the front-end.

Re: Ask HN: What novel tools are you using to write web sites/apps?

#120
post #56
post #49

Earlier quoted context omitted.

No SQL database is the one thing I disagree with. What if you want to write a SQL query/report? Do you have transactions? As the app gets bigger you might want that.

Adding in a service like a SQL database because "you might want that" in the future is not a good idea. Apps should do what they need to do and no more. "Future proofing" is almost always a waste of time - even if you definitely want the feature in the future it's usually better to add it in when it's needed than adding it early and have to support something that adds no value yet. As for reports and transactions spe…

OP isn't talking about noSQL databases, but no database at all (if I understand correctly - OP says '- No SQL database; I just keep everything in memory in native data structures'.

In this case, I don't think OP is even thinking about noSQL databases.

Post reply on HN