Categories
Ebooks
-
Business and economy
- Bitcoin
- Businesswoman
- Coaching
- Controlling
- E-business
- Economy
- Finances
- Stocks and investments
- Personal competence
- Computer in the office
- Communication and negotiation
- Small company
- Marketing
- Motivation
- Multimedia trainings
- Real estate
- Persuasion and NLP
- Taxes
- Social policy
- Guides
- Presentations
- Leadership
- Public Relation
- Reports, analyses
- Secret
- Social Media
- Sales
- Start-up
- Your career
- Management
- Project management
- Human Resources
-
For children
-
For youth
-
Education
-
Encyclopedias, dictionaries
-
E-press
- Architektura i wnętrza
- Biznes i Ekonomia
- Home and garden
- E-business
- Finances
- Personal finance
- Business
- Photography
- Computer science
- HR & Payroll
- Computers, Excel
- Accounts
- Culture and literature
- Scientific and academic
- Environmental protection
- Opinion-forming
- Education
- Taxes
- Travelling
- Psychology
- Religion
- Agriculture
- Book and press market
- Transport and Spedition
- Healthand beauty
-
History
-
Computer science
- Office applications
- Data bases
- Bioinformatics
- IT business
- CAD/CAM
- Digital Lifestyle
- DTP
- Electronics
- Digital photography
- Computer graphics
- Games
- Hacking
- Hardware
- IT w ekonomii
- Scientific software package
- School textbooks
- Computer basics
- Programming
- Mobile programming
- Internet servers
- Computer networks
- Start-up
- Operational systems
- Artificial intelligence
- Technology for children
- Webmastering
-
Other
-
Foreign languages
-
Culture and art
-
School reading books
-
Literature
- Antology
- Ballade
- Biographies and autobiographies
- For adults
- Dramas
- Diaries, memoirs, letters
- Epic, epopee
- Essay
- Fantasy and science fiction
- Feuilletons
- Work of fiction
- Humour and satire
- Other
- Classical
- Crime fiction
- Non-fiction
- Fiction
- Mity i legendy
- Nobelists
- Novellas
- Moral
- Okultyzm i magia
- Short stories
- Memoirs
- Travelling
- Narrative poetry
- Poetry
- Politics
- Popular science
- Novel
- Historical novel
- Prose
- Adventure
- Journalism, publicism
- Reportage novels
- Romans i literatura obyczajowa
- Sensational
- Thriller, Horror
- Interviews and memoirs
-
Natural sciences
-
Social sciences
-
School textbooks
-
Popular science and academic
- Archeology
- Bibliotekoznawstwo
- Cinema studies
- Philology
- Polish philology
- Philosophy
- Finanse i bankowość
- Geography
- Economy
- Trade. World economy
- History and archeology
- History of art and architecture
- Cultural studies
- Linguistics
- Literary studies
- Logistics
- Maths
- Medicine
- Humanities
- Pedagogy
- Educational aids
- Popular science
- Other
- Psychology
- Sociology
- Theatre studies
- Theology
- Economic theories and teachings
- Transport i spedycja
- Physical education
- Zarządzanie i marketing
-
Guides
-
Game guides
-
Professional and specialist guides
-
Law
- Health and Safety
- History
- Road Code. Driving license
- Law studies
- Healthcare
- General. Compendium of knowledge
- Academic textbooks
- Other
- Construction and local law
- Civil law
- Financial law
- Economic law
- Economic and trade law
- Criminal law
- Criminal law. Criminal offenses. Criminology
- International law
- International law
- Health care law
- Educational law
- Tax law
- Labor and social security law
- Public, constitutional and administrative law
- Family and Guardianship Code
- agricultural law
- Social law, labour law
- European Union law
- Industry
- Agricultural and environmental
- Dictionaries and encyclopedia
- Public procurement
- Management
-
Tourist guides and travel
- Africa
- Albums
- Southern America
- North and Central America
- Australia, New Zealand, Oceania
- Austria
- Asia
- Balkans
- Middle East
- Bulgary
- China
- Croatia
- The Czech Republic
- Denmark
- Egipt
- Estonia
- Europe
- France
- Mountains
- Greece
- Spain
- Holand
- Iceland
- Lithuania
- Latvia
- Mapy, Plany miast, Atlasy
- Mini travel guides
- Germany
- Norway
- Active travelling
- Poland
- Portugal
- Other
- Russia
- Romania
- Slovakia
- Slovenia
- Switzerland
- Sweden
- World
- Turkey
- Ukraine
- Hungary
- Great Britain
- Italy
-
Psychology
- Philosophy of life
- Kompetencje psychospołeczne
- Interpersonal communication
- Mindfulness
- General
- Persuasion and NLP
- Academic psychology
- Psychology of soul and mind
- Work psychology
- Relacje i związki
- Parenting and children psychology
- Problem solving
- Intellectual growth
- Secret
- Sexapeal
- Seduction
- Appearance and image
- Philosophy of life
-
Religion
-
Sport, fitness, diets
-
Technology and mechanics
Audiobooks
-
Business and economy
- Bitcoin
- Businesswoman
- Coaching
- Controlling
- E-business
- Economy
- Finances
- Stocks and investments
- Personal competence
- Communication and negotiation
- Small company
- Marketing
- Motivation
- Real estate
- Persuasion and NLP
- Taxes
- Guides
- Presentations
- Leadership
- Public Relation
- Secret
- Social Media
- Sales
- Start-up
- Your career
- Management
- Project management
- Human Resources
-
For children
-
For youth
-
Education
-
Encyclopedias, dictionaries
-
History
-
Computer science
-
Other
-
Foreign languages
-
Culture and art
-
School reading books
-
Literature
- Antology
- Ballade
- Biographies and autobiographies
- For adults
- Dramas
- Diaries, memoirs, letters
- Epic, epopee
- Essay
- Fantasy and science fiction
- Feuilletons
- Work of fiction
- Humour and satire
- Other
- Classical
- Crime fiction
- Non-fiction
- Fiction
- Mity i legendy
- Nobelists
- Novellas
- Moral
- Okultyzm i magia
- Short stories
- Memoirs
- Travelling
- Poetry
- Politics
- Popular science
- Novel
- Historical novel
- Prose
- Adventure
- Journalism, publicism
- Reportage novels
- Romans i literatura obyczajowa
- Sensational
- Thriller, Horror
- Interviews and memoirs
-
Natural sciences
-
Social sciences
-
Popular science and academic
-
Guides
-
Professional and specialist guides
-
Law
-
Tourist guides and travel
-
Psychology
- Philosophy of life
- Interpersonal communication
- Mindfulness
- General
- Persuasion and NLP
- Academic psychology
- Psychology of soul and mind
- Work psychology
- Relacje i związki
- Parenting and children psychology
- Problem solving
- Intellectual growth
- Secret
- Sexapeal
- Seduction
- Appearance and image
- Philosophy of life
-
Religion
-
Sport, fitness, diets
-
Technology and mechanics
Videocourses
-
Data bases
-
Big Data
-
Biznes, ekonomia i marketing
-
Cybersecurity
-
Data Science
-
DevOps
-
For children
-
Electronics
-
Graphics/Video/CAX
-
Games
-
Microsoft Office
-
Development tools
-
Programming
-
Personal growth
-
Computer networks
-
Operational systems
-
Software testing
-
Mobile devices
-
UX/UI
-
Web development
-
Management
Podcasts
- Ebooks
- Programming
- Programming techniques
- Mongoose for Application Development. Mongoose streamlines application development on the Node.js stack and this book is the ideal guide to both the concepts and practical application. From connecting to a database to re-usable plugins, it's all here
E-book details
Log in, If you're interested in the contents of the item.
Mongoose for Application Development. Mongoose streamlines application development on the Node.js stack and this book is the ideal guide to both the concepts and practical application. From connecting to a database to re-usable plugins, it's all here
Ebook
Mongoose is all about putting the data model where it should be: in your application. You can control everything from within your application in JavaScript, eliminating the need to work with the database or a separate management system.
Mongoose for Application Development is a practical, hands-on guide that takes you from installing the technology stack through the steps of developing a web application. It covers the key features of Mongoose and how to use them to rapidly develop a Node.js and MongoDB application.
This book introduces the full technology stack of Node.js, MongoDB, Express, and Mongoose. It will take you through the process of building an application on this stack with a focus on how Mongoose makes the process quicker and easier.
You will see how Mongoose removes a layer of complexity when dealing with MongoDB whilst giving you more control over your data from your application. You will learn how to define schemas and models for your data in JavaScript. Using these schemas and models, you will learn how to build the cornerstone of any web application that will include CRUD operations (creating, reading, updating, and deleting data). If you want to learn how to build applications quickly and efficiently using Node.js, then Mongoose and this book are ideal for you.
Using practical examples throughout, Mongoose for Application Development not only teaches you about the concepts of Mongoose, but walks through how to use them to build a real-life application.
Mongoose for Application Development is a practical, hands-on guide that takes you from installing the technology stack through the steps of developing a web application. It covers the key features of Mongoose and how to use them to rapidly develop a Node.js and MongoDB application.
This book introduces the full technology stack of Node.js, MongoDB, Express, and Mongoose. It will take you through the process of building an application on this stack with a focus on how Mongoose makes the process quicker and easier.
You will see how Mongoose removes a layer of complexity when dealing with MongoDB whilst giving you more control over your data from your application. You will learn how to define schemas and models for your data in JavaScript. Using these schemas and models, you will learn how to build the cornerstone of any web application that will include CRUD operations (creating, reading, updating, and deleting data). If you want to learn how to build applications quickly and efficiently using Node.js, then Mongoose and this book are ideal for you.
Using practical examples throughout, Mongoose for Application Development not only teaches you about the concepts of Mongoose, but walks through how to use them to build a real-life application.
- Mongoose for Application Development
- Table of Contents
- Mongoose for Application Development
- Credits
- About the Author
- About the Reviewers
- www.PacktPub.com
- Support files, eBooks, discount offers and more
- Why Subscribe?
- Free Access for Packt account holders
- Support files, eBooks, discount offers and more
- Preface
- What this book covers
- What you need for this book
- Who this book is for
- Conventions
- Reader feedback
- Customer support
- Downloading the example code
- Errata
- Piracy
- Questions
- 1. Introducing Mongoose to the Technology Stack
- The technology stack Node.js, npm, MongoDB, and Express
- The language and the server JavaScript and Node
- Single-threaded versus multithreaded
- Blocking versus non-blocking code
- JavaScript callbacks
- Running the callback
- A Node.js example
- Blocking versus non-blocking code
- The database MongoDB
- The framework Express
- What Mongoose is all about
- What is Mongoose good for?
- What Mongoose is not ideally suited for
- The cornerstones of Mongoose
- Mongoose schemas
- Mongoose models
- Installing the full stack
- Installing the prerequisites
- Installing Node.js
- Installing npm
- Installing MongoDB
- Installing Express.js
- Installing Mongoose
- Direct installation into project
- Using project dependencies package.json
- Creating a project
- Summary
- The technology stack Node.js, npm, MongoDB, and Express
- 2. Establishing a Database Connection
- Mongoose default connection
- Using multiple connections
- About the connection string
- Setting the port
- Specifying a database user
- Connection options
- Closing the connection
- Calling the close command
- Closing when the Node process ends
- Connection events
- Connecting our project
- Creating the connection
- Catching the events
- Opening the connection at application start
- Creating the database
- Summary
- Mongoose default connection
- 3. Schemas and Models
- Introducing schemas
- Field sizes
- Data types allowed in schemas
- String
- Number
- Date
- Boolean
- Buffer
- ObjectId
- Mixed
- Tracking changes to Mixed type
- Array
- Warning array defined as mixed type
- Custom SchemaTypes
- Where to write the schemas
- Writing a schema
- Modifying an existing schema
- Setting a default value
- Only allowing unique entries
- Our final User schema
- Whats that "__v" thing?
- Why is this needed?
- Defining the Project schema
- Improving the Project schema
- Building models
- Instances
- Interacting with instances
- Finding a single instance
- Finding many instances
- Considerations when choosing your model name
- Instances
- Setting the collection name
- Overriding the collection name in the schema
- Overriding the collection name in the model
- Building models from our schemas
- Our complete code
- Summary
- Introducing schemas
- 4. Interacting with Data an Introduction
- Model methods and instance methods
- Setting up the project
- Code structure
- Adding the routes files
- Tying the routes to Mongoose models
- URLs and routes
- Routes for user management
- Routes for project management
- Code structure
- Summary
- 5. Interacting with Data Creation
- Creating an instance
- Adding data to the instance
- Saving an instance
- Using the saved data
- Creating and saving database entry in one step
- Chaining methods
- The Model.create() method
- CRUD create data
- Adding a new user form
- Adding the Jade template
- Linking the view to the URL
- Adding the create user function
- Error trapping
- Creating a user session
- Displaying the confirmation page
- Try it out!
- Adding create project functionality
- Routes
- New files and functions
- Adding a new user form
- Summary
- Creating an instance
- 6. Interacting with Data Reading, Querying, and Finding
- Approaches to find and read data
- Using the QueryBuilder
- Single query operation
- Static helper methods finding data
- CRUD reading user and project data
- findOne() finding a single user
- Login form
- Login action
- Housekeeping adding homepage links
- Try it out!
- find() finding a list of projects and returning JSON to AJAX
- Creating a new static find method
- Setting up the route
- Updating the view
- Building the AJAX call
- Try it out!
- findByld() finding a single project
- Route setup
- Creating the view
- findOne() finding a single user
- Summary
- Approaches to find and read data
- 7. Interacting with Data Updating
- Model helper methods
- Building the commands
- Which method to choose
- The catch
- The three-step find-edit-save approach
- CRUD editing users and projects
- Tracking user login
- Editing the current user
- Routes in use
- Setting up the form
- Setting up the controllers
- Committing the edit
- Editing projects
- Routes
- New files and functions
- Summary
- Model helper methods
- 8. Interacting with Data Deleting
- Deleting data
- CRUD deleting user and projects
- The "Are you sure" page
- Deleting the user
- Improving on this
- Deleting individual projects
- Routes
- New files and functions
- Summary
- 9. Validating Data
- Mongoose validation the basics
- Default validators
- All SchemaTypes
- Number SchemaType
- String SchemaType
- Default validators
- Understanding validation errors
- Doing it your way create custom validation
- Single function no custom error message
- Returning a custom error message
- Validating a regular expression
- Taking the messages out of the schema
- Using multiple re-usable validators
- Non-blocking, asynchronous validation
- Extending Mongoose validation
- Adding validation to our project
- Summary
- Mongoose validation the basics
- 10. Complex Schemas
- Population references to other collections
- Defining data for population
- Saving population references
- Retrieving populated data
- Querying to return a subset of results
- Populating into multiple parent items
- Subdocuments
- Creating subdocuments
- Saving and validation
- Retrieving subdocuments
- Accessing a specific subdocument
- Deleting subdocuments
- Creating subdocuments
- Data management when modifying existing schemas
- Summary
- Population references to other collections
- 11. Plugins Re-using Code
- Reusable schema plugins
- Creating a schema plugin
- Applying the plugin to an existing schema
- Using an external file
- Using schema middleware
- Not just for plugins
- Creating a schema plugin
- Sharing with the community
- Summary
- Reusable schema plugins
- Index
- Title: Mongoose for Application Development. Mongoose streamlines application development on the Node.js stack and this book is the ideal guide to both the concepts and practical application. From connecting to a database to re-usable plugins, it's all here
- Author: Simon Holmes
- Original title: Mongoose for Application Development. Mongoose streamlines application development on the Node.js stack and this book is the ideal guide to both the concepts and practical application. From connecting to a database to re-usable plugins, it's all here.
- ISBN: 9781782168201, 9781782168201
- Date of issue: 2013-08-26
- Format: Ebook
- Item ID: e_3bhq
- Publisher: Packt Publishing