Live data from Hacker News

Ask HN: If you were to build a web app today what tech stack would you choose?

news.ycombinator.com

161–170 of 214 posts

Re: Ask HN: If you were to build a web app today what tech stack would you choose?

#161
Instead of thinking about tech stack think about the problem you want solved. Most devs think about tech stack first and so all they do is read from a database and struggle to put text on screen. Then once that climb that mountain their product looks identical to everything else and is limited to putting text on screen at considerably inflated expense.

Re: Ask HN: If you were to build a web app today what tech stack would you choose?

#162
I just started a project and chose this stack:

- SSR SvelteKit with Hydration (https://github.com/sveltejs/kit)

- PostgreSQL database server

- Postgres.js - PostgreSQL client for Node.js (https://github.com/porsager/postgres)

- Migration powered by graphile-migrate (https://github.com/graphile/migrate)

- PostgreSQL Row-Level Security (https://www.postgresql.org/docs/16/ddl-rowsecurity.html)

- svelte-headlessui (https://github.com/rgossiaux/svelte-headlessui)

- sveltekit-i18n (https://github.com/sveltekit-i18n/lib)

- TailwindCSS (https://tailwindcss.com/)

- Superforms (https://superforms.rocks/)

- sveltekit-flash-message + svelte-french-toast (https://github.com/ciscoheat/sveltekit-flash-message + https://github.com/kbrgl/svelte-french-toast)

Tooling :

- asdf (https://asdf-vm.com/)

- Docker and Docker Compose

- NodeJS

- pnpm

- Jest for unittest

All deployed on a VM at Scaleway (https://www.scaleway.com/en/) with Bash script (https://github.com/stephane-klein/sveltekit-tendaro-webshell...)

After 3 months of development on this stack, I'm very satisfied. My application is fast, light and requires very little code.

Project skeleton example: https://github.com/stephane-klein/sveltekit-tendaro-webshell...

Re: Ask HN: If you were to build a web app today what tech stack would you choose?

#163
post #26

Django + HTMX + SQLite or PostgreSQL Hosted on a virtual machine. ... Or the stack you're most efficient/ effective in. A short time-to-market is most important for learning. If you don't reach an audience, your project might bore you soon. Tech rarely is the holy grail to success.

I feel like I want to like htmx, and the concepts sound cool. But json is such a nice generic serialization format. Like my API can be in service of my frontend, but also other applications. While, unless I misunderstand it, htmx seems to philosophically believe the backend is the frontend. Are there any patterns where you have an API with nice json payloads but also use htmx to push the rendering to backend? What do…

You can have both a hypermedia API and a data (JSON) API. Your hypermedia API is a lot more lightweight and flexible as it's tied to your web app. The HTMX authors talk about that topic in their book: https://hypermedia.systems/json-data-apis/

"These two different types of APIs have different strengths and needs, so it makes sense to use both. The hypermedia approach can be used for your web application, allowing you to specialize the API for the “shape” of your application. The Data API approach can be used for other, non-hypermedia clients like mobile, integration partners, etc.

Note that by splitting these two APIs apart, you reduce the pressure to constantly change a general Data API to address application needs. Your Data API can focus on remaining stable and reliable, rather than requiring a new version with every added feature."

Re: Ask HN: If you were to build a web app today what tech stack would you choose?

#164

I'd write it in Lazarus/Free Pascal, compile it to WASM[1], and do whatever hacks I had to do in order to push it through the internet into a web browser. There's nothing even close to the productivity we had back in the days of VB6/Delphi to be had on the web, ever. The closest we're going to get is a pale imitation. [1] https://wiki.freepascal.org/WebAssembly

I remember writing a cgi app in delphi back in the late 90s to emulate our in house excel sheet that priced up a custom computer.

Do you have any suggested reading for what you're suggesting because I'm just about to start a project and as we do a lot of our LOB apps in Delphi this seems useful?

Re: Ask HN: If you were to build a web app today what tech stack would you choose?

#165
post #164

I'd write it in Lazarus/Free Pascal, compile it to WASM[1], and do whatever hacks I had to do in order to push it through the internet into a web browser. There's nothing even close to the productivity we had back in the days of VB6/Delphi to be had on the web, ever. The closest we're going to get is a pale imitation. [1] https://wiki.freepascal.org/WebAssembly

I remember writing a cgi app in delphi back in the late 90s to emulate our in house excel sheet that priced up a custom computer. Do you have any suggested reading for what you're suggesting because I'm just about to start a project and as we do a lot of our LOB apps in Delphi this seems useful?

No, I don't have any suggested reading... just a plan of action should it be required. I'm assuming that enough work has been done that it should be possible to build a CRUD application in Pascal, and have it eventually produce working WASM executable code.

I have some existing code in pascal[1]... and it would be helpful for it to run in the browser.... lemme see how bad it is making this happen. It'll take a few days, I think.

[1] https://github.com/mikewarot/Bitgrid

Re: Ask HN: If you were to build a web app today what tech stack would you choose?

#166
post #141

Earlier quoted context omitted.

Interesting that you mention Pico. I really like it (my personal site uses it) but it doesn’t strike me as the go to choice for a web app?

I guess my needs are relatively basic. I like that all I have to do is include it and things look presentable out of the box without me having to do much design work. What are your choices for more complex projects?

Definitely agree that it’s a breath of fresh air to just write HTML and it look good.

For more complex projects it’s normally Tailwind

Re: Ask HN: If you were to build a web app today what tech stack would you choose?

#167

Frontend: Angular or Vue, deployed on AWS S3 bucket + cloudfront (for https) Backend: AWS Appsync (or AWS API Gateway) integrated with AWS Lambdas written in Golang. Authentication through AWS Cognito. DB: anything serverless from AWS (Dynamodb, Aurora etc.) This way the app would be 100% serverless, no need for effort to scale it or to maintain the infrastructure (apart from automating the ifrastructure through AWS…

You won’t need a lot of effort to scale even with a Go backend deployed on an EC2 instance in the majority of cases. Serverless is cool when you start with 300 users and you’re still in the free tier plan. After that, it’s going to cost you a fortune when you really need to scale, and I’m not even thinking about the time that you would need to waste writing everything back to a monolith/microservice, because that is…

I wrote a Go application to run on AWS lambda, but also compileable as a monolith.

Was fun running on lamba etc, until as you say, the costs starts soaring massively. Moved it to a cheap VPS and never looked back.

Re: Ask HN: If you were to build a web app today what tech stack would you choose?

#168

I'd write it in Lazarus/Free Pascal, compile it to WASM[1], and do whatever hacks I had to do in order to push it through the internet into a web browser. There's nothing even close to the productivity we had back in the days of VB6/Delphi to be had on the web, ever. The closest we're going to get is a pale imitation. [1] https://wiki.freepascal.org/WebAssembly

If that was really true, it would be a competitive advantage of many companies. Unless they are hiding it. Desktop apps are easier to develop as there are way less moving parts.

There isn't nothing magical about VB6/Delphi, just a lot of work put there. Many JS developers are multiple times more productive than what was possible to accomplish with VB6/Delphi.

Re: Ask HN: If you were to build a web app today what tech stack would you choose?

#169
post #164

Earlier quoted context omitted.

I remember writing a cgi app in delphi back in the late 90s to emulate our in house excel sheet that priced up a custom computer. Do you have any suggested reading for what you're suggesting because I'm just about to start a project and as we do a lot of our LOB apps in Delphi this seems useful?

No, I don't have any suggested reading... just a plan of action should it be required. I'm assuming that enough work has been done that it should be possible to build a CRUD application in Pascal, and have it eventually produce working WASM executable code. I have some existing code in pascal[1]... and it would be helpful for it to run in the browser.... lemme see how bad it is making this happen. It'll take a few da…

Turns out I was able to get something to work in about 2 hours... just after the HN edit window closed. Here's a really small Hello World in Pascal --> WASM --> Web Page you can see the output from, all in a GitHub repo.[1]

[1] https://github.com/mikewarot/fpc_wasm

Re: Ask HN: If you were to build a web app today what tech stack would you choose?

#170

Earlier quoted context omitted.

Sounds good. Do you do type checking? DB?

Yes, using mypy and planning to check out Ruff instead. PostgreSQL for prod DB, SQLite for local dev.

mypy and ruff are complementary, and as far as I know have no overlap. Strongly recommend using both.
Post reply on HN