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

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

Web Development with MongoDB and NodeJS : Build an Interactive and Full-featured Web Application From Scratch Using Node.js and MongoDB

Mithun Satheesh; Bruno Joseph D'mello; Jason Krol

قیمت نهایی

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

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

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

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

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

مشخصات کتاب

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

دربارهٔ کتاب

Build an interactive and full-featured web application from scratch using Node.js and MongoDB About This Book Configure your development environment to use Node.js and MongoDB Use Node.js to connect to a MongoDB database and perform data manipulations A practical guide with clear instructions to design and develop a complete web application from start to finish Who This Book Is For This book is designed for JavaScript developers of any skill level that want to get up and running using Node.js and MongoDB to build full-featured web applications. A basic understanding of JavaScript and HTML is the only requirement for this book. What You Will Learn Configure your development environment to use Node.js and MongoDB Write and configure a web server using Node.js powered by the Express.js framework Build dynamic HTML pages using the Handlebars template engine Persist application data using MongoDB and Mongoose ODM Test your code using automated testing tools such as the Mocha framework Deploy the development environment to the cloud using services such as Heroku, Amazon Web Services, and Microsoft Azure Explore Single-Page application frameworks to take your web applications to the next level In Detail Node.js and MongoDB are quickly becoming one of the most popular tech stacks for the web. Powered by Google's V8 engine, Node.js caters to easily building fast, scalable network applications while MongoDB is the perfect fit as a scalable, high-performance, open source NoSQL database solution. Using these two technologies together, web applications can be built quickly and easily and deployed to the cloud with very little difficulty. The book will begin by introducing you to the groundwork needed to set up the development environment. Here, you will quickly run through the steps necessary to get the main application server up and running. Then you will see how to use Node.js to connect to a MongoDB database and perform data manipulations. From here on, the book will take you through integration with third-party tools for interaction with web apps. It then moves on to show you how to use controllers and view models to generate reusable code that will reduce development time. Toward the end of the book, we will cover tests to properly execute the code and some popular frameworks for developing web applications. By the end of the book, you will have a running web application developed with MongoDB and Node.js along with it's popular frameworks. Style and approach An easy guide to Node.js and MongoDB, which will quickly introduce you to the relevant concepts by taking you through the different steps involved in building a full-fledged web application. Cover 1 Copyright 3 Credits 4 About the Authors 5 About the Reviewers 7 www.PacktPub.com 11 Table of Contents 12 Preface 18 Chapter 1: Welcome to JavaScript in the Full Stack 24 A short introduction to Node.js 25 The advantage that the V8 engine brings in 25 Node.js is single threaded! 26 Non-blocking asynchronous execution 26 npm – the Node Package Manager 28 Sharing and reusing JavaScript 28 Not just for building web servers! 29 Real-time web application with Socket.io 29 Networking and file IO 30 The origin of io.js 30 A simple server with Node.js 30 When to use Node.js? 31 The NoSQL movement 31 A short introduction to MongoDB 32 Features of MongoDB 32 Node and MongoDB in the wild 33 What to expect from this book 34 Summary 35 Chapter 2: Getting Up and Running 36 Installing Node.js 37 Mac OS X 37 Windows 39 Linux 40 Testing whether Node.js is installed properly 41 Online documentation 41 Installing Monod 42 Mac OS X installation instructions 42 Windows 7 / Windows 8 installation instructions 43 Linux installation instructions 44 Confirming successful Monod installation 45 Bookmark the online documentation 46 Writing your first app 46 Creating the sample application 46 Getting the dependent modules in place 47 Adding the application code 47 Understanding the code 47 Launching the sample app 50 Checking the actual database 50 Summary 51 Chapter 3: Node and MongoDB Basics 52 A JavaScript primer 52 Syntax basics 53 Data types 54 Understanding the scope of variables 54 Operators and flows 55 Understanding objects 57 Understanding arrays 59 Understanding functions 59 Anonymous functions and callbacks 61 JSON 62 The basics of Node.js 63 Event-driven 63 Asynchronous execution 63 The module system 64 The Node.js core 64 Installing modules using npm 65 The basics of MongoDB 67 The Mongo shell 67 Inserting data 68 Querying 69 Updating data 70 Deleting data 71 Additional resources 71 Summary 72 Chapter 4: Introducing Express 74 Web application frameworks 74 What is Express.js? 75 Building a complete web application 76 Designing the web application 76 Organizing the files 78 Creating the application's entry point 79 Booting up the application 81 Using and understanding middleware 81 The configure module 82 Activating the configure module 84 Routers and controllers 84 Custom middleware 90 Handlebars as view engines 91 Summary 92 Chapter 5: Templating with Handlebars 94 Templating engines 94 Server-side and client-side templating 95 Client-side templating 95 Server-side templating 95 Views 95 Layouts 102 Partial views 104 The basics of Handlebars 106 Binding an object to the template 106 Embedding presentation logic 107 Handlebars helpers 108 Global helpers 108 View-specific helpers 109 Rendering the views 110 Summary 113 Chapter 6: Controllers and View Models 114 Controllers 114 View models 115 Updating the home controller 116 Updating the image controller 119 Displaying an image 119 Uploading an image 121 Helpers for reusable code 126 The sidebar module 126 The stats module 128 The images module 128 The comments module 130 Testing the sidebar implementation 131 Iterating on the UI 131 Summary 135 Chapter 7: Persisting Data with MongoDB 136 Using MongoDB with Node.js 137 Connecting to MongoDB 138 Inserting a document 139 Retrieving a document 140 Introducing Mongoose 141 Schemas 142 Models 143 Built-in validation 145 Static methods 147 Virtual properties 147 Connecting with Mongoose 148 Defining the schemas and models 149 The models index file 151 Adding CRUD to the controllers 152 The home controller 152 The image controller 155 Index – retrieving an image model 155 Create – inserting an image model 159 Testing everything out so far 162 The Like button and updating an image model 165 Comment – inserting a comment model 167 Wrapping it up 169 Helpers 169 Introducing the async module 170 The comments helper 170 The sidebar helper 174 Troubleshooting 176 The stats helper 177 The popular images helper 180 Iterating by adding an image removal capability 181 Adding a route 181 Adding a controller handler 181 Updating the Handlebars image page template 182 Updating jQuery 183 Refactoring and improvements 184 Summary 184 Chapter 8: Creating a RESTful API 186 What is an API? 187 What is a RESTful API? 187 Introducing Postman REST Client 188 Installation instructions 188 A quick tour of Postman REST Client 190 Using the JSONView Chrome extension 193 Creating a basic API server 194 Creating sample JSON data 195 Responding to GET requests 196 Receiving data – POST and PUT requests 198 Removing data – DELETE 203 Consuming external APIs from Node.js 204 Consuming an API endpoint using request 205 Summary 208 Chapter 9: Testing Your Code 210 The tools of the trade 210 Running tests with the Mocha framework 211 Asserting tests with Chai.js 213 Getting started with Chai 214 Spies and stubs with Sinon.js 215 Stubbing node modules with Proxyquire 217 Writing and running your first test 219 Writing a test helper 220 Testing the application 222 Testing the routes 222 Testing the server 225 Testing a model 228 Testing a controller 231 Spy and stub everything! 235 Summary 236 Chapter 10: Deploying with Cloud-Based Services 238 Cloud versus traditional hosting 239 Infrastructure as a Service versus Platform as a Service 239 An introduction to Git 240 Deploying your application 241 Nodejitsu 241 Heroku 247 Amazon Web Services 253 Create a MongoLab account and database 253 Create and configure the AWS environment 255 Microsoft Azure 258 Digital Ocean 263 Summary 265 Chapter 11: Single Page Applications with Popular Frontend Frameworks 266 What is a single page application? 266 Why use a frontend framework? 267 The TodoMVC project 268 Backbone.js 269 Ember.js 271 AngularJS 272 Frontend development tools 273 Automated build task managers 273 Dependency management 275 Modularity 276 HTML template-rendering engines 277 CSS transpiling 277 Testing and test-driven development 279 PhantomJS headless browser 279 Summary 280 Chapter 12 : Popular Node.js Web Frameworks 282 Koa 283 Meteor 283 Sails 285 Hapi 286 Flatiron 287 Summary 288 Index 290

