چه کسانی این کتاب را می‌خوانند

دانشجوعلاقه‌مند یادگیری
کتابخوان حرفه‌ایلذت مطالعه
نویسندهالهام‌گیری

Web Development with Node and Express : Leveraging the JavaScript Stack

Brown, Ethan; Troutman Zaig, Ellen; Montgomery, Karen; Demarest, Rebecca; Monaghan, Rachel; St. Laurent, Simon; Anderson, Brian; Dolby, Linley

قیمت نهایی

۴۴٬۰۰۰ تومان۴۹٬۰۰۰ تومان۱۰٪ تخفیف
  • تخفیف زمان‌دار−۵٬۰۰۰ تومان

۵٬۰۰۰ تومان صرفه‌جویی نسبت به قیمت اصلی

نسخه اصلی و اورجینال

بلافاصله پس از خرید، فایل کتاب روی دستگاه شما آمادهٔ دانلود است.

تحویل فوری
پرداخت امن
ضمانت فایل
پشتیبانی

مشخصات کتاب

سال انتشار
۲۰۱۴
فرمت
PDF
زبان
انگلیسی
تعداد صفحات
۲ صفحه
حجم فایل
۸٫۵ مگابایت

دربارهٔ کتاب

Learn how to build dynamic web applications with Express, a key component of the Node/JavaScript development stack. In this hands-on guide, author Ethan Brown teaches you the fundamentals through the development of a fictional application that exposes a public website and a RESTful API. You’ll also learn web architecture best practices to help you build single-page, multi-page, and hybrid web apps with Express. Express strikes a balance between a robust framework and no framework at all, allowing you a free hand in your architecture choices. With this book, frontend and backend engineers familiar with JavaScript will discover new ways of looking at web development. * Create webpage templating system for rendering dynamic data * Dive into request and response objects, middleware, and URL routing * Simulate a production environment for testing and development * Focus on persistence with document databases, particularly MongoDB * Make your resources available to other programs with RESTful APIs * Build secure apps with authentication, authorization, and HTTPS * Integrate with social media, geolocation, and other third-party services * Implement a plan for launching and maintaining your app * Learn critical debugging skillsThis book covers Express 4.0. Copyright 4 Table of Contents 7 Foreword 15 Preface 17 Who This Book Is For 17 How This Book Is Organized 18 Example Website 19 Conventions Used in This Book 19 Using Code Examples 20 Safari® Books Online 20 How to Contact Us 21 Acknowledgments 21 Chapter 1. Introducing Express 23 The JavaScript Revolution 23 Introducing Express 24 A Brief History of Express 26 Upgrading to Express 4.0 26 Node: A New Kind of Web Server 27 The Node Ecosystem 28 Licensing 29 Chapter 2. Getting Started with Node 31 Getting Node 31 Using the Terminal 32 Editors 33 npm 34 A Simple Web Server with Node 35 Hello World 36 Event-Driven Programming 36 Routing 37 Serving Static Resources 37 Onward to Express 39 Chapter 3. Saving Time with Express 41 Scaffolding 41 The Meadowlark Travel Website 42 Initial Steps 42 Views and Layouts 46 Static Files and Views 48 Dynamic Content in Views 49 Conclusion 50 Chapter 4. Tidying Up 51 Best Practices 51 Version Control 52 How to Use Git with This Book 52 If You’re Following Along by Doing It Yourself 53 If You’re Following Along by Using the Official Repository 54 npm Packages 55 Project Metadata 56 Node Modules 56 Chapter 5. Quality Assurance 59 QA: Is It Worth It? 60 Logic Versus Presentation 61 The Types of Tests 61 Overview of QA Techniques 62 Running Your Server 62 Page Testing 63 Cross-Page Testing 66 Logic Testing 69 Linting 70 Link Checking 71 Automating with Grunt 71 Continuous Integration (CI) 74 Chapter 6. The Request and Response Objects 75 The Parts of a URL 75 HTTP Request Methods 76 Request Headers 77 Response Headers 77 Internet Media Types 78 Request Body 78 Parameters 79 The Request Object 79 The Response Object 81 Getting More Information 82 Boiling It Down 83 Rendering Content 83 Processing Forms 85 Providing an API 86 Chapter 7. Templating with Handlebars 89 There Are No Absolute Rules Except This OneTo paraphrase my friend and mentor, Paul Inman. 90 Choosing a Template Engine 91 Jade: A Different Approach 91 Handlebars Basics 93 Comments 94 Blocks 94 Server-Side Templates 96 Views and Layouts 96 Using Layouts (or Not) in Express 98 Partials 99 Sections 101 Perfecting Your Templates 102 Client-Side Handlebars 103 Conclusion 105 Chapter 8. Form Handling 107 Sending Client Data to the Server 107 HTML Forms 107 Encoding 108 Different Approaches to Form Handling 109 Form Handling with Express 111 Handling AJAX Forms 112 File Uploads 114 jQuery File Upload 116 Chapter 9. Cookies and Sessions 121 Externalizing Credentials 122 Cookies in Express 123 Examining Cookies 125 Sessions 125 Memory Stores 125 Using Sessions 126 Using Sessions to Implement Flash Messages 127 What to Use Sessions For 128 Chapter 10. Middleware 131 Common Middleware 136 Third-Party Middleware 138 Chapter 11. Sending Email 139 SMTP, MSAs, and MTAs 139 Receiving Email 140 Email Headers 140 Email Formats 141 HTML Email 141 Nodemailer 142 Sending Mail 142 Sending Mail to Multiple Recipients 143 Better Options for Bulk Email 144 Sending HTML Email 144 Images in HTML Email 145 Using Views to Send HTML Email 145 Encapsulating Email Functionality 147 Email as a Site Monitoring Tool 149 Chapter 12. Production Concerns 151 Execution Environments 151 Environment-Specific Configuration 152 Scaling Your Website 153 Scaling Out with App Clusters 154 Handling Uncaught Exceptions 157 Scaling Out with Multiple Servers 160 Monitoring Your Website 161 Third-Party Uptime Monitors 161 Application Failures 162 Stress Testing 162 Chapter 13. Persistence 165 Filesystem Persistence 165 Cloud Persistence 167 Database Persistence 168 A Note on Performance 168 Setting Up MongoDB 169 Mongoose 169 Database Connections with Mongoose 170 Creating Schemas and Models 171 Seeding Initial Data 172 Retrieving Data 173 Adding Data 174 Using MongoDB for Session Storage 176 Chapter 14. Routing 179 Routes and SEO 181 Subdomains 181 Route Handlers Are Middleware 182 Route Paths and Regular Expressions 184 Route Parameters 184 Organizing Routes 185 Declaring Routes in a Module 186 Grouping Handlers Logically 187 Automatically Rendering Views 188 Other Approaches to Route Organization 189 Chapter 15. REST APIs and JSON 191 JSON and XML 192 Our API 192 API Error Reporting 193 Cross-Origin Resource Sharing (CORS) 194 Our Data Store 195 Our Tests 195 Using Express to Provide an API 197 Using a REST Plugin 198 Using a Subdomain 200 Chapter 16. Static Content 203 Performance Considerations 204 Future-Proofing Your Website 204 Static Mapping 205 Static Resources in Views 207 Static Resources in CSS 207 Static Resources in Server-Side JavaScript 209 Static Resources in Client-Side JavaScript 209 Serving Static Resources 211 Changing Your Static Content 212 Bundling and Minification 212 Skipping Bundling and Minification in Development Mode 215 A Note on Third-Party Libraries 217 QA 217 Summary 219 Chapter 17. Implementing MVC in Express 221 Models 222 View Models 223 Controllers 225 Conclusion 227 Chapter 18. Security 229 HTTPS 229 Generating Your Own Certificate 230 Using a Free Certificate Authority 231 Purchasing a Certificate 232 Enabling HTTPS for Your Express App 234 A Note on Ports 235 HTTPS and Proxies 236 Cross-Site Request Forgery 237 Authentication 238 Authentication Versus Authorization 238 The Problem with Passwords 239 Third-Party Authentication 239 Storing Users in Your Database 240 Authentication Versus Registration and the User Experience 241 Passport 242 Role-Based Authorization 251 Adding Additional Authentication Providers 253 Conclusion 254 Chapter 19. Integrating with Third-Party APIs 255 Social Media 255 Social Media Plugins and Site Performance 255 Searching for Tweets 256 Rendering Tweets 259 Geocoding 263 Geocoding with Google 263 Geocoding Your Data 264 Displaying a Map 267 Improving Client-Side Performance 269 Weather Data 270 Conclusion 271 Chapter 20. Debugging 273 The First Principle of Debugging 273 Take Advantage of REPL and the Console 274 Using Node’s Built-in Debugger 275 Node Inspector 275 Debugging Asynchronous Functions 279 Debugging Express 279 Chapter 21. Going Live 283 Domain Registration and Hosting 283 Domain Name System 284 Security 284 Top-Level Domains 285 Subdomains 286 Nameservers 287 Hosting 288 Deployment 291 Conclusion 294 Chapter 22. Maintenance 295 The Principles of Maintenance 295 Have a Longevity Plan 295 Use Source Control 297 Use an Issue Tracker 297 Exercise Good Hygiene 297 Don’t Procrastinate 298 Do Routine QA Checks 298 Monitor Analytics 299 Optimize Performance 299 Prioritize Lead Tracking 299 Prevent “Invisible” Failures 301 Code Reuse and Refactoring 301 Private npm Registry 302 Middleware 303 Conclusion 305 Chapter 23. Additional Resources 307 Online Documentation 307 Periodicals 308 Stack Overflow 308 Contributing to Express 310 Conclusion 312 Index 313 About the Author 329 node.js,express,javascript,o'reilly Learn how to build dynamic web applications with Express, a key component of the Node/JavaScript development stack. In this hands-on guide, author Ethan Brown teaches you the fundamentals through the development of a fictional application that exposes a public website and a RESTful API. You’ll also learn web architecture best practices to help you build single-page, multi-page, and hybrid web apps with Express. Express strikes a balance between a robust framework and no framework at all, allowing you a free hand in your architecture choices. With this book, frontend and backend engineers familiar with JavaScript will discover new ways of looking at web development. Create webpage templating system for rendering dynamic data Dive into request and response objects, middleware, and URL routing Simulate a production environment for testing and development Focus on persistence with document databases, particularly MongoDB Make your resources available to other programs with RESTful APIs Build secure apps with authentication, authorization, and HTTPS Integrate with social media, geolocation, and other third-party services Implement a plan for launching and maintaining your app Learn critical debugging skills This book covers Express 4.0. Learn how to build dynamic web applications with Express, a key component of the Node/JavaScript development stack. In this hands-on guide, author Ethan Brown teaches you the fundamentals through the development of a fictional application that exposes a public website and a RESTful API. You’ll also learn web architecture best practices to help you build single-page, multi-page, and hybrid web apps with Express.Express strikes a balance between a robust framework and no framework at all, allowing you a free hand in your architecture choices. With this book, frontend and backend engineers familiar with JavaScript will discover new ways of looking at web development.Create webpage templating system for rendering dynamic dataDive into request and response objects, middleware, and URL routingSimulate a production environment for testing and developmentFocus on persistence with document databases, particularly MongoDBMake your resources available to other programs with RESTful APIsBuild secure apps with authentication, authorization, and HTTPSIntegrate with social media, geolocation, and other third-party servicesImplement a plan for launching and maintaining your appLearn critical debugging skillsThis book covers Express 4.0.

قیمت نهایی

۴۴٬۰۰۰ تومان