I'm a backend/systems programmer by trade who has always wanted to build a full stack app, but gets frustrated / overwhelmed by 'modern' web dev. I’m incredibly wary of overcomplicating and don’t want to throw in the entire kitchen, if YAGNI. I want to build a somewhat complicated UI (think Notion level) and not completely bend over backwards making the front-end work through 10000 layers of abstraction.
Right now, I'm looking at Svelte(kit) and a Go (stdlib) or Rust (Axum) backend. I know Rust is a bit of a meme, but I find it very pleasant to write vs. Go in a lot of respects.
Is there something else out there that is worth trying? I have thought about trying Elm, but it seems to be niche / not future-proof.
Thanks.
You mention that you get frustrated by modern web dev - I assume you mean the insane world of javascript frameworks. You can build entire rails apps without ever really worrying about JS these days.[^1] Hotwired lets you build fairly complex UIs and add a ton of interactivity without JS. But if you ever want to do more with JS on the frontend it's very easy to adapt rails to just about any frontend JS framework, including React and Svelte.
That said, there's comparable full-stack frameworks in many languages, and if you just want to hit the ground running you might as well use what you know. Ruby - Rails. Java - Spring. Python - Django. PHP - Laravel. You can use whatever frontend you want with any of those frameworks.
Stick with Postgres or Mysql/Maria for the database. They're tried-and-true and scale to whatever size you will ever need.
[^1]: https://hotwired.dev/
If your goal is to learn the marketable skill of building web apps in 2023, you can't go wrong with Typescript on the front and back end with NextJs (aka React, aka one of the most in-demand technologies employment-wise in the industry).
If your goal is to just have some fun on then Svelte + Rust ain't a bad idea.
https://flask.palletsprojects.com/en/2.2.x/quickstart/#a-min...
https://dataset.readthedocs.io/
https://github.com/axios/axios
https://vuejs.org/guide/introduction.html
https://vuejs.org/guide/extras/ways-of-using-vue.html
I've created a boilerplate here:
It's future-proof too, if you want to bolt on say machine learning, or data processing pipelines later, that's becoming a real thing in the ecosystem.
I was watching a video on someone writing an Ethereum indexing system in go. One frame had their super complicated concurrent processing system, and my eyes bugged out. Also they claimed there was a concurrency bug. I wound up writing an equivalent in elixir in about a week, no concurrency bugs.
If the server rendered experience is not enough, you can add some HTMX.org or Svelte. You're also free to go full blown SPA later on and use Django more or less as backed - there are great REST add-ons.
Build with what you know to start with. Find a way to frontend that you don't hate. Focus on making your data and algorithms portable. Change your opinion and tech stack when (if!) you need to.
I generally liked working with NodeJS, and plain JavaScript both on the server and browser side. It shines for applications where things are kept extremely simple.
If things are going to get a little complicated, swapping in Typescript will bring in the compiler to check things for you. This will be useful if your codebase gets large enough to refactor, and benefit from a statically checked compiler.
Remember that plain JavaScript in the browser is a thing, and if your needs are simple, you can do a lot with it.
Also: I really like Blazor and C#. It's a completely different stack, and much more complicated. But it's much more powerful, and the straightforward, templated HTML via razor is a real joy to work with.
Edit: One nice advantage of server-side Blazor is that you don't need to write an API to do AJAX. (IE, you can mix database queries in your UI code.) This "keep it simple" has it's place in some situations. (Of course, you can do in-browser Blazor with a proper API and separate layers if needed.)
If you hate javascript then php and laravel on the backend, javascript on the frontend.
If you care about performance and being productive: Go
If you want to play with new tech: Rust
Next.js for client- and server-side development (alternatively look at Remix). It's a big advantage to use Typescript on both sides instead of mixing programming languages like JS + Rust or GO (or PHP, Python, Ruby ...).
In case you need a database (MySQL or Postgres) then PrismaORM is your best friend. Amazingly good ORM which does all the heavy-lifting for you.
For hosting without database Vercel is the obvious solution. In case you need a database, then look at a good PaaS like Render.com (or if you are in EU then scalingo.com). In any case don't waste time with building infrastructure.
In case you want to see a full application, check out our open-source Kickstarter.
Repo: https://github.com/roqtech/roq-kickstarter-nextjs Demo: https://roq-kickstarter-nextjs.vercel.app/
Repo (with Prisma): https://github.com/roqtech/roq-kickstarter-nextjs-prisma-mar...
Linux, Apache/Nginx, MySQL, PHP
For the front-end, I found Vuejs quite nice to add exactly where it's needed. Otherwise I can leave 99% of the site a plain html template.
Things I thought that were cool and were genuinely exciting:
- https://htmx.org - this is my favorite option. It's primarily meant to replace AJAX requests that dynamically update the DOM (which is already a big win IMO). For more complex UI interactions, you'll still need JS or Hyperscript.
- https://hyperscript.org - wasn't immediately sold on this one like with HTMX. It's built by the same people as HTMX though. My favorite thing about it is it makes async transparent (no callback hell)
- Svelte, SolidJS - lumping these together since they look about the same from my point of view. Looks very easy for someone like me to build complex dynamic UIs. But still feels a bit too heavy for my tastes (Default setup is for full-blown SPAs)
- Go - awesome standard library. Lots of tutorials and easy to find answers. I needed to adjust to the lack "one framework to rule them all".
- Clojure/ClojureScript - Like Go, there's no "the one framework". Being able to use the same language for backend/frontend, including code sharing, is pretty sweet.
In the end, I chose Clojure + ClojureScript. I aws already familiar with Clojure, and with some wrangling/trial-error, I managed to get a ClojureScript setup that lets me write small interactive components that I can embed into specific parts of plain old .html files.
I intend to use HTMX for AJAX stuff, and ClojureScript for more complex interactivity. Haven't gotten very far yet, but that's the plan.
It produces a static site & lets you focus entirely on the UI side, without linking the frontend to a 'real' backend/database. Good enough for a blog/similar style of site.
For backend F# with simple Giraffe lib/framework? worked pretty nicely. You won't get the full ecosystem of crates though and mixing C# libs might not be the most natural. I want concurrency/parallelism but have no patience/need for a borrow checker. Rust is a nice language though and wish I worked on something where it mattered, liked it more than I'd expected.
It ain't sexy but it gets the job done so smoothly, and modern PHP is certainly better than it used to be, although still a 3 headed Perl dragon with the consistency of a toddler high on sugar.
edit: I read the title as 'unpleasant', lol. I do not endorse this comment.
I enjoy it as much as Vue 1.0 before we had bundlers, transpilers, builders and what not.
For backend dotnet core is also nice. Fast and batteries included. I would avoid their Entity framework though. I still prefer TS.
Do the whole thing in typescript.
Have the power of reusable components using React.
Serve zero JS if you want to.
But I’m also looking at:
React Native + Supabase