Build an interactive and full-featured web application from scratch using Node.js and MongoDB

About This Book
  • Configure your development environment to use Node.js and MongoDB
  • Use Node.js to connect to a MongoDB database and perform data manipulations
  • A practical guide with clear instructions to design and develop a complete web application from start to finish
Who This Book Is For

This book is designed for JavaScript developers of any skill level that want to get up and running using Node.js and MongoDB to build full-featured web applications. A basic understanding of JavaScript and HTML is the only requirement for this book.

What You Will Learn
  • Configure your development environment to use Node.js and MongoDB
  • Write and configure a web server using Node.js powered by the Express.js framework
  • Build dynamic HTML pages using the Handlebars template engine
  • Persist application data using MongoDB and Mongoose ODM
  • Test your code using automated testing tools such as the Mocha framework
  • Deploy the development environment to the cloud using services such as Heroku, Amazon Web Services, and Microsoft Azure
  • Explore Single-Page application frameworks to take your web applications to the next level
In Detail

Node.js and MongoDB are quickly becoming one of the most popular tech stacks for the web. Powered by Google's V8 engine, Node.js caters to easily building fast, scalable network applications while MongoDB is the perfect fit as a scalable, high-performance, open source NoSQL database solution. Using these two technologies together, web applications can be built quickly and easily and deployed to the cloud with very little difficulty.

The book will begin by introducing you to the groundwork needed to set up the development environment. Here, you will quickly run through the steps necessary to get the main application server up and running. Then you will see how to use Node.js to connect to a MongoDB database and perform data manipulations.

From here on, the book will take you through integration with third-party tools for interaction with web apps. It then moves on to show you how to use controllers and view models to generate reusable code that will reduce development time. Toward the end of the book, we will cover tests to properly execute the code and some popular frameworks for developing web applications.

By the end of the book, you will have a running web application developed with MongoDB and Node.js along with it's popular frameworks.

Style and approach

An easy guide to Node.js and MongoDB, which will quickly introduce you to the relevant concepts by taking you through the different steps involved in building a full-fledged web application.

Annotation Build an interactive and full-featured web application from scratch using Node.js and MongoDBAbout This Book Configure your development environment to use Node.js and MongoDB Use Node.js to connect to a MongoDB database and perform data manipulations A practical guide with clear instructions to design and develop a complete web application from start to finishWho This Book Is ForThis book is designed for JavaScript developers of any skill level that want to get up and running using Node.js and MongoDB to build full-featured web applications. A basic understanding of JavaScript and HTML is the only requirement for this book. What You Will Learn Configure your development environment to use Node.js and MongoDB Write and configure a web server using Node.js powered by the Express.js framework Build dynamic HTML pages using the Handlebars template engine Persist application data using MongoDB and Mongoose ODM Test your code using automated testing tools such as the Mocha framework Deploy the development environment to the cloud using services such as Heroku, Amazon Web Services, and Microsoft Azure Explore Single-Page application frameworks to take your web applications to the next levelIn DetailNode.js and MongoDB are quickly becoming one of the most popular tech stacks for the web. Powered by Google's V8 engine, Node.js caters to easily building fast, scalable network applications while MongoDB is the perfect fit as a scalable, high-performance, open source NoSQL database solution. Using these two technologies together, web applications can be built quickly and easily and deployed to the cloud with very little difficulty. The book will begin by introducing you to the groundwork needed to set up the development environment. Here, you will quickly run through the steps necessary to get the main application server up and running. Then you will see how to use Node.js to connect to a MongoDB database and perform data manipulations. From here on, the book will take you through integration with third-party tools for interaction with web apps. It then moves on to show you how to use controllers and view models to generate reusable code that will reduce development time. Toward the end of the book, we will cover tests to properly execute the code and some popular frameworks for developing web applications. By the end of the book, you will have a running web application developed with MongoDB and Node.js along with it's popular frameworks. Style and approachAn easy guide to Node.js and MongoDB, which will quickly introduce you to the relevant concepts by taking you through the different steps involved in building a full-fledged web application Key FeaturesBook DescriptionWhat you will learnConfigure your development environment to use Node.js and MongoDBWrite and configure a web server using Node.js powered by the Express.js frameworkBuild dynamic HTML pages using the Handlebars template enginePersist application data using MongoDB and Mongoose ODMTest your code using automated testing tools such as the Mocha frameworkDeploy the development environment to the cloud using services such as Heroku, Amazon Web Services, and Microsoft AzureExplore SinglePage application frameworks to take your web applications to the next levelWho this book is forThis book is designed for JavaScript developers of any skill level that want to get up and running using Node.js and MongoDB to build full-featured web applications. A basic understanding of JavaScript and HTML is the only requirement for this book.

کتاب‌های مشابه

Web development with MongoDB and Node.js : build an interactive and full-featured web application from scratch using Node.js and MongoDB

Web development with MongoDB and Node.js : build an interactive and full-featured web application from scratch using Node.js and MongoDB

۴۹٬۰۰۰ تومان

Web Development with MongoDB and NodeJS - Second Edition: Build an interactive and full-featured web application from scratch using Node.js and MongoDB

Web Development with MongoDB and NodeJS - Second Edition: Build an interactive and full-featured web application from scratch using Node.js and MongoDB

۴۹٬۰۰۰ تومان

Web development with MongoDB and Node.js : build an interactive and full-featured web application from scratch using Node.js and MongoDB

Web development with MongoDB and Node.js : build an interactive and full-featured web application from scratch using Node.js and MongoDB

۴۹٬۰۰۰ تومان

Web development with MongoDB and Node.js : build an interactive and full-featured web application from scratch using Node.js and MongoDB

Web development with MongoDB and Node.js : build an interactive and full-featured web application from scratch using Node.js and MongoDB

۴۹٬۰۰۰ تومان

Web Development with MongoDB and NodeJS, 2nd Edition: Build an interactive and full-featured web application from scratch using Node.js and MongoDB

Web Development with MongoDB and NodeJS, 2nd Edition: Build an interactive and full-featured web application from scratch using Node.js and MongoDB

۴۹٬۰۰۰ تومان

Web Development with MongoDB and NodeJS - Second Edition: Build an interactive and full-featured web application from scratch using Node.js and MongoDB

Web Development with MongoDB and NodeJS - Second Edition: Build an interactive and full-featured web application from scratch using Node.js and MongoDB

۴۹٬۰۰۰ تومان

Web Development with MongoDB and Node - Third Edition : Use the Two Popular Web Development Stacks, Node.js and MongoDB, to Build Full-featured Web Applications

Web Development with MongoDB and Node - Third Edition : Use the Two Popular Web Development Stacks, Node.js and MongoDB, to Build Full-featured Web Applications

۴۹٬۰۰۰ تومان

Web Development with MongoDB and Node - Third Edition : Use the Two Popular Web Development Stacks, Node.js and MongoDB, to Build Full-featured Web Applications

Web Development with MongoDB and Node - Third Edition : Use the Two Popular Web Development Stacks, Node.js and MongoDB, to Build Full-featured Web Applications

۴۹٬۰۰۰ تومان

Full Stack Angularjs for Java Developers : build a full-featured web application from scratch ... using angularjs with spring restful

Full Stack Angularjs for Java Developers : build a full-featured web application from scratch ... using angularjs with spring restful

۴۹٬۰۰۰ تومان

Node.js for Beginners - A comprehensive guide to building efficient, full-featured web applications with Node.js

Node.js for Beginners - A comprehensive guide to building efficient, full-featured web applications with Node.js

۴۹٬۰۰۰ تومان

Web Development with MongoDB and Node.js (Code Only)

Web Development with MongoDB and Node.js (Code Only)

۴۹٬۰۰۰ تومان

Ultimate Full-Stack Web Development with MERN: Design, Build, Test and Deploy Production-Grade Web Applications with MongoDB, Express, React and NodeJS

Ultimate Full-Stack Web Development with MERN: Design, Build, Test and Deploy Production-Grade Web Applications with MongoDB, Express, React and NodeJS

۴۹٬۰۰۰ تومان

قیمت نهایی

۴۴٬۰۰۰ تومان