Leveraging the JavaScript Stack
Ethan Brown

#Node
#Node_Js
#Express
#JavaScript
#HTTPS
#MongoDB
#API
برنامههای وب پویا با استفاده از Express بسازید؛ یکی از اجزای کلیدی در استک توسعهی Node/JavaScript. در این نسخهی بهروز، نویسنده Ethan Brown اصول پایهی Express را با همراهی در توسعهی یک اپلیکیشن نمونه به شما آموزش میدهد. این راهنمای عملی، همهچیز از رندرینگ سمت سرور تا توسعهی API مناسب برای اپلیکیشنهای تکصفحهای (SPA) را پوشش میدهد.
Express تعادلی برقرار میکند بین یک فریمورک قدرتمند و عدم استفاده از فریمورک، بهطوریکه دست شما را در انتخاب معماری باز میگذارد. توسعهدهندگان فرانتاند و بکاند که با JavaScript آشنایی دارند، در این کتاب با بهترین روشها برای ساخت اپلیکیشنهای چندصفحهای و ترکیبی (Hybrid) با Express آشنا میشوند. با مطالعهی این کتاب، نگاهی تازه به توسعهی وب خواهید داشت.
این کتاب یک راهنمای کاربردی و بهروز برای هر توسعهدهندهای است که میخواهد با استفاده از Express.js اپلیکیشنهایی مدرن، مقیاسپذیر و پایدار بسازد.
Build dynamic web applications with Express, a key component of the Node/JavaScript development stack. In this updated edition, author Ethan Brown teaches you Express fundamentals by walking you through the development of an example application. This hands-on guide covers everything from server-side rendering to API development suitable for use in single-page apps (SPAs).
Express strikes a balance between a robust framework and no framework at all, allowing you a free hand in your architecture choices. Frontend and backend engineers familiar with JavaScript will also learn best practices for building multipage and hybrid web apps with Express. Pick up this book and discover new ways to look at web development.
Table of Contents
Chapter 1. Introducing Express
Chapter 2. Getting Started with Node
Chapter 3. Saving Time with Express
Chapter 4. Tidying Up
Chapter 5. Quality Assurance
Chapter 6. The Request and Response Objects
Chapter 7. Templating with Handlebars
Chapter 8. Form Handling
Chapter 9. Cookies and Sessions
Chapter 10. Middleware
Chapter 11. Sending Email
Chapter 12. Production Concerns
Chapter 13. Persistence
Chapter 14. Routing
Chapter 15. REST APIs and JSON
Chapter 16. Single-Page Applications
Chapter 17. Static Content
Chapter 18. Security
Chapter 19. Integrating with Third-Party APIs
Chapter 20. Debugging
Chapter 21. Going Live
Chapter 22. Maintenance
Chapter 23. Additional Resources
This book is for programmers who want to create web applications (traditional websites; single-page applications with React, Angular, or Vue; REST APIs; or anything in between) using JavaScript, Node, and Express. One of the exciting aspects of Node development is that it has attracted a whole new audience of programmers. The accessibility and flexibility of JavaScript have attracted self-taught programmers from all over the world. At no time in the history of computer science has programming been so accessible. The number and quality of online resources for learning to program (and getting help when you get stuck) is truly astonishing and inspiring. So to those new (possibly self-taught) programmers, I welcome you.
Then, of course, there are the programmers like me, who have been around for a while. Like many programmers of my era, I started off with assembler and BASIC and went through Pascal, C++, Perl, Java, PHP, Ruby, C, C#, and JavaScript.
At university, I was exposed to more niche languages such as ML, LISP, and PROLOG. Many of these languages are near and dear to my heart, but in none of these languages do I see so much promise as I do in JavaScript. So I am also writing this book for programmers like myself, who have a lot of experience and perhaps a more philosophical outlook on specific technologies.
No experience with Node is necessary, but you should have some experience with JavaScript. If you’re new to programming, I recommend Codecademy. If you’re an intermediate or experienced programmer, I recommend my own book, Learning JavaScript, 3rd Edition (O’Reilly).
The examples in this book can be used with any system that Node works on (which covers Windows, macOS, and Linux, among others). The examples are geared toward command-line (terminal) users, so you should have some familiarity with your system’s terminal.
Most important, this book is for programmers who are excited. Excited about the future of the Internet and want to be part of it. Excited about learning new things, new techniques, and new ways of looking at web development. If, dear reader, you are not excited, I hope you will be by the time you reach the end of this book….
Notes on the Second Edition
It was a joy to write the first edition of this book, and I am to this day pleased with the practical advice I was able to put into it and the warm response of my readers.
The first edition was published just as Express 4.0 was released from beta, and while Express is still on version 4.x, the middleware and tools that go along with Express have undergone massive changes. Furthermore, JavaScript itself has evolved, and even the way web applications are designed has undergone a tectonic shift (away from pure server-side rendering and toward single-page applications).
While many of the principles in the first edition are still useful and valid, the specific techniques and tools are almost completely different. A new edition is overdue. Because of the ascendance of SPAs, the focus of this second edition has also shifted to place more emphasis on Express as a server for APIs and static assets, and it includes an SPA example.
Ethan Brown is the Director of Technology at VMS, where he is responsible for the architecture and implementation of VMSPro®, cloud-based software for decision support, risk analysis, and creative ideation for large projects. He has over 20 years of programming experience, from embedded to the Web, and has embraced the JavaScript stack as the web platform of the future. He is author of the first edition of Web Development with Node and Express (O’Reilly).









