Ask HN: Best books to learn web development?
Hi, I'm currently learning HTML, CSS and JS but I'd like to get more in depth. I love learning stuff from books, even if it's a bit old-fashioned, because I can always take a brief look at what I need rather than having to search for basic information online, among several crappy SEO websites.
Can you suggest some books? I'd prefer advanced ones, as I'm not a newbie.
PS: I know you learn things only by doing, the book would be a support. You can suggest also books related to networking, that's the next step :)
50 comments
[ 2.1 ms ] story [ 111 ms ] threadhttp://philip.greenspun.com/seia/
I'm not sure that this is a good resource for a beginner, because it would teach them practices that aren't just out of fashion, but altogether unused, and would hurt them in the job market IMHO.
Much of this text is now obsolete -- not obsolete like "oh, a new JS lib du jour came out yesterday and we should all adopt it", but obsolete like "if you use this, many browsers won't support it and nobody else in your generation will be able to maintain your code".
Specifically:
- DNS and HTTPS are way more complicated now than when this was written
- Mobile usability isn't done this way any more; WAP and XHTML are not in use
- VoiceXML is not used
- XML in general has largely given way to JSON. SOAP is rarely used except maybe outside of academia and other niches.
- RSS is pretty much dead
- The DOM structure is not as semantic as in the past (unfortunately)
- It presupposes that most data must live in a RMDBS as opposed to other storage paradigms
- It completely ignores (well, predates) the prevalence of abstracted cloud services that most web work uses these days, vs reinventing search etc. from scratch
- Analytics is likewise way more complex today, but in the post-Google Analytics era and in the post-privacy era
- Some of the HTML syntax it uses is deprecated
- It presupposes a simpler full-stack model where a small web team will do the entire full stack work from the UI to the DB admin, vs today where that's usually specialized and/or outsourced to various third parties and APIs
I hope this doesn't come across as snobby... just trying to give the OP some context about where this fits in relative to modern work. Some of the fundamentals are indeed worthwhile reading, but the text itself doesn't make clear what is or is not still relevant. Without prior knowledge to be able to differentiate that, this book could teach a bunch of deprecated practices.
For now, just focusing on the basics of HTML/CSS and especially JS will get you going well enough, and those will all be applicable in web work no matter what specialization you choose.
Those are what we normally consider frontend technologies (though JS can also be used on the backend). If you also want to learn the backend side, having some frontend knowledge still never hurts, if only so you can work with the frontend people better.
This text might be worth circling back to later in your career, once you start considering architectural patterns. But for now you have a lot of other great suggestions :)
It's usually somewhere between 10k users and 1m users where the rules change entirely and you need to start looking to more modern/advanced approaches. 10k is kind of arbitrary, because you can do some really stupid things with a traditional rdbms with sql.
It's not that the principles are invalid these days, but that the specific examples and techniques mentioned in that text are now often done with different tooling. Significantly, a lot the low-level stuff has also been replaced with higher-level, industry-standard abstractions (which embody many standard best practices that might otherwise take an individual years to learn and polish), building upon the lessons and mistakes learned over the decades. This text doesn't really clarify what is a long-lasting architectural principle and what was just a fashion trend of the day and now obsolete.
Realistically, I think new devs coming into the field these days are likely to first encounter those abstractions (whether it's HTMX or Next) before understanding the history of why they exist (and what their tradeoffs are). Those architectural tradeoffs are important to learn at some point, but usually those decisions are not left to the newcomers (in a sane company) and also should be taught in the context of modern tooling and decisions, not software that was common two decades ago.
Like important questions these days might be (as you said) what do we do on the server vs client JS (or rehydration), what do we outsource to a cloud (which clouds?), what do we containerize or not, how do we deal with HTTPS and mobile and cross-platform (web/iOS/Android), etc. Not "what is the best log parser for Apache" or "should we use MS SQL because it works better with Access". In some companies, it might also be "which off-the-shelf CMS best fits our use case" vs "Is C# or Java or more appropriate for our backend?"
If someone wants to take the time to highlight the specific, still-relevant sections of that text, I think it could be worthwhile. But otherwise, without that differentiation, it's just kinda a minefield for newcomers.
Aside: Right now, exploring HTMLX + server-side yew for rendering in rocket (rust), which could be very interesting. Usually do https termination at the platform, or reverse-proxy via Caddy. And I'm a proponent of containerizing all the things (Docker).
1) Fundamentals of Web Development (Randy Connolly and Ricardo Hoar).
I have the 2nd Ed but the 3rd Ed is out and is more contemporary.
Specific books for HTML and CSS are:
1) HTML and CSS - The Comprehensive Guide (decent contemporary introduction)
2) CSS in Depth
3) CSS The Definite Guide - 5th Ed - Reference
Specific books for JavaScript.
1) Javascript - The Comprehensive Guide (decent contemporary introduction)
2) Eloquent JavaScript - 3rd Ed
3) Javascipt - The Definite Guide - 7th Ed
Although today, a dependency graph is more invaluable for modern web apps... Odds are your project is bringing in some massive/slow dependencies.
Also "You Don't Know JS Yet" has some depth in it https://github.com/getify/You-Dont-Know-JS
You don't know JS series didn't sit well with me. It tries to lead the reader through some a-ha moments, except those are pretty individual. But it might work for someone else.
1. If you want to be good at this start with a solid foundation. The compile target of the browser is the DOM (Document Object Model).
2. Read about accessibility: https://www.w3.org/WAI/standards-guidelines/wcag/ Understanding accessibility will influence why things are done in certain ways and will make clear the difference between presentation and developers who may not understand this platform as well as they claim.
3. Learn about events and asynchronous execution.
4. Finally, learn to program JavaScript, but understand OOP is optional and considerably more work.
If you can build even the most minor of confidence in those 4 areas you will become a stellar developer compared to your peers working on this platform.
The "I don't like it" excuse seems to be the last refuge once developers completely exhaust all valid technical considerations. It always comes down to developers being irrationally afraid of tree models (yes, that is entirely what it is and its stupendously bizarre).
If really it was just "I don't like it" then propose something better.
That is not what OOP is. OOP is about expressing poly-instantiation and therefore allowing inheritance.
The internals of JavaScript are fundamentally OOP, such as the type system and distribution of DOM methods each expressed as prototypes. Most of that stuff you shouldn't be touching anyways. As far as your own code OOP is completely optional and requires far greater effort. Functions are first class citizens that can go absolutely anywhere with any kind of nesting in ways OOP structures cannot.
[0]: https://alistapart.com/article/css-positioning-101/
For JS there are some online books that are gold mines the problem is finding them. One is Eloquent JavaScript which is available to read online for free here [1].
[1]: https://eloquentjavascript.net/
Though I've never actually finished the whole thing it does a pretty great job explaining JS to the uninitiated.
My other favorite books in JS are actually all from the same person Axel Rauschmayer. All of his books are available online for free here [2]. He has a really good way of explaining in my opinion and his books kind of take out all the fluff.
[2]: https://exploringjs.com/
https://javascript.info/
It does a great job at explaining intermediate/advanced caveats and gotchas along the way.
Josh’s teaching style is exceptional, and the courses’ exercises challenge you to work just at the edge of your abilities. I cannot recommend these courses enough!!
https://www.joshwcomeau.com/courses/
https://css-tricks.com/
And I like this Principles of Object-Oriented Javascript book by Nicholas Zakas even though it's a little dated (example: its claim that there are no classes in JavaScript)
https://nostarch.com/oojs
And I love everything by Kevin Powell:
https://www.youtube.com/@KevinPowell
edit* I want to add the The Odin Project has a ton of good material:
https://www.theodinproject.com
When youre ready to go galaxy brained, "Designing Data-Intensive Applications" is the standard
It's not super advanced but gives you a great foundation and you learn by doing.
After that it's best to pick out a challenging project you want to build for yourself and tackle that.
Once you have a good foundation in css I'd recommend checking out Tailwind CSS and Tailwind UI.
You can just sit down and write JavaScript. It just works in your browser. You can’t do that with typescript.