Intro :
I wanted to go back to the days when I was building Plants vs. Zombies clones , so I decided to start a new side project for myself.
But as a front-end developer, taking on the backend side as well can be challenging. Still, I made my decision and not by copy–pasting from chatbots, but by actually learning backend concepts.
I chose Express. The main reason was simple: I’ve already worked a lot with JavaScript, so I didn’t need to learn a completely different language for the backend, like Python or C#.
But then the question was: How do I learn backend concepts? Isn’t Express difficult?
I decided to learn through a book, maybe an unusual choice in the age of AI, but to be honest, I don’t regret it at all.
Learning Express with a Book :
In my opinion, learning through reading is the best way to learn (at least for me). I’ve been learning for several years now, from front-end topics like CSS, JavaScript, and React to optimization, testing, and more. And based on my experience, every time I try to learn something by reading, I’m able to understand it much more deeply. I’ve never been able to get the same result from video courses.
Now, whether that reading comes from documentation, articles, or books doesn’t really matter.
I think we could write and talk about the benefits of reading until tomorrow.
To learn Express and be able to build the backend of my project by myself, I chose the
Web Development with Node and Express, 2nd Edition
written by Ethan Brown.
It’s been a few days since I finished reading the book and made good progress on my project, and I think this is a good time to review the book, maybe my experience will be useful for others too.
Inside the Book :
This book is over 300 pages long and has 22 chapters.
A very important point is that this book is not only about Node.js or Express, but it also includes important backend concepts such as security, debugging principles, and more.
Throughout the book, you build a website, and in each chapter you learn new concepts and add them to your site. (This is a positive feature of the book because it teaches concepts in a practical way. However, I didn’t follow its sample code, I studied the concepts and then went to my own project and implemented them based on my own needs.)
Chapters 1 to 3 are introductory and talk about the history and basic concepts of Node.js and Express. Studying these chapters was interesting for me since I had no backend background. Maybe for someone who is already familiar with these basics, it would be better to quickly review them or move on to the later chapters.
Chapter 4 talks about principles and best practices, and in my opinion, it’s for people who have never had programming experience before. It covers topics like the importance of using version control, which are obvious for anyone who has prior programming experience.
Chapter 5 is about QA and discusses testing and its types. Studying these concepts was very interesting for me as a front-end developer, and I think everyone should at least know the basics of writing tests and the different types of tests.
Chapter 6 is practically the beginning of the most important topics and talks about the request and response objects in Express. I can pretty much say that everything you do in backend with Express is receiving a request from the user (request object), analyzing it to understand what the user exactly wants, and then deciding what you want to return to the user (response object).
The concepts in this chapter are explained very, very simply and are easy to understand.
Chapter 7 is about template engines.
I skimmed this chapter very quickly because in my own project I’m using React for the frontend, and I didn’t need a template engine.
If you want your backend to directly display HTML to the user instead of sending data to a frontend, you need to use a template engine, and this chapter teaches you that.
Chapter 8 is about handling forms, one of the main ways to collect data from users. In this chapter, you learn how to send real data from an HTML form to the backend and process it.
Chapter 9 explains cookies and sessions, which you must know even for implementing a simple authentication system. The way cookies and sessions work and how they are stored and used in Express is fully explained in this chapter.
Express is very lightweight, and for most tasks you need to install and use middleware. Chapter 10 explains middleware completely, introduces them, and teaches you how to create your own middleware and use it.
Middleware is executed in what’s known as a pipeline. You can imagine a physical pipe, carrying water. The water gets pumped in at one end, and then there are gauges and valves before the water gets where it’s going.
Chapter 11 talks about how to send emails to users, which was very important for my project since users need to be able to reset their passwords :)
This chapter explains different methods of sending emails and the pros and cons of each.
Chapter 12 contains important content about Production Concerns and is somewhat advanced. It’s more suitable for people who have more backend experience, but I think reading it is useful for everyone because it helps you understand the differences between running an app in different environments.
Chapter 13 is where the database comes in. The book uses MongoDB, while my project uses Postgres, but in any case, this chapter talks about different ways to store content for persistence, which is really useful.
Chapter 14 is about routing in Express and covers almost everything you need to know, from URL architecture to organizing routes in Express.
Chapter 15 talks about REST APIs and discusses principles like error handling in APIs and more.
Chapter 16 is about serving static content in Express and teaches very useful tips about caching.
Chapter 17 talks about the MVC architecture in Express and explains how to implement it.
Chapter 18 , which is a relatively long chapter, talks about security. Useful topics are discussed here, but I skimmed through it quickly because security is not my current priority. Still, studying this section can give anyone a good overview.
Chapter 19 is about using third-party APIs that you can integrate into your projects. I also just skimmed this chapter because I don’t plan to connect to these APIs right now.
Chapter 20 is about debugging principles and presents interesting points:
“The first and most important principle of debugging is the process of elimination.”
This topic isn’t limited to backend developers, even as a front-end developer, I’ve used it a lot.
Chapters 21 and 22 talk about the app’s launch day and what comes after that, meaning the principles of maintaining code and the project. They help you maintain your code in a way that prevents it from turning into a complex and terrible system that no developer would dare touch later on :)
Is This Book Worth It?:
This book was very useful for me and taught me many backend concepts, but I think if someone is already familiar with the basic backend concepts, they might get bored while reading this book. I think this book is more suitable for beginners.
The book uses good examples and explains concepts really simply, but in some parts it could make the explanations a bit shorter. In my opinion, some chapters were stretched too much, and it made me think to myself, “Ugh, why doesn’t this chapter end?”
Right now, for implementing more advanced topics, I use the official Express documentation, and honestly, now that I’m familiar with the basics of Express, using the official docs has become very easy for me.
If someone already has backend experience and wants to start with Express, I think they can go directly to the documentation and they don’t need to read the book.
I hope the explanations I’ve provided help people make a decision about whether to read this book. I’m really excited for my project to be ready and to share it with you.
Top comments (0)