Helpful resources for learning Rust web development
The perpretual quest for more
As a developer and nerd I find learning new langugaes fun and rewarding. Some languages are particularly hard to learn, when you’re used to differenct paradigms. When learning Haskell, for example, while being used to Object Oriented Programming, can an extreme shift in cognitive focus (so much, in fact, that I’m still pretty bad at Haskell, even though I enjoy the language). Contrasts in many different language aspects and domains of the languages you’re used to versus the new language you’re trying to learn can be dautning.
I’ve picked up PHP first, because when I started web development, it was practically the only server side language to learn, next to Pearl. I never liked it, didn’t care for Pearl. JavaScript become more important, and even though the language is a mess (and TypeScript didn’t exist until 2012), it was extremely useful to know and practically needed for all web development for a long time. Next I tried Python, which is extremely easy to learn, since it already looks like pseudo-code, then came Exlixit, which I enjoyed and still enjoy immensely. The functional programming paradigm in Elixir and Erlang brought me to Haskell, then I experimented with dozens of other languages from OCaml to BrainFuck and now I’m determined to learn Rust, because it’s exteremely useful and interesting.
And, daaamn, Rust is full of weird, unique enticing concepts that absolutely don’t make learning Rust a cake walk, but at least make the process interesting.
Wow. So much stuff at once
Even though Rust offers many interesting concepts and paradigms from other programming languages that I am well or ar least vaguely familiar with, like
- Haskell, OCaml and F# (type classes, algebraic datatypes, pattern matching)
- Erlang (message passing)
- C++ (monomorphization)
- JavaScript and Python (basic async/await syntax)
- and many more
Understanding and combining all these powerful and interesting concepts productively is a very hard and confusing task.
The easiest solution is something that already works
So I did what I always do when I’m trying to learn a new language:
- learn the basics by reading and following tutorials until the basic syntax klicks
- focus on the things I know well already, like APIs, app architecture and frontend development and those thing work in the language I’m trying to learn
- checking which frameworks are the easiest and most interesting to learn, in order to get into the flow
- thinking of one or more easy projects that I can use as an excusie for learning these technologies
And I gotta say, that worked pretty well. I particularly looked into Serde, Tokio, Axum, Tower, Leptos and Tauri, because I want to create an App with a Rust API (Tokio, Axum, Serde, Tower) that will have a Web client (Leptos) and a Desktop client (Tauri) which should ideally share most of the code. Build a complete App in Rust with the backend, frontend and desktop client all written in Rust is possible and should be a fun, yet strenuous learning experience.
Resources
While researching, looking stuff up, reading into source code and various Rust books, I stumpled up some really nice content that helped me a lot to understand the weird little traps and abstract concepts the make up both Rust’s strengths and steep learning curve